Get Balance (Merchant)
The Get Balance API allows merchants to retrieve their current balance for one or multiple payment methods. This API uses HMAC-SHA256–based signature verification.
Endpoint
Request URL: https://apihit.net/api/creedo/balance/get-balance
Request Headers
| Header Name | Value |
|---|---|
| Content-Type | "application/json" |
| Accept | "application/json" |
| X-Signature | The HMAC signature used for verification. |
Request Parameters
| Property | Presence | Type | Description |
|---|---|---|---|
| mid | Mandatory | String | Merchant public key provided during onboarding. |
| payment_method | Mandatory | String | Use "all" for all payment methods or specify a method such as "BKASH_P2C", "NAGAD_P2C", "EASYPAISA_P2C", etc. |
Signature Generation
The signature (X-Signature) is generated using HMAC with SHA-256.
secret_string = mid:payment_method
Request Body Example
POST /api/creedo/balance/get-balance HTTP/1.1
Host: https://apihit.net
Content-Type: application/json
Accept: application/json
X-Signature: <hash_str>
{
"mid": "2982146287",
"payment_method": "all"
}
Valid Values for payment_method
| Value | Description |
|---|---|
all | Returns balance for all payment methods |
BKASH_P2C | Balance for Bkash P2C |
NAGAD_P2C | Balance for Nagad P2C |
EASYPAISA_P2C | Balance for Easypaisa P2C |
JAZZCASH_P2C | Balance for JazzCash P2C |
Success Response Parameters
| Property | Type | Description |
|---|---|---|
| currency_code | String | Currency of the balance amount. |
| payment_method | String | Payment method name. |
| balance | Number | Current merchant balance for the method. Can be positive or negative. |
Success Response Example
[
{
"currency_code": "BDT",
"payment_method": "BKASH_P2C",
"balance": 10088.52
},
{
"currency_code": "PKR",
"payment_method": "EASYPAISA_P2C",
"balance": -914
}
]
Error Response Parameters
| Property | Type | Description |
|---|---|---|
| gateway_status | String | "rejected" |
| message | String | Error message here. |
Error Response Example
{
"gateway_status": "rejected",
"message": "Invalid signature."
}
Notes
- The
midmust match the merchant's assigned public key. - Always convert the HMAC signature to uppercase.
- When using
"all", balances for every active payment method will be returned. - Signature must be regenerated for every request.