POST
Query account balance
RestrictedUse this endpoint to retrieve the account balance breakdown for a specified currency, including Payment, Funding, pending settlement, on-hold, risk deposit, and total balances.
Restricted access
Access to the Account service APIs is enabled by Onerway approval.
Request
apikeyAccount service API key request header assigned by Onerway. Use the value for the same environment as the request base URL.
Example:
replace_with_account_service_apikeyx-timestampRequest timestamp. The gateway uses it to identify replay attempts.
Example:
1776931200Constraints
- Rule
- The timestamp must be within 10 minutes of the server time. Both 10-digit seconds and 13-digit milliseconds are accepted.
requestIdRequest ID used for idempotency control and request tracing.
Example:
REQ-BAL-20260423-0001onBehalfOfSub-merchant number when a platform merchant queries on behalf of its sub-merchant. The caller merchant from
apikey must be the parent merchant.Example:
replace_with_sub_merchant_nocurl -X POST 'https://sandbox-api.onerway.com/account-server/api/v2/account/balance/query' \
-H 'Content-Type: application/json' \
--data-raw '{
"requestId": "REQ-BAL-20260423-0001",
"currency": "USD"
}'Response
respCodeStandardized response code.
20000 indicates a successful response.respMsgHuman-readable response message aligned with
respCode.data{ currency, paymentBalance, ... }Account balance details for the requested currency.
error{ code, declineCode, ... }Standardized error object. It is null for successful responses and omitted from the JSON body.
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"currency": "USD",
"paymentBalance": "1500.00",
"fundingBalance": "1000.00",
"pendingSettlementBalance": "200.00",
"onHoldBalance": "100.00",
"riskDepositAmount": "200.00",
"totalBalance": "3000.00",
"status": "Active"
}
}No error responses are documented for this endpoint.