余额查询(泰国)
大约 2 分钟
泰国地区 余额查询 接口(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 | 请求体签名(见产品文档 签名生成)。 |
X-PARTNER-ID | M | String | 商户 merchantID(字母数字)。 |
Body Parameters
| Field | Required | Type | Description |
|---|---|---|---|
accountNo | M | String(128) | 结算 accountNo(若返回)。 |
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 成功,其余失败。 |
message | M | String | UTF-8 结果说明。 |
accountInfos | M | Object | balanceType, amount, availableBalance. |
balanceType | M | String | e.g. BALANCE. |
amount | M | Object | 按币种与通道规则的金额整数。 |
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 | 结算 accountNo(若返回)。 |
balanceTypes | O | List | Balance types returned. |
name | O | String | 收款人全名(UTF-8)。 |
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"
}
