Balance inquiry
About 2 min
Thailand region balance inquiry API (THB).
Request
Request Path:
sandbox:
https://sandbox-gateway.smilepayz.com/v2.0/inquiry-balance
production:https://gateway.smilepayz.com/v2.0/inquiry-balance
Header Parameters
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | Signature of JSON body (see product Signature doc). |
X-PARTNER-ID | M | String | Your merchantID |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
accountNo | M | String(128) | Merchant settlement account for this currency (Pay-in or Pay-out). |
balanceTypes | M | List(String) | e.g. ["BALANCE"]; types to return. |
accountNo
- Sandbox: any non-empty string (≤128). You can reuse the sample value in the example body below.
- Production: Merchant Portal → Finance → Balance. Each currency has separate Pay-in / Pay-out numbers — send the one you want to query. See How to get production accountNo.
Example Body – Balance Inquiry Request:
Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:06:00+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 20001
{
"accountNo": "21120030202403071031",
"balanceTypes": [
"BALANCE"
]
}
Responses
HTTP Request
| Field | Required | Type | Description |
|---|---|---|---|
Content-Type | M | String | application/json request body. |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
code | M | String | 00 success, other values error. |
message | M | String | UTF-8 human-readable result line. |
accountInfos | M | Object | balanceType, amount, availableBalance. |
balanceType | M | String | e.g. BALANCE. |
amount | M | Object | Money object (currency + amount). Decimal places: Money |
currency | M | String | Fixed to THB. |
value | M | String | Balance as string (e.g. "250000"). |
availableBalance | M | Object | Available balance; same shape as amount. |
currency | M | String | Fixed to THB. |
value | M | String | Available as string. |
accountNo | M | String | Echo of the request accountNo. |
balanceTypes | O | List | Balance types returned. |
name | O | String | Account display name when returned. |
Example Body – Balance Inquiry Response:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"code": "00",
"message": "Successful",
"accountInfos": {
"balanceType": "BALANCE",
"amount": {
"currency": "THB",
"value": "250000"
},
"availableBalance": {
"currency": "THB",
"value": "250000"
}
},
"accountNo": "21120030202403071031",
"balanceTypes": [
"BALANCE"
],
"name": "Sandbox Test"
}

