Skip to content

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

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

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

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesAPI version. Current value: 1.3
keyVersionstringYesSignature Algorithm Version, Current value: 1
requestTimestringYesRequest 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
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
dataobjectYes
data.plainSignbooleanNodefault: "false"Whether to display accounts with a balance of 0 -true: display -false: does not display (default), filters the account directly
data.accountTypearray[string]NoAccount 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.accountCurrencyarray[string]No3-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

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesReturn code, ‘APPLY_SUCCESS’ means success
msgstringYesReturn message, ‘Success.’
dataobjectYes
data.accountRealTimeTypesarray[object]Yes
data.accountRealTimeTypes[].balancenumber (20,2)Yes
data.accountRealTimeTypes[].accountTypestringYesmaxLength: 32
data.accountRealTimeTypes[].currencystringYesmaxLength: 3
data.inquiryTimestringYesmaxLength: 64in accordance with RFC3339 specification, format: yyyy-mm-dd’T’HH:mm:ss. SSSXXX
data.errorCodestringNomaxLength: 32
data.errorMsgstringNomaxLength: 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"
  }
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.