请求URL
https://gateway.pay247.io/gateway/balance
请求方式
POSTtimestamp 使用整数,示例为毫秒;version 建议使用 v3.0。sign 需按签名算法计算。余额查询也必须传 uuid,并将其计入签名。响应的 uuid 由响应头或服务端生成,不保证等于请求体中的 uuid。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
mch_id | 是 | string | 商户号 |
timestamp | 是 | integer | 时间戳 |
version | 是 | string | 建议 v3.0 |
uuid | 是 | string | 请求标识,参与签名 |
sign | 是 | string | 签名 |
{
"mch_id": "MCH12345678",
"timestamp": 1693233334134,
"version": "v3.0",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"sign": "<computed signature>"
}
成功响应 data
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
mch_id | 是 | string | 商户号 |
wallets | 是 | array | 钱包列表;每项含 balance、freeze、currency |
wallets 项的字段:
| 字段 | 类型 | 说明 |
|---|---|---|
balance | string | 当前钱包余额 |
freeze | string | 当前冻结金额 |
currency | string | 钱包币种 |
{
"code": 0,
"message": "success",
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": 1693233334135,
"data": {
"mch_id": "MCH12345678",
"wallets": [
{
"balance": "100.0000",
"freeze": "0.0000",
"currency": "INR"
}
]
}
}
原有多币种钱包示例
{
"code": 0,
"message": "success",
"uuid": "2ae0f1b3-2dc3-4488-83ac-eaa8bed6d56e",
"timestamp": 1735969840196,
"data": {
"mch_id": "PQSKDPKVVV10001",
"wallets": [
{
"balance": "11120.0000",
"freeze": "0.0000",
"currency": "CNY"
},
{
"balance": "120.0000",
"freeze": "0.0000",
"currency": "USD"
},
{
"balance": "30.0000",
"freeze": "0.0000",
"currency": "INR"
},
{
"balance": "0.0000",
"freeze": "0.0000",
"currency": "KRW"
},
{
"balance": "1000.0000",
"freeze": "0.0000",
"currency": "JPY"
},
{
"balance": "0.0000",
"freeze": "0.0000",
"currency": "PHP"
},
{
"balance": "0.0000",
"freeze": "0.0000",
"currency": "THB"
}
]
}
}
