Retrieve your deposits
The Deposits APIAPI enables you to retrieve transaction details for deposits settled into your Wallet via direct debits from Linked Accounts and bank transfers to Global Accounts.
If you are retrieving a direct debit deposit, you can subscribe to Deposit webhook events to receive any deposit status transitions. See Direct debit deposit statuses for more information.
Depending on the Global Account financial institution & payment method, the availability of deposit details (for example, payer name, payer bank account number etc.) will vary.
Retrieve all deposits
You can retrieve deposits across all your Linked Accounts using Get a list of depositsAPI. Specify the time period (from_created_at, to_created_at) and the pagination parameters (page_num, page_size) to refine the results. If the time period is left unspecified or only the end date is specified, then deposits 30 days in arrears of today or the end date will be returned.
When both from_created_at and to_created_at are specified, the maximum date range between them is 31 days. Requests that exceed this window return 400 time_range_exceed. To retrieve deposits over a longer period, split the range into multiple requests, each covering at most 31 days.
Example request
1curl -G https://api.sandbox.airwallex.com/api/v1/deposits \2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \3 --data-urlencode 'from_created_at=2017-03-19' \4 --data-urlencode 'page_num=0' \5 --data-urlencode 'page_size=100' \6 --data-urlencode 'to_created_at=2017-03-22T03:52:34+0000'
If you are registered as a platform account, you can call this endpoint on behalf of your connected accounts by specifying the open ID in the x-on-behalf-of header.
Example response
1{2 "has_more": false,3 "items": [4 {5 "id": "67f687fe-dcf4-4462-92fa-20335301d9d8",6 "type": "DIRECT_DEBIT",7 "status": "SETTLED",8 "created_at": "2017-03-20T14:00:01+1100",9 "currency": "AUD",10 "amount": 12794.27,11 "settled_at": "2017-03-22T14:00:00+0000",12 "funding_source_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",13 "reference": "5487287788",14 "provider_transaction_id": "5487287788",15 "fee": {16 "currency": "AUD",17 "amount": 12.7918 }19 },20 {21 "id": "67f687fe-dcf4-4462-92fa-20335301d9d8",22 "type": "DIRECT_DEBIT",23 "status": "REVERSED",24 "created_at": "2017-03-20T14:00:01+1100",25 "currency": "AUD",26 "amount": 12794.27,27 "failure_details": {28 "code": "refer_to_payer",29 "iso_code": "NARR",30 "provider_failure_details": {31 "code": "006",32 "local_clearing_system": "AU_BECS",33 "message": "refer to payer"34 }35 },36 "funding_source_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",37 "reference": "5487287788",38 "provider_transaction_id": "5487287788"39 }40 ]41}
Retrieve details of a deposit
If you want to retrieve details of a specific deposit, call Get a deposit by IDAPI by specifying the unique identifier for the deposit in the endpoint URL. You can retrieve the transaction_id from Get a list of depositsAPI.
Example request
1curl -G https://api.sandbox.airwallex.com/api/v1/deposits/{{DEPOSIT_ID}} \2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}'
If you are registered as a platform account, you can call this endpoint on behalf of your connected accounts by specifying the open ID in the x-on-behalf-of header.
Example response
1{2 "id": "67f687fe-dcf4-4462-92fa-20335301d9d8",3 "type": "DIRECT_DEBIT",4 "status": "SETTLED",5 "created_at": "2017-03-20T14:00:01+1100",6 "currency": "AUD",7 "amount": 12794.27,8 "settled_at": "2017-03-22T14:00:00+0000",9 "funding_source_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",10 "reference": "5487287788",11 "provider_transaction_id": "5487287788",12 "fee": {13 "currency": "AUD",14 "amount": 12.7915 }16}