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
Shell1curl --location --request POST 'https://api-demo.airwallex.com/api/v1/authentication/login' \2--header 'Content-Type: application/json' \3--header 'x-client-id: [client_id]' \4--header 'x-api-key: [api_key]' \5--header 'Authorization: Bearer null' \6--data-raw ''
Example response
JSON1{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
Shell1curl --request GET \2--url 'https://api-demo.airwallex.com/api/v1/account/wallet_info' \3--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q'
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?