Query account balanceSignature required
Use this API to inquire the account balance.
Structure
A message consists of a header and body. For details, see the following sections.
Request header
Field | Required | Sample | Description |
Client-Id | Yes |
| For more information about these request header fields, see Request header. |
Signature | Yes |
| |
Content-Type | Yes |
| |
Request-Time | Yes |
| |
Connected-CustomerId | Conditional |
| Required when a partner manages a customer's account. |
Access-Token | Conditional |
| Required for OAUTH authorization. |
Request parameters
currencyList Array<String>
A list containing 3-character ISO-4217 currency codes representing the currency that the Partner queries.
When this parameter is not specified, this API returns the balance information of all currencies.
balanceTypes Array<String>
The type of account balances.
Customers can use different types of balances to manage their funds separately to meet specific business needs and achieve better risk control.
Valid values are:
NORMAL_BALANCE
: indicates the account balance (also known as the e-commerce balance).SAME_NAME_TOP_UP_BALANCE
: indicates the samename funds.
NORMAL_BALANCE
is the default value when this parameter is not specified.
Response parameters
result Result REQUIRED
Indicates the result of the API call.
responseId string REQUIRED
The unique ID that is assigned by WorldFirst to identify a response.
This filed is returned only if the value of result.resultStatus is
S
.
More information:
- Maximum length: 32 characters
accountBalances Array<AccountBalance> REQUIRED
A list of information about the Customer's account, which includes account number, account currency, account balances, etc.
This filed is returned only if the value of result.resultStatus is
S
.
Request
Response
Result processing logic
After calling the API, a response is returned. The possible responses for result.resultStatus are:
Result status | Description |
| This indicates the API call succeeded. |
| This indicates the API call failed. For more information on why the call failed, see result.resultCode tables. |
| This indicates the API call result is unknown. The partner can call this API again. |
System-related result codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | The service might be down, retry later. If the issue persists, contact our Technical Support Team. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If the issue persists, contact our Technical Support Team. |
OAUTH_FAIL | F | OAuth process failed. | Contact our Technical Support Team for detailed reasons. |
INVALID_API | F | The called API is invalid or not active. | Check whether the correct API is being called. |
INVALID_CLIENT | F | The client is invalid. | The Client ID does not exist or is invalid. |
INVALID_SIGNATURE | F | The signature is invalid. | Make sure the request is properly signed with a valid signature. |
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Ensure the HTTP method is |
Business-related result codes
Code | Value | Message | Further action |
---|---|---|---|
USER_NOT_EXIST | F | The user does not exist. | Retry with the correct user information. |
ACCOUNT_NOT_EXIST | F | Balance accounts does not exist. | Retry with the correct account information. |
SYSTEM_ERROR | F | System error. | Do not retry, and contact our Technical Support Team for more details. |
SERVICE_NOT_ALLOWED | F | Service not allowed | Retry with the correct information. If the issue persists, contact our Technical Support Team. |
CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Make sure the currency input is correct and try again. |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | Contact our Technical Support Team to check the status of your API contract. Make sure it is still valid and try again. |
AUTHORIZATION_NOT_EXIST | F | The authorization does not exist. | Make sure that the input is correct. If the issue persists, contact our Technical Support Team to verify the authorization status. |
ACCESS_TOKEN_EXPIRED | F | The access token expired. | Refresh token to get a new access token or contact out Technical Support Team to address it. |