Onerway
POST

Query account balance

Restricted
Use 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

apikey
Account service API key request header assigned by Onerway. Use the value for the same environment as the request base URL.
Example:
x-timestamp
Request timestamp. The gateway uses it to identify replay attempts.
Example:
Constraints
Rule
The timestamp must be within 10 minutes of the server time. Both 10-digit seconds and 13-digit milliseconds are accepted.
requestId
Request ID used for idempotency control and request tracing.
Example:
onBehalfOf
Sub-merchant number when a platform merchant queries on behalf of its sub-merchant. The caller merchant from apikey must be the parent merchant.
Example:
currency
Account currency to query. Use a three-letter ISO 4217 currency code.
Example:

Request example

curl -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

respCode
Standardized response code. 20000 indicates a successful response.
respMsg
Human-readable response message aligned with respCode.
Account balance details for the requested currency.
Standardized error object. It is null for successful responses and omitted from the JSON body.

Response example

{
  "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.