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 a single method code from Valid Values. |
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 | Currency | Description |
|---|---|---|
all | — | Returns balance for every active payment method |
BKASH_P2C | BDT | Bangladesh — bKash P2C |
BKASH_P2C_PAYMENT | BDT | Bangladesh — bKash P2C Payment |
BKASH_P2P | BDT | Bangladesh — bKash P2P |
NAGAD_P2C | BDT | Bangladesh — Nagad P2C |
NAGAD_P2P | BDT | Bangladesh — Nagad P2P |
UPAY_P2C | BDT | Bangladesh — Upay P2C |
EASYPAISA_P2C | PKR | Pakistan — Easypaisa P2C |
EASYPAISA_P2P | PKR | Pakistan — Easypaisa P2P |
JAZZCASH_P2C | PKR | Pakistan — JazzCash P2C |
ARS_BANK_TRANSFER | ARS | Argentina — bank transfer |
ARS_QR | ARS | Argentina — QR |
GCASH | PHP | Philippines — GCash |
MAYA | PHP | Philippines — Maya |
UPI_LINK | INR | India — UPI link |
UPI_QR | INR | India — UPI QR |
PIX | BRL | Brazil — Pix |
MXN_BANK_TRANSFER | MXN | Mexico — bank transfer (SPEI) |
IDR_EW | IDR | Indonesia — e-wallet |
IDR_QR | IDR | Indonesia — QRIS |
IDR_VA | IDR | Indonesia — virtual account |
BOB_QR | BOB | Bolivia — QR |
PEN_QR | PEN | Peru — QR |
PEN_BANK_TRANSFER | PEN | Peru — bank transfer |
COP_BREB | COP | Colombia — Bre-B |
COP_NEQUI | COP | Colombia — Nequi |
COP_PSE | COP | Colombia — PSE |
COP_PSE_BC | COP | Colombia — PSE Bancolombia |
Only the methods enabled for your account return a balance.
Success Response Parameters
The response is an array with one object per payment method.
| Property | Type | Description |
|---|---|---|
| currency_code | String | Currency of the balance amounts. |
| payment_method | String | Payment method name. |
| balance | Number | Current merchant balance for the method. |
| holding_balance | Number | Portion of the balance temporarily on hold and not usable. |
| available_balance | Number | Balance usable right now. Differs from balance when part of it is on hold. |
Success Response Example
[
{
"currency_code": "BDT",
"payment_method": "BKASH_P2C",
"balance": 10088.52,
"holding_balance": 500,
"available_balance": 9588.52
},
{
"currency_code": "PKR",
"payment_method": "EASYPAISA_P2C",
"balance": 25400,
"holding_balance": 0,
"available_balance": 25400
},
{
"currency_code": "BRL",
"payment_method": "PIX",
"balance": 1540.75,
"holding_balance": 120.5,
"available_balance": 1420.25
},
{
"currency_code": "IDR",
"payment_method": "IDR_QR",
"balance": 19600.98,
"holding_balance": 0,
"available_balance": 19600.98
}
]
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. - A negative
balanceoravailable_balancemeans that amount is owed for the method. - Signature must be regenerated for every request.