Document Scan
Overview
This guide outlines the integration process for triggering a document scan using a secured POST-login API. The flow involves user session validation, user consent, document capture, and extraction of document details using the REL-ID SDK.
If the document scan challenge (REL-ID-IDV-DocScan) has been configured at any stage, below are the steps the SDK will perform
- Scan the document.
- Identify the document type, and make sure that it is a supported document
- If the document supports NFC, and the mobile device has an NFC reader, then do an NFC scan of the document
- Check the authenticity of the document
- Extract data from the document from the different sources applicable for that document – Visual (OCR), Barcode, MRZ (Machine Readable Zone), NFC.
- Extract graphical elements from the document
- Display the various information to the user and ask them to confirm that it is okay to proceed (options: Proceed / Recapture)
- If user clicks on "Recapture", goes back to step 1: Scan the document
The document scan process is initiated by the REL-ID SDK by invoking the getIDVDocumentScanProcessStartConfirmation
event. The application must collect user consent and then trigger the actual scan via the setIDVDocumentScanProcessStartConfirmation
API.
🧪 Sample Flow
- SDK triggers
getIDVDocumentScanProcessStartConfirmation
- App shows user instruction message
- User taps "Start"
- App calls
setIDVDocumentScanProcessStartConfirmation(true, idvWorkflow)
- Document scan interface is launched by SDK
- After a successful document scan, the SDK will trigger the next event:
getIDVConfirmDocumentDetails
: Developer must display scanned details and confirm with user.
- Submit user confirmation with
setIDVConfirmDocumentDetails
flowchart TD Start([Start]) --> A[SDK triggers getIDVDocumentScanProcessStartConfirmation] A --> B[App shows user instruction message] B -->|User taps Start| D[App calls setIDVDocumentScanProcessStartConfirmation] D --> E[SDK launches document scan interface] E --> F[SDK triggers getIDVConfirmDocumentDetails] F --> G[App displays scanned document details] G -->|User Confirms| H[App calls setIDVConfirmDocumentDetails] style A fill:#d4fdd4,stroke:#228b22,stroke-width:2px style F fill:#d4fdd4,stroke:#228b22,stroke-width:2px style D fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px style H fill:#ffe4b3,stroke:#ff8c00,stroke-width:2px
🟩 Green - Callbacks issued by REL-ID SDK
🟧 Orange - APIs invoked by the Client App
Updated 3 months ago