Log inGet started
Airwallex logo
Home
Online Payments
Treasury
Transactional FX
Payouts
Issuing
Scale
Open Banking
Developer Tools
API Reference
Home
Developer Tools
Get started
Make your first no-code API callManage API keys
Event Simulations
Simulate deposits to your Global AccountSimulate payout status transitionSimulate connected account status transitionSimulate transactions on issued cards

Simulate transactions on issued cards

You can conduct end-to-end testing of your integration by simulating card transactions on your Airwallex issued cards in the demo environment.

Key test scenarios include:

As a platform account, you can call the simulation APIs on behalf of a connected account using the x-on-behalf-of header.

About the simulation endpoints

The simulation endpoints, namely Create a transaction for the provided card API and Capture the transaction with the provided id API emulate a dual message:

  • Authorize request where funds are reserved on the available balance. Create a transaction for the provided card API creates an authorization transaction to be approved or failed based on the authorization controls of your account. For example, if you set a spending limit of $100 on your account and you attempt to authorize $110, then this payment will fail. This endpoint simulates the production behaviour of our payment networks.
  • Capture request where funds equivalent to the authorized amount are deducted from your account balance in your multi-currency Wallet. Capture the transaction with the provided id API captures the transaction if the authorization is approved.

Step 1: Obtain your access token

Use obtain access token API to obtain an access token to call our API endpoints.

Example request

Shell

Example response

JSON

Step 2: Initiate Authorization

Use Create a transaction for the provided card API to simulate an authorization request by providing the following request parameters:

  • card_id or card_number: If both are provided, then card_id takes precedence.
  • transaction_amount: Transaction amount to be authorized, maximum amount is $9,999.99.
  • transaction_currency: Currency code, only including USD, AUD, GBP, EUR, CAD, JPY, HKD, CNY, SGD, NZD, and CHF.
  • merchant_category_code: A 4-digit Visa MCC .
  • auth_code: A 6-digit authorization code for transaction testing. If not provided, it is auto-generated.
  • merchant_info: Description of merchant with an exact string length of 43 characters. If not provided, defaults to ‘CARD_TX_GENERATOR TEST’.
Shell
Example request

The transaction will be approved or failed depending on the authorization controls. The response will return the transaction object similar to Get single transaction API.

JSON
Example response

Step 3: Capture authorized funds

If the authorization has been approved (status: APPROVED), use Capture the transaction with the provided id API with the authorization transaction_id from Step 2, to capture the authorized funds. The captured amount will be deducted from your account balance in your multi-currency Wallet.

Shell
Example request
JSON
Example response
On this page