Simulate transactions on issued cards
You can conduct end-to-end testing of your issuing integration by simulating card transactions on your Airwallex issued cards in the demo environment. The endpoints simulate the production behaviour of our payment networks.
Key simulation scenarios include:
- Authorization transaction including incremental auth, failed auth
- Capture transaction on an existing authorization including partial captures
- Authorization and capture in a single transaction
- Refunds and reversals
You can retrieve the simulated transactions via Get transactions for a single card API, Get single transaction API, and Get list of financial transactions API.
As a platform account, you can call the simulation APIs on behalf of a connected account using the x-on-behalf-of
header.
Prerequisites
- Obtain your access token API using your unique Client ID and API key. You must have your access token to make API calls.
- Set up your demo environment. See Integration checklist.
Simulate a capture
A capture transaction deducts funds specified in the request from your account balance in your multi-currency Wallet.
Successful capture
If the authorization has been approved (transaction status
: PENDING
), use Capture the transaction with the provided id API with the authorization transaction_id
from Step 2, to capture the full authorized funds. The captured amount will be deducted from your account balance in your multi-currency Wallet.
Partial capture
To capture only a partial amount of the authorized funds, specify an amount smaller than the full authorization amount in the transaction_amount
field.
Simulate refunds and reversals
Simulate refunds on previously approved captured transactions and reversals on pending authorizations.
Refund a transaction
You can simulate refunds on an approved capture transaction (status
:APPROVED
), either fully captured or partially captured.
Call Refund a transaction for the provided card API by providing the following fields:
card_id
orcard_number
: If both are provided,card_number
takes precedence.transaction_amount
: The amount to refund.transaction_currency
: Currency of the refund transaction. Can only be one of USD, AUD, GBP, EUR, CAD, JPY, HKD, CNY, SGD, NZD, CHFtransaction_id
: Optional. Identifies the transaction linked with the refund request to which refund must be issued. If not provided, an unlinked refund will be created.
The transaction object in the response is the same as Get single transaction API for the REFUND
type.
Reverse a transaction
You can simulate reversals on an approved authorization (status
:PENDING
).
Call Reverse a transaction with the provided id API by providing the following fields:
transaction_id
: Provide identifier of the authorization transaction to reverse as the request parameter.transaction_amount
: Optional. The amount to reverse for partial reversals. If not provided, the full amount will be reversed.