Document Verification

Perform a Document Verification Job

Document Verification is exposed as a flow which performs the following high level steps:

  1. Displays instructions to the user

  2. Requests camera permissions (if not already granted)

  3. Performs Document Capture

  4. Performs Selfie Capture

  5. Submits the job to the Smile ID API

  6. Delivers the result back to the caller

The screen is exposed as a React Native view which you can incorporate into your app as follows:

 <SmileIDDocumentVerificationView
  allowAgentMode: false, // true if you need to use the secondary camera
  showInstructions: true, // show instructions before capture
  countryCode: '<country code>',
  documentType: '<document type>',
  captureBothSides: true, // true if capturing back and front of document
  allowGalleryUpload: false, //true if document can be uploaded from gallery
  onResult={(event) => {
    setResult(event.nativeEvent.result);
  }}
  />

On success, you will receive a JSON string following the structure:

{
  "selfieFile":  "<path to selfie file>",
  "documentFrontFile": "<path to document front file>",
  "documentBackFile":  null | "<path to document back file>",
  "jobStatusResponse": {
    "timestamp": "...",
    "jobComplete": true | false,
    "jobSuccess":  true | false,
    "code": "",
    "result": null | {
      "actions": {},
      "resultCode": "...",
      "resultText": "...",
      "smileJobId": "...",
      "partnerParams": {},
      "country": null | "...",
      "idType": null | "...",
      "idNumber": null | "...",
      "fullName":null | "...",
      "dob": null | "...",
      "gender": null | "...",
      "expirationDate": null | "...",
      "documentImageBase64":null | "...",
      "phoneNumber": null | "...",
      "phoneNumber2": null | "...",
      "address": null | "..."
    },
    "history": null | [],
    "imageLinks":  null | {
      "selfieImageUrl": "...",
      "error": "..."
    }
  }
}

Last updated