inquireBalance
Use the inquireBalance API to inquire about the balance information of the account on the Antom side.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
- If the data type of a field is Integer and its value is 20, set it as "20".
- If the data type of a field is Boolean and its value is true, set it as "true".
Request parameters
referenceMerchantId String
The unique ID that is assigned by the marketplace to identify the sub-merchant.
Specify this parameter if you inquire about the account balance of the sub-merchant. If you leave this parameter empty or do not specify this parameter, the default action is to inquire about the account balance of the marketplace.
More information:
- Maximum length: 32 characters
Response parameters
result Result REQUIRED
The result of the API call.
accountBalances Array <AccountBalance> REQUIRED
The list of balance accounts assigned by Alipay.
More information:
- Maximum length: 64 characters
API Explorer
Request
URL
Method
POST
{}Response
{
"accountBalances": [
{
"accountNo": "215911182100037000652271401986",
"availableBalance": {
"currency": "BRL",
"value": "14563"
},
"currency": "BRL",
"frozenBalance": {
"currency": "BRL",
"value": "11252060"
},
"totalBalance": {
"currency": "BRL",
"value": "11266623"
}
}
],
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
}
}Result process logic
For different API call results, different actions are to be performed. See the following instructions to handle the API call result:
- If the value of result.resultStatus is S, the inquiry succeeds.
- If the value of result.resultStatus is F, the inquiry failed. See the returned error code and determine further actions.
- If no response is returned, use the same request parameters to retry the inquiry request. If you continue to receive no result after retrying the request, contact Antom Technical Support.
Result/Error codes
| Code | Value | Message | Further action |
|---|---|---|---|
| SUCCESS | S | Success | The consultation is successful. No further action is needed. |
| USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |
| UNKNOWN_EXCEPTION | U | An API call has failed, which is caused by unknown reasons. | Call the API again to resolve the issue. If not resolved, contact Antom Technical Support. |