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 demo environment.
Key simulation scenarios include:
- Transition the connected account into
ACTION_REQUIRED
,ACTIVE
,SUSPENDED
statuses. - 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 demo 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 intoACTIVE
andSUSPENDED
statuses when specified innext_status
.next_status
: This field specifies the next status the account status will transition to. The behavior is dependent on theforce
field- If
force
istrue
, i.e,empty then the account status will be forced intoACTIVE
andSUSPENDED
when specified innext_status
. - If
force
isfalse
then this API will not force these statuses.ACTION_REQUIRED
may simulated when (1) attempting to move the “next_status” toACTIVE
and (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_conditions
tofalse
when 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.