Balances
Different types of balances such as available and pending can be retrieved to reflect the present balances under your Airwallex account.
GET /api/v1/balances/currentGET /api/v1/balances/history
Get current balances
GET /api/v1/balances/current
Get available and pending balances for every currency
The type of account to query. Supported values: cash, yield, credit.
Account Type. One of: cash, yield, or credit
For account type CASH, Available balance. Customer deposits will be added to the available balance once processed, including any settled conversions bought in this currency
For account type CREDIT, the Available amount reflects the remaining credit you can use.
For account type YIELD, Total market value of all holdings.
Currency of the account balance
For account type CASH, amount that will become available once currency conversion(s) have been settled.
For account type YIELD, amount that will become available once Yield order(s) have been settled.
Prepayment balance. Amount of money that is held in your Airwallex account as collateral for future transfer/conversion.
For account type CASH only.
Reserved balance. Amount of money that is held in your Airwallex account.
For account type CASH, consist of pending outbound payment.
For account type CREDIT, consist of card transactions authorized but not yet captured.
For account type CASH, Total account balance (Available + Pending + Reserved).
For account type CREDIT, the total outstanding balance on the credit account. Negative sign indicates the amount owed.
For account type YIELD, Total market value of all holdings. Equal to available amount.
| Error status | Description |
|---|---|
| 401 | Possible errors: |
| 403 |
|
| 429 |
|
| 500 |
|
$curl --request GET \> --url 'https://api-demo.airwallex.com/api/v1/balances/current' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1[2 {3 "account_type": "cash",4 "available_amount": 100000,5 "currency": "AUD",6 "pending_amount": 50000,7 "prepayment_amount": 0,8 "reserved_amount": 0,9 "total_amount": 15000010 }11]
Get balance history
GET /api/v1/balances/history
Get balance history for an account based on the transaction currency. The response contains records where each record represents a change to the balance. You can filter results using the date range parameters, from_post_at and to_post_at, representing the time the balance change occurred in your Wallet. The date range should be within 7 days when using page_num to paginate through history. Alternatively, you can paginate using the page parameter to retrieve either the previous page or the next page of results.
The type of account to query. Supported values: cash, yield, credit.
The transaction currency in 3-letter ISO-4217 format.
The start date (inclusive) of the date range during which balance activity occurred in your Wallet. Specify the date in ISO8601 format. If not specified, from_post_at defaults to 7 days before to_post_at.
A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call.
To retrieve the next page of results, pass the value of page_after (if not null) from the response to a subsequent call.
To retrieve the previous page of results, pass the value of page_before (if not null) from the response to a subsequent call.
Passing page=0 will override the 7 day default for null date ranges, enabling a complete search of the Wallet balance records.
The page number of the page to be retrieved. Page numbers range from 0 to a maximum value of 10000.
A limit on the number of records to be returned on a page, between 10 and 2000. The default is 100.
request_id from clients for the transaction
The end date (exclusive) of the date range during which the balance activity occurred in your Wallet. Specify the date in ISO8601 format. Defaults to today if neither this field nor from_post_at are specified. If from_post_at is specified, then to_post_at defaults to 7 days after the from_post_at date.
A flag which identifies whether there are more results in forward direction.
List items
Account Type. One of: cash, yield, or credit
The amount of this balance change
The balance after this balance change occurred.
For account type CASH and YIELD, tracks spendable amount.
For account type CREDIT, tracks utilized credit balance.
The currency of this balance change
The description for this balance change
The fee amount occurred with same currency, the account who paid this fee will receive this field
The Unique identifier of the balance activity
The time this change posted to balance
The unique identifier of the source transaction
The original transaction type. One of: DEPOSIT, CONVERSION, PAYMENT, CHARGE, TRANSFER, ADJUSTMENT, FEE, ISSUING, PAYMENT_SETTLEMENT, PAYMENT_RESERVE, PAYMENT_REFUND, PAYMENT_REFUND_FAILED, DIRECT_DEBIT, PAYOUT, PURCHASE, BATCH_PAYOUT, YIELD, REPAYMENT, WITHHOLDING_TAX
The transaction type of the balance history. One of: PAYMENT, PRE_CHARGEBACK_ACCEPTED, REFUND_CHARGEBACK_RECEIVED, REFUND_CHARGEBACK_WITHDRAWN, SECOND_CAPTURE_WITHDRAWN, DISPUTE, SECOND_DISPUTE, DISPUTE_REVERSAL, DISPUTE_LOST, DISPUTE_WON, REFUND, REFUND_REVERSAL, REFUND_FAILURE, PAYMENT_RESERVE_HOLD, PAYMENT_RESERVE_RELEASE, PAYOUT, PAYOUT_FAILURE, PAYOUT_REVERSAL, CONVERSION_SELL, CONVERSION_BUY, CONVERSION_REVERSAL, DEPOSIT, DEPOSIT_REVERSAL, ADJUSTMENT, FEE, DD_CREDIT, DD_DEBIT, DC_CREDIT, DC_DEBIT, DC_DEBIT_REVERSAL, ISSUING_AUTHORISATION_HOLD, ISSUING_AUTHORISATION_RELEASE, ISSUING_CAPTURE, ISSUING_REFUND, SPLIT, SPLIT_REVERSAL, LENDER_FUNDS_BORROWED, LENDER_FUNDS_RETURNED, DIRECT_DEBIT, DIRECT_DEBIT_REVERSAL, HOLD, HOLD_RELEASE, RETURN_TO_FUNDING_SOURCE, PURCHASE, PURCHASE_REVERSAL, TRANSFER, PREPAYMENT, PREPAYMENT_RELEASE, REPAYMENT_DEDUCTION, REPAYMENT_FUNDING, TRANSFER_OUT, TRANSFER_IN, TRANSFER_OUT_REVERSAL, TRANSFER_IN_REVERSAL, WITHHOLDING_TAX, WITHHOLDING_TAX_REVERSAL, null
A bookmark for use in pagination to retrieve the next page of results. Provide this identifier in the page request parameter in a subsequent call to retrieve the next page of results. The value will be null for the last page.
A bookmark for use in pagination to retrieve the previous page of results. Provide this identifier in the page request parameter in a subsequent call to retrieve the previous page of results. The value will be null for the first page.
| Error status | Description |
|---|---|
| 400 | Possible errors: |
| 401 | Possible errors: |
| 403 |
|
| 404 |
|
| 500 |
|
$curl --request GET \> --url 'https://api-demo.airwallex.com/api/v1/balances/history' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "has_more": true,3 "items": [4 {5 "account_type": "cash",6 "amount": 50,7 "balance": 1050,8 "currency": "AUD",9 "description": "Pay AUD 50.00",10 "fee": 25,11 "id": "0197f322-6667-7d76-b848-bfccedb2a97e",12 "posted_at": "2017-04-01T03:52:34+0800",13 "source": "a08c0f2f-3f26-4443-b5df-fad15582eb94",14 "source_type": "CONVERSION",15 "transaction_type": "CONVERSION_BUY"16 }17 ],18 "page_after": "Nzc5OTlmN2MtZjVhYi0zMWI2LTlmMGMtYzA1NWRkNzY5Mzk0OkFGVEVS",19 "page_before": "NzY5NmZjMmYtOWExMS0zN2Y0LWJkMWUtYWM1YzdjODQ5ZDg1OkJFRk9SRQ=="20}