余额查询(泰国)
大约 1 分钟
泰国商户账户实时余额(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 |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
X-SIGNATURE | M | String | Request signature; Signature Generation. |
X-PARTNER-ID | M | String | merchantID (alphanumeric). |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
accountNo | M | String(128) | Account to query; max 128 chars. |
balanceTypes | M | List(String) | e.g. ["BALANCE"]; types to return. |
说明
沙盒:
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 |
X-TIMESTAMP | M | String | Format: yyyy-MM-ddTHH:mm:ss±HH:mm |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
code | M | String | 00 = success; other codes = error. |
message | M | String | Result text (UTF-8). |
accountInfos | M | Object | balanceType, amount, availableBalance. |
balanceType | M | String | e.g. BALANCE. |
amount | M | Object | Total balance: currency + string value. |
currency | M | String | THB. |
value | M | String | Balance as string (e.g. "250000"). |
availableBalance | M | Object | Available balance; same shape as amount. |
currency | M | String | THB. |
value | M | String | Available as string. |
accountNo | O | String | Echo accountNo when present. |
balanceTypes | O | List | Balance types returned. |
name | O | String | Account display name. |
additionalInfo | O | Object | Extra metadata when available. |
Example Body – Balance Inquiry Response:
Content-type: application/json
X-TIMESTAMP: 2020-12-17T10:55:00+07:00
{
"code": "00",
"message": "Successful",
"accountNo": "21120030202403071031",
"name": "Sandbox Test",
"balanceTypes": [
"BALANCE"
],
"accountInfos": {
"balanceType": "BALANCE",
"amount": {
"currency": "THB",
"value": "250000"
},
"availableBalance": {
"currency": "THB",
"value": "250000"
}
}
}
