Simulate connected account status transition
You can conduct unit and end-to-end testing of your connected account integration by simulating status transitions on your account. Transitioning an account through its lifecycle triggers all production scenarios in the sandbox environment.
Key simulation scenarios include:
- Transition the connected account into
ACTION_REQUIRED,ACTIVE,SUSPENDEDstatuses. - Submit the account for activation.
As a platform account, you can call the simulation APIs on behalf of a connected account using the x-on-behalf-of header.
Create a connected account
Call Create an account API to create a BUSINESS or INDIVIDUAL type of connected account. A successful response will return the status as CREATED.
Submit the account for activation
Submit the connected account for KYC review with submit connected account API. In the production environment our onboarding team will review the account through our KYC process. In the sandbox environment, this simulation endpoint will emulate this process.
Transition connected account status
Call Update Connected Account status API to transition the status to ACTIVE or SUSPENDED. Note that the account must be in the SUBMITTED status before calling this API.
The request body supports the following fields:
force: By default, this field is set totrue, and will force the account intoACTIVEandSUSPENDEDstatuses when specified innext_status.next_status: This field specifies the next status the account status will transition to. The behavior is dependent on theforcefield- If
forceistrue, i.e,empty then the account status will be forced intoACTIVEandSUSPENDEDwhen specified innext_status. - If
forceisfalsethen this API will not force these statuses.ACTION_REQUIREDmay simulated when (1) attempting to move the “next_status” toACTIVEand (2) at least one of the following conditions are met:- Connected account has not agreed to terms and conditions. Behaviour is simulated by setting
customer_agreements.agreed_to_terms_and_conditionstofalsewhen creating or updating an account. This applies to both individual and business accounts. - Identity file uploaded did not pass verification. Behaviour is simulated by providing an invalid file_id that cannot be validated when creating or updating an account. Use this file_id to simulate failed verification:
NTZiN2NkNWUtYmUxNC00NTE2LTllNGMtZTNjNzU0ZGU2ZmE1LHwsaG9uZ2tvbmcsfCxBaXJ3YWxsZXgtbG9nby5wbmdfMTY0Nzk5NTgwNTIzNw. This applies only to individual accounts. - Connected account owner has not approved the scale connection. If the platform account is configured to require this consent, contact your Airwallex Account Manager to help configure this scenario if you want to simulate it. This applies only to business accounts.
- Connected account has not agreed to terms and conditions. Behaviour is simulated by setting
- If
In the sample above, the user attempts to move the account into ACTIVE status. Since the user is not forcing the account into this status the account may be moved to “ACTION_REQUIRED” if more information is required from the account.
The response object will be the same as retrieve account details API.