Retrieve your deposits
The Deposits APIAPI enables you to retrieve transaction details for deposits received into the Wallet via bank transfers to Global Accounts and direct debits from Linked Accounts.
If you are retrieving a bank transfer deposit, you can subscribe to Deposit webhook events to receive any deposit status transitions. See Bank transfer deposit statuses for more information.
Depending on the Global Account financial institution & payment method, the availability of deposit details (e.g. payer name, payer bank account number etc.) will vary.
Retrieve all deposits
You can retrieve deposits across all your Global Accounts using Get a list of depositsAPI. Specify the time period (from_created_date, to_created_date) 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.
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": "BANK_TRANSFER",7 "status": "PENDING",8 "created_at": "2017-03-20T14:00:01+1100",9 "currency": "AUD",10 "amount": 12794.27,11 "global_account_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",12 "payer": {13 "name": "Tester Smith",14 "country_code": "AU",15 "bank_account": {16 "type": "AU_BSB",17 "au_bsb": {18 "bsb": "063001",19 "account_number": "89098199202"20 },21 "name": "Tester Smith",22 "institution": {23 "swift_code": "ANZBNZ22",24 "name": "ANZ Bank Limited",25 "country_code": "AU"26 }27 }28 },29 "reference": "5487287788",30 "provider_transaction_id": "5487287788"31 },32 {33 "id": "67f687fe-dcf4-4462-92fa-20335301d9d8",34 "type": "BANK_TRANSFER",35 "status": "SETTLED",36 "created_at": "2017-03-20T14:00:01+1100",37 "currency": "AUD",38 "amount": 12794.27,39 "settled_at": "2017-03-22T14:00:00+0000",40 "global_account_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",41 "payer": {42 "name": "Tester Smith",43 "country_code": "AU",44 "bank_account": {45 "type": "AU_BSB",46 "au_bsb": {47 "bsb": "063001",48 "account_number": "89098199202"49 },50 "name": "Tester Smith",51 "institution": {52 "swift_code": "ANZBNZ22",53 "name": "ANZ Bank Limited",54 "country_code": "AU"55 }56 }57 },58 "reference": "5487287788",59 "provider_transaction_id": "5487287788",60 "fee": {61 "currency": "AUD",62 "amount": 12.7963 }64 }65 ]66}
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": "BANK_TRANSFER",4 "status": "PENDING",5 "created_at": "2017-03-20T14:00:01+1100",6 "currency": "AUD",7 "amount": 12794.27,8 "global_account_id": "fcfc369c-ce9d-4ab7-b9af-80df61848f8f",9 "payer": {10 "name": "Tester Smith",11 "country_code": "AU",12 "bank_account": {13 "type": "AU_BSB",14 "au_bsb": {15 "bsb": "063001",16 "account_number": "89098199202"17 },18 "name": "Tester Smith",19 "institution": {20 "swift_code": "ANZBNZ22",21 "name": "ANZ Bank Limited",22 "country_code": "AU"23 }24 }25 },26 "reference": "5487287788",27 "provider_transaction_id": "5487287788"28}
Conditional details under bank_account object
For a bank transfer deposit, the payer's details may vary depending on factors such as the country and transfer method (Local Clearing System or SWIFT) of the deposit received. Consequently, different objects under the bank_account section will include payer bank account details parsed from the available data.
The table below summarizes each possible conditional nested object under bank_account in the Get a deposit by IDAPI & Get a list of depositsAPI responses.
Conditional nested object under bank_account * | Description |
|---|---|
Country-specific objects (i.e au_bsb, cn_cnaps_code, gb_sort_code, etc.) | Country-specific routing code and account number for a deposit received via local clearing system |
iban | IBAN information on this deposit received via local clearing system (e.g. SEPA) and SWIFT |
swift_code | SWIFT code and account number information on this deposit received via local clearing system and SWIFT |
partial | Only partial bank account information is available on this deposit |
* The nested objects are mutually exclusive