实时余额查询
- Endpoint:
POST /aggregate-pay/api/gateway/currentBalanceQuery - Tags: 资金账户(老)
Description
基于商户的请求时间、账户类型、币种查询实时的客户账余额
Parameters
| Field | In | Type | Required | Constraints | Description |
|---|---|---|---|---|---|
Content-Type | header | string | Yes | ||
sign | header | string | Yes | 签名信息请参考技术文档 |
Parameter Examples
Content-Type:"application/json"sign:"FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="
Request Body
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
version | string | Yes | 接口版本 当前值为:1.3 | ||
keyVersion | string | Yes | maxLength: 8 | 密钥版本 当前值为:1 | |
requestTime | string | Yes | maxLength: 32 | 请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内 | |
appId | string | Yes | maxLength: 64 | 商户应用Id,PayerMax分配给商户应用的唯一标识 | |
merchantNo | string | No | maxLength: 32 | 商户号,商户与PayerMax业务签约时生成的唯一标识 | |
data | object | Yes | |||
data.plainSign | boolean | No | default: "false" | 是否返回余额为0的账户 true返回 false不返回 默认值: "false" | |
data.accountType | array[string] | No | ACQUIRING 收单账户 -DISBURSEMENT 代发账户 FREEZE 冻结账户 SETTLE 待结算账户 REVERSE 保证金账户 当未指定账户类型时,返回全部不为0的账户 | ||
data.accountCurrency | array[string] | No | 符合ISO 4217规范. 当未指定币种时,返回全部不为0的账户 |
Example
json
{
"appId": "127d5de5b5124d11b9132c6ec9cc61d3",
"version": "1.3",
"merchantNo": "010113864671194",
"requestTime": "{{requestTime}}",
"keyVersion": "1",
"data": {
"plainSign": true,
"accountType": [],
"accountCurrency": [
"USD",
"TRY"
]
}
}Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | 返回码,’APPLY_SUCCESS’代表成功 | ||
msg | string | Yes | 返回描述,’Success.’ | ||
data | object | Yes | |||
data.accountRealTimeTypes | array[object] | Yes | |||
data.accountRealTimeTypes[].balance | number (20,2) | Yes | 单位元 | ||
data.accountRealTimeTypes[].accountType | string | Yes | maxLength: 32 | ||
data.accountRealTimeTypes[].currency | string | Yes | maxLength: 3 | 符合ISO 4217规范. | |
data.inquiryTime | string | Yes | maxLength: 64 | 符合rfc3339规范,格式:yyyy-MM-dd’T’HH:mm:ss.SSSXXX | |
data.errorCode | string | No | maxLength: 32 | 查询失败错误码 | |
data.errorMsg | string | No | maxLength: 256 | 查询失败错误码描述 |
Response Example
json
{
"msg": "",
"code": "APPLY_SUCCESS",
"data": {
"accountRealTimeTypes": [
{
"balance": 0.59,
"accountType": "DISBURSEMENT",
"currency": "AED"
},
{
"balance": 776.34,
"accountType": "DISBURSEMENT",
"currency": "USD"
},
{
"balance": 16.08,
"accountType": "DISBURSEMENT",
"currency": "PHP"
},
{
"balance": 100265403,
"accountType": "FREEZE",
"currency": "IDR"
},
{
"balance": 11.41,
"accountType": "FREEZE",
"currency": "USD"
},
{
"balance": 449172,
"accountType": "SETTLE",
"currency": "IDR"
},
{
"balance": 9248.93,
"accountType": "SETTLE",
"currency": "USD"
}
],
"inquiryTime": "2023-03-30T06:15:22.096Z"
}
}