Search...
APIJSLog inGet started in sandbox
Airwallex logo
Home
Platform APIs
Connected Accounts
Accounts
Payments
Transactional FX
Payouts
Issuing
Back to home
OverviewAPI
SDKs
Sandbox environment
Sandbox environment overviewConnected accounts
Deposits
Linked Accounts
Simulate Linked Account and DD mandate status transition
Payments
Payouts
Issuing
Risk

Simulate Linked Account and DD mandate status transition

You can conduct end-to-end testing of your Linked Accounts integration by simulating status transitions in the sandbox environment. A Linked Account is a verified external financial account that is bound to an Airwallex account. You can set up direct debit mandates to directly pull funds from your Linked Account into your Airwallex account, so it can be used to fund payouts, card expenses, or wallet top-up. To learn more about creating direct debit mandates to Linked Accounts, see Linked Accounts.

Key simulation scenarios include:

  • Simulate accept or reject or cancel for a direct debit mandate
  • Simulate failed micro-deposit verification for a Linked Account

Transition mandate status

First, create a Linked Account by calling Create a Linked Account API and specify the preferred_verification_type as MICRO_DEPOSIT. You can provide mandate details during creation or later using Update a direct debit deposit mandate API.

Accept a mandate

Call Accept a mandate API by providing a Linked Account ID with status PROCESSING. A successful response will return HTTP status 200 OK and an empty body. The status of the mandate will transition to ACTIVE.

Reject a mandate

Call Reject a mandate API by providing a Linked Account ID with status PROCESSING. A successful response will return HTTP status 200 OK and an empty body. The status of the mandate will transition to INACTIVE.

Cancel a mandate

Call Cancel a mandate API by providing a Linked Account ID with status PROCESSING or ACTIVE. A successful response will return HTTP status 200 OK and an empty body. The status of the mandate will transition to INACTIVE.

Fail micro-deposit verification

A micro-deposit verification might fail because of invalid bank account information or if it's not supported by the clearing system. You can simulate failed verification (reason:VERIFICATION_FAILED) using incorrect amounts in Verify Linked Account with micro-deposits API. Note that 0.01 and 0.02 amounts will return a successful verification.

However, to simulate a failed verification with reason:MICRO_DEPOSIT_FAILED, call Fail micro-deposits verification API with a Linked Account ID in status REQUIRES_ACTION. A successful response will return true and transition the Linked Account status to FAILED and set the reason to MICRO_DEPOSIT_FAILED.

You can retrieve the Linked Account object using Get Linked Account API.

JSON

Troubleshooting

You might encounter the following errors when simulating Linked Account APIs.

Error scenario Error code Error response Recommended actions
Linked Account ID not found invalid_argument {
"code": "invalid_argument",
"source": "id",
"message": "Linked Account ${la_id} does not exist."
}
Provide a valid Linked Account ID.
Failed to transform the status due to an invalid state invalid_status_for_operation {
"code": "invalid_status_for_operation",
"source": "id",
"message": "Cannot perform the {accept | reject | cancel | fail_microdeposits} operation on the Linked Account in its current status"
}
Make sure the mandate and the Linked Account are in the correct status.
Was this page helpful?
On this page
  • Transition mandate status
  • Fail micro-deposit verification
  • Troubleshooting
Was this page helpful?