Proactively triggering ID collection
Hosted onboarding integration for liveness check is recommended when a platform wants to proactively trigger a hosted liveness flow before threshold limits are hit. For more information, see Deferred identity verification.
Before you begin
- Your connected accounts must be onboarded to your platform using the Native API integration.
- You must have an access token to make API calls. See Obtain your access token API.
- Deferred identity verification must be enabled for your platform account. Contact your Account Manager if it isn’t already enabled.
- You’ll need the template ID required to request the hosted onboarding instance. Contact your Account Manager to obtain it.
- You must be subscribed to RFI webhook events.
Step 1: Create connected accounts for customers
Create an account for each individual customer. Call Create an account API with the required fields and provide optional fields to support the application.
Step 2: Create a hosted flow instance
Call Create a hosted flow API with the account_id, return_url and template ID provided by Airwallex. Save the hosted flow id from the response to use in Step 3.
Step 3: Authorize the user into the hosted flow
Call Authorize hosted flow API to authorize the user to access a created hosted flow instance. A successful request will return a redirect url that the user must open to complete liveness verification. Store each response’s hosted flow ID for future reauthorization.
Step 4: Handle session timeouts and re-entry
If the user exits early or the session expires, re-authorize the same hosted flow ID to obtain a new authorization code. Redirect the shopper to the new URL from the reauthorization response so they can resume the liveness check.
Troubleshooting
| Error code | Description | Next step |
|---|---|---|
TOKEN_EXPIRED | The authorization code in use has expired. | Generate a new link by reauthorizing the hosted flow. |
UNAUTHORIZED | The call is not authorized for the requested action/account. | Verify the access token and assigned permissions. |
FLOW_INSTANCE_NOT_FOUND | No hosted flow exists for the provided ID. | Create a new hosted flow instance. |
ACTION_NOT_FOUND | The requested action is not available for that hosted flow. | This error is currently not surfaced. |
UNKNOWN | An unidentified error occurred. | Contact Airwallex support with the request ID. |