Overview
The IDV (Identity Verification) flow uses camera-based document capture powered by Incode. The SDK handles the entire capture experience — the user points their camera at an ID document and the SDK automatically detects, captures, and processes it. This is the simplest embedded flow to implement. Modules used:idv, form (WELCOME, CONSENT, LOADING screens)
Instead of building from scratch, fork an existing flow from the public sample codes.
Flow Diagram
1
Welcome Screen
Initial greeting and introduction to the verification process.
2
Consent Screen
Capture user consent for data processing.
3
IDV Capture
The SDK renders camera capture UI for document scanning.
4
Processing
The SDK processes the captured document and runs verification checks.
5
Result
Your application receives the verification result and displays the outcome.
Full Implementation
- Vanilla HTML/JS
- React
Step-by-Step Breakdown
1. Initialize the SDK
Pass the session object toOneSDK(). Include the recipe.form.provider configuration since this flow uses form components for the WELCOME and CONSENT screens.
2. Add Welcome and Consent Screens
Create WELCOME and CONSENT form components to collect user consent before starting the IDV capture. Settype: "ocr" on the WELCOME screen. Consent must be collected before verification can proceed — without it, submission will fail.
3. Create the IDV Flow
Callsdk.flow("idv") to create the identity verification flow. This returns a component that manages the entire camera capture experience.
4. Wire Up Events
Listen for events:form:welcome:readyon welcome — user completed the welcome screen, mount consentform:consent:readyon consent — user gave consent, mount the IDV flowloadingon IDV — show/hide loading screen while IDV component initializes (before capture)detection_completeon IDV — document capture finished, show processing loading screenresultson IDV — processing complete,checkStatusindicates successerroron IDV — an error occurred during capture or processing
Unmount clears the container. Calling
.unmount() on a component removes all content from the element it was mounted to — not just the component itself. Loading screens in this flow are mounted to a separate overlay element (#loading-overlay) so that unmounting them does not destroy the IDV component underneath. See the IDV with Review flow for a detailed explanation.5. Handle Results
Whenresults fires with checkStatus: true, mount a loading screen then call sdk.individual().submit({ verify: true }) to trigger the verification check. The loading screen prevents a blank screen during the async submission.