Skip to main content

Overview

The OCR Only flow captures identity documents via camera and extracts structured data (name, date of birth, document number, etc.) without requiring biometric verification. This is useful when you need document data collection without facial matching — for example, collecting document details for a background check or credit application. Modules used: ocr, form (WELCOME, CONSENT, DOCUMENT, LOADING, RESULT screens)
Instead of building from scratch, fork an existing flow from the public sample codes.
Daon provider: Document selection and the documents parameter are not required when using the Daon provider — Daon provides its own document type selection screen. To use custom document selection instead of Daon’s built-in screen, contact your FrankieOne account team.

Flow Diagram

1

Welcome Screen

Initial greeting and introduction.
2

Consent Screen

Capture user consent for data processing.
3

Document Selection

User selects the type of document to capture.
4

OCR Capture

Camera-based document capture and automatic data extraction.
5

Result

Capture outcome displayed.

Full Implementation

Step-by-Step Breakdown

1. Initialize the SDK

Pass the session object to OneSDK(). Include the ocr and form.provider recipe configuration.

2. Configure Components

Create form components for the Welcome, Consent, Document, Loading, and Result screens. The ocr component is created dynamically after document selection.

3. Wire Up Events

Use .on(event) listeners to navigate through each step. A loading screen is shown on a separate overlay while the OCR component initializes. After OCR emits results, mount the result screen.

4. Handle Results

After the OCR component emits results with extracted document data, display the result screen. See Error Scenarios for failure handling.

Loading Screen

A loading screen is shown while the OCR component initializes. It is mounted to a separate overlay div so that unmount() does not clear the OCR component underneath.
Unmount clears the container. Calling .unmount() on a component removes all content from the element it was mounted to — not just the component itself. Always mount loading screens to a separate element when they need to overlay another component. See the IDV with Review flow for more details.

Document Type Configuration

Configure which document types are accepted for OCR capture:
See OCR Module for all supported document types and configuration options.

Extracted Data Handling

The OCR results event provides structured document data:

Customization Reference