Frontend Integration(H5)

client needs to embed our H5 Frontend or Flutter SDK Frontend into your APP first.

How To Integrate

1. Open URL in WebView

After calling the Generate URL API, there will be a url in the response body, and the App needs to open the URL in WebView.

When the verification flow finishes, the frontend redirects to either returnUrl or failReturnUrl. These redirect targets can be standard web URLs such as https://... or custom app schemes such as myapp://.... For the complete validation rules and callbackUrl restrictions, refer to Redirect URL Requirements.

2. Give Camera Permission

Refer to Camera Permission (H5)


Iframe Integration Guide

Refer to Iframe Integration (H5)

Error Handling

When an exception occurs blocking the process on the frontend, the frontend will be redirected to the failReturnUrl, carrying the errorCode=XXX, where the errorCode is one of the following enumerated values.

failReturnUrl can be a web URL or a custom app scheme. Make sure your application can handle the target URL directly.

errorCodeDescription
BROWSER_ISSUENot supported due to compatibility issues
DOCUMENT_AUTO_SCAN_TRY_COUNT_EXCEEDDocument auto-scan try count exceeded the limit
DOCUMENT_MANUAL_TRY_COUNT_EXCEEDDocument manual photo try count exceeded the limit
NO_PERMISSIONNo camera permission
CAMERA_ISSUECamera issue error
RESELECT_DOC_TYPEUser clicked to reselect document type
RESELECT_REGIONUser clicked to reselect region
LIVENESS_TRY_COUNT_EXCEEDLiveness detection try count exceeded the limit
NOT_SUPPORTBrowser not supported
LIVENESS_ATTACK

The liveness detection result < 50.0.

whenignoreFailWhenJump set to true, will jump to returnUrl instead.

SIMILARITY_FAILEDThe faceSimilarityScore < 70.0.
whenignoreFailWhenJump set to true, will jump to returnUrl instead.
NO_SUPPORTED_CARDThe card type detected from the document image is not supported.
NO_SUPPORTED_CARD_CUSTOMIZEDThe card type is known but not supported currently. maybe support in the future.

Compatible Matrices

Supported browsers

Minimal browser versions with support for all features required by H5 Document Verification.

ChromeSafariEdgeOperaiOS SafariAndroid BrowserChrome for AndroidInternet Explorer
96159382158196Not supported

Sources:caniuse and WebAssembly Roadmap

Others