Simulate Airwallex Pay deposits
You can conduct unit and end-to-end testing of your integration using Create a new transfer API. Please note that you will need 2 accounts to conduct testing as you are not allowed to make a transfer via Airwallex Pay to your own account.
Key test scenarios include:
- Triggering webhook event notifications for Deposits
- Viewing deposits in the Wallet activity page on the Airwallex web app
- Retrieving deposits via Get a list of deposits API, Get list of financial transactions API, and Get balance history API
- Calling Deposit endpoints on behalf of connected accounts by specifying an open ID in the x-on-behalf-of header
Step 1: Obtain your access token
Use obtain access token API to obtain an access token to call our API endpoints.
Example request
Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/authentication/login \2 -H 'Content-Type: application/json' \3 -H 'x-client-id: {{CLIENT_ID}}' \4 -H 'x-api-key: {{API_KEY}}' \5 -H 'Authorization: Bearer {{ACCESS_TOKEN}}'
Example response
JSON
1{2 "expires_at": "2022-02-22T06:48:39+0000",3 "token": "[jwt_token]"4}
Step 2: Locate your Airwallex Pay account information
You can find your account wallet information via Retrieve account wallet information API.
Example request
Shell
1curl -G https://api-demo.airwallex.com/api/v1/account/wallet_info \2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}'
Step 3: Create a transfer
Using another account, create a transfer by calling Create a new transfer API. See more details in Create a transfer.
Was this page helpful?