Identity Document OCR

Sub-module for scanning and extracting (OCR) the text present on the KYC documents of the consumer, partner or business.

Scan & Extract

Important Security Update

Please Note: The URL provided should have one of the following extensions:

  • .jpeg
  • .png
  • .jpg
  • .pdf

Apart from having the correct extension, we check the MIME Type as well as the content if it corresponds to the permissible types.

Businesses can integrate with Decentro to extract information from a customer’s standard KYC document images as well as validate the same using the Validate APIs. The major benefit of this offering is that customers do not have to enter any information and business can just pre-fill the information from the document.

Decentro powers 2 flows here.
* Scan: This flow allows businesses to extract information from standard ID documents
* Scan & Verify: This flow allows businesses to extract information from standard ID documents as well as verify the same from the associated public repository

Documents Supported for OCR

Decentro supports the following documents for Scan & Extract.

  • PAN
  • Aadhaar
  • Driving License
  • Voter ID
  • Passport

Except for Aadhaar, all the documents mentioned above are supported in the Scan and Verify flow as well.

The platform using this API can configure the flows at an API level by setting kyc_validate = 1 in the API.

Currently, we support the following states for Driving License OCR:

  • Delhi
  • Karnataka
  • Madhya Pradesh
  • Rajasthan
  • Punjab
  • Bihar

Document Formats Supported for OCR

  • JPEG
  • PNG
  • JPG
  • PDF (1 Pager)
curl --location --request POST 'https://in.staging.decentro.tech/kyc/scan_extract/ocr' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_KYC_AND_OB_MODULE_SECRET>' \
--header 'Content-Type: multipart/form-data' \
--form 'reference_id="eefa-abs1-0001-8914"' \
--form 'document_type="pan"' \
--form 'consent="Y"' \
--form 'consent_purpose="for bank account purpose only"' \
--form 'document=@"/C:/Users/Dell/Downloads/pan_2.jpeg"' \
--form 'kyc_validate="1"'
{
  "ocrStatus": "SUCCESS",
  "status": "SUCCESS",
  "message": "Scan completed successfully.",
  "responseKey": "success_pan_ocr",
  "ocrResult": {
    "cardNo": "BNZPM2501F",
    "dateInfo": "16-07-1986",
    "dateType": "DOB",
    "fatherName": "DURAISAMY",
    "name": "D MANIKANDAN"
  },
  "kycStatus": "SUCCESS",
  "kycResult": {
    "idNumber": "BNZPM2501F",
    "idStatus": "VALID",
    "name": "DURAISAMY MANIKANDAN"
  },
  "responseCode": "S00000",
  "requestTimestamp": "2023-02-22 13:46:52.058236 IST (GMT +0530)",
  "responseTimestamp": "2023-02-22 13:46:54.289154 IST (GMT +0530)",
  "decentroTxnId": "DXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}

Fetch OCR History

Decentro provides the feature to access the History of OCR done for a specific period and the status of the check.

curl --location --request GET 'https://in.staging.decentro.tech/kyc/scan_extract/history?from=2020-01-01&to=2020-06-03' \
--header 'client_id: <YOUR_CLIENT_ID>' \
--header 'client_secret: <YOUR_CLIENT_SECRET>' \
--header 'module_secret: <YOUR_KYC_AND_OB_MODULE_SECRET>'
{
    "status": "success",
    "count": 5,
    "searchDateRange": "2020-01-01 - 2020-06-03",
    "responseKey": "success_ocr_history",
    "validations": [
        {
            "referenceId": "eefa-abs1-0001-0000",
            "validationDateTime": "2020-06-02 12:48:43",
            "entityType": "PERSON",
            "documentType": "PAN",
            "entityName": "<NAME>",
            "documentId": "<PAN_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "SUCCESS"
        },
        {
            "referenceId": "eefa-abs1-0001-0001",
            "validationDateTime": "2020-06-02 12:49:26",
            "entityType": "PERSON",
            "documentType": "PAN",
            "entityName": "<NAME>",
            "documentId": "<PAN_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0002",
            "validationDateTime": "2020-06-02 12:50:27",
            "entityType": "PERSON",
            "documentType": "DRIVING_LICENSE",
            "entityName": "<NAME>",
            "documentId": "<DL_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0003",
            "validationDateTime": "2020-06-02 12:51:46",
            "entityType": "PERSON",
            "documentType": "VOTERID",
            "entityName": "<NAME>",
            "documentId": "<EPIC_NO>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "FAILURE"
        },
        {
            "referenceId": "eefa-abs1-0001-0004",
            "validationDateTime": "2020-06-02 12:52:35",
            "entityType": "PERSON",
            "documentType": "AADHAAR",
            "entityName": "<NAME>",
            "documentId": "<AADHAAR_NUMBER>",
            "consentPurpose": "for bank account purpose only",
            "statusOfApiCall": "SUCCESS",
            "statusOfKycCheck": "SUCCESS"
        }
    ],
    "responseCode": "S00000",
    "requestTimestamp": "2020-06-02 12:55:01.136485",
    "responseTimestamp": "2020-06-02 12:55:01.201669"
    "decentroTxnId": "5296XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
}