Real-time balance query
- Endpoint:
POST /aggregate-pay/api/gateway/currentBalanceQuery - Tags: Fund Account(Old)
Description
Query real-time customer account balances based on merchants’ request time, account type, and currency
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 | API version. Current value: 1.3 | ||
keyVersion | string | Yes | Signature Algorithm Version, Current value: 1 | ||
requestTime | string | Yes | Request time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time | ||
appId | string | Yes | Merchant AppId,The unique identifier assigned to the merchant app by PayerMax | ||
merchantNo | string | No | maxLength: 32 | Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax | |
data | object | Yes | |||
data.plainSign | boolean | No | default: "false" | Whether to display accounts with a balance of 0 -true: display -false: does not display (default), filters the account directly | |
data.accountType | array[string] | No | Account Type: -ACQUIRING acquiring account -DISBURSEMENT Available Balance Account -FREEZE FREEZE ACCOUNTS -SETTLE ACCOUNTS TO BE SETTLED -REVERSE Margin Account When no account type is specified, all accounts that are not 0 are returned | ||
data.accountCurrency | array[string] | No | 3-digit currency code in accordance with ISO 4217 When no currency is specified, all accounts that are not 0 are returned |
Example
json
{
"appId": "127d5de5b5124d11b9132c6ec9cc61d3",
"sign": "{{sign}}",
"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 | Return code, ‘APPLY_SUCCESS’ means success | ||
msg | string | Yes | Return message, ‘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 | ||
data.inquiryTime | string | Yes | maxLength: 64 | in accordance with RFC3339 specification, format: 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"
}
}