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

  1. Scan the document.
  2. Identify the document type, and make sure that it is a supported document
  3. If the document supports NFC, and the mobile device has an NFC reader, then do an NFC scan of the document
  4. Check the authenticity of the document
  5. Extract data from the document from the different sources applicable for that document – Visual (OCR), Barcode, MRZ (Machine Readable Zone), NFC.
  6. Extract graphical elements from the document
  7. Display the various information to the user and ask them to confirm that it is okay to proceed (options: Proceed / Recapture)
  8. 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

  1. SDK triggers getIDVDocumentScanProcessStartConfirmation
  2. App shows user instruction message
  3. User taps "Start"
  4. App calls setIDVDocumentScanProcessStartConfirmation(true, idvWorkflow)
  5. Document scan interface is launched by SDK
  6. After a successful document scan, the SDK will trigger the next event:
  7. 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