Airwallex logo
Airwallex logo
Home
Developer Tools
Developer Tools
Back to home
OverviewAPI
SDKs
Sandbox environment
Sandbox environment overviewConnected accounts
Deposits
Simulate deposits to your Global Account
Linked Accounts
Payments
Payouts
Issuing
Risk

Simulate deposits to your Global Account

You can conduct unit and end-to-end testing of your integration using Create a Global Account deposit API. This sandbox simulation endpoint creates a production-like deposit to your Global Account in the sandbox environment only.

Key test scenarios include:

Prerequisites

Step 2: Retrieve the Global Account ID

Create a Global Account (if you haven't already opened one) through our open a Global Account API endpoint.

Get the Global Account ID (global_account_id) from the response or by calling get a list of Global Accounts API endpoint.

Example request

Shell
1curl --location --request GET 'https://api-demo.airwallex.com/api/v1/global_accounts' \
2--header 'Content-Type: application/json' \
3--header 'x-client-id: [client_id]' \
4--header 'x-api-key: [api_key]' \
5--header 'Authorization: Bearer [jwt_token]' \
6--data-raw ''

Example response

JSON
1{
2 "has_more": false,
3 "items": [
4 {
5 "id": "486b8317-9135-4399-81c9-9c5397365d0f",
6 "request_id": "713a042a-c820-42a5-8584-14b5a50f3e6e",
7 "account_number": "87535504221",
8 "account_name": "Alan API Test",
9 "institution_name": "Standard Chartered Bank (Hong Kong) Ltd",
10 "account_routing_type": "bank_code",
11 "account_routing_value": "003",
12 "swift_code": "SCBLHKHH",
13 "status": "ACTIVE",
14 "nick_name": "HKD Global Account 1",
15 "currency": "HKD",
16 "country_code": "HK",
17 "payment_methods": [
18 "SWIFT",
19 "LOCAL"
20 ],
21 "clearing_systems": [
22 "ACH",
23 "RTGS",
24 "FPS"
25 ],
26 "branch_code": "875"
27 }
28 ],
29 "total_count": 1
30}

Step 3: Simulate a deposit

Call the create a Global Account deposit API endpoint by specifying the global_account_id from step 2 and the deposit amount to simulate a production-like deposit.

Example request

Shell
1curl --request POST --url 'https://api-demo.airwallex.com/api/v1/simulation/deposit/create'
2--header 'Content-Type: application/json'
3--header 'Authorization: Bearer <your_bearer_token>'
4--data '{
5 "amount": 1000,
6 "global_account_id": "7f687fe6-dcf4-4462-92fa-80335301d9d2",
7 "payer_bankname": "Test bank",
8 "payer_country": "HK",
9 "payer_name": "1000",
10 "reference": "test",
11 "status": "PENDING"
12}'

Example response

JSON
1{
2 "amount": 10000,
3 "create_time": "2017-03-22T16:08:02+1100",
4 "currency": "AUD",
5 "deposit_type": "CREDIT",
6 "fee_amount": 10,
7 "fee_currency": {
8 "currency_code": "string",
9 "precision": 0,
10 "value": "string"
11 },
12 "id": "90b98dc6-63a0-403f-816b-ac5305b42a11",
13 "payer_country": "HK",
14 "payer_name": "AMZNnt70paD1",
15 "reference": "test",
16 "status": "PENDING"
17}
Was this page helpful?
On this page
Was this page helpful?