Document Verification

Currently only available in Kenya and Tanzania. Other countries coming soon.

Overview

The Document Verification Product let's you verify the authenticity of Document IDs submitted by your users and confirm that the document actually belongs to the user by comparing the user's selfie to the photo on the Document ID.

Supported Documents

Currently, we only verify the document types listed below, more document types coming soon.

Country

Country Code

Smile ID Type Keyword

🇰🇪

Kenya

KE

ALIEN_CARD

Kenya

KE

NATIONAL_ID

Kenya

KE

PASSPORT

🇹🇿

Tanzania

TZ

NATIONAL_ID

Tanzania

TZ

PASSPORT

Tanzania

TZ

DRIVERS_LICENSE

Tanzania

TZ

VOTER_ID

Overview

The Document Verification product lets you verify:

  • the ID information of your user

  • that the ID actually belongs to the user

  • the ID card photo submitted by the user is authentic

Documentation verification is currently automatically performed if an ID card photo is submitted with an Enhanced KYC + SmartSelfie™ job in Kenya & Tanzania.

Integration Options

Available on Mobile, Server-to-Server libraries and Rest API.

Request Values

Using this product requires two steps:

  • Make a request to Smile Identity for a job to be performed

  • Upload the requirements for the job

Making a Job Request

Request Type: POST

Keys

Type

Required

Description

file_name

string

Yes

This is the name of the zip file that will be uploaded in the PUT request to the upload URL

signature

string

Yes

Your calculated access signature

timestamp

string

Yes

The timestamp that was used to calculate the sec_key (in ISO date/time format)

smile_client_id

string

Yes

This is your partner id which can be found on the side navigation panel of the Smile ID partner portal

partner_params

object

Yes

A JSON object containing the partner parameters below as well as any additional key value pairs you wish to include for tracking which will be returned in the response

{job_type

string

Yes

The type of job you want to perform. This will be set to "1".

job_id

string

Yes

A value generated by you, so you can track jobs on your end. This value must be unique, can be any string and can follow your identifier convention

user_id}

string

Yes

A value generated by you, so you can track users on your end. This value must be unique, can be any string and can follow your identifier convention.

model_parameters

string

No

This parameter is specific to mobile SDK, can be left as an empty JSON object

callback_url

string

No

An endpoint on the partner side where Smile ID will send the results of a job to in the form of a POST request (with no authorisation headers)

At the end of the request, you will receive a job number for tracking and a url where you will be uploading your images

Example Request

{
"file_name": "attachments.zip",
"signature": "<calculated signature>",
"timestamp": <timestamp e.g. 2021-08-12T17:57:00.614879>,
"smile_client_id": "<partner id>",
"partner_params":
{
"job_type": "1"
"job_id":"job_09876",
"user_id":"user_12345",
},
"model_parameters": {},
"callback_url": "https://<partner side callback URL>/"
}

In the response body to the prep upload request, you will receive an AWS s3 bucket link. You will upload the images for face verification to this link. The URL is structured like:

"https://smile-uploads-test.s3.us-west-2.amazonaws.com/videos/ <partner_id>/<partner_id>-<smile_job_id>-<random hash>/attachments.zip ?AWSAccessKeyId=<> &Content-Type=application%2Fzip &Expires=1598449184&Signature=<> &x-amz-security-token=<>&x-amz-server-side-encryption=AES256"

Example Response

200: OK

A record has now been created waiting for the job to be processed once the required data has been uploaded

{
"upload_url": "https://smile-uploads-test.s3.us-west-2.amazonaws.com/videos/<partner_id>/<partner_id>-<smile_job_id>-<random hash>/selfie.zip?AWSAccessKeyId=<>&Content-Type=application%2Fzip&Expires=1598449184&Signature=<>&x-amz-security-token=<>&x-amz-server-side-encryption=AES256",
"ref_id": "<partner_id>-<smile_job_id>-<random hash>",
"smile_job_id": "0000000001",
"camera_config": "null", ---sdk specific---
"code": "2202"
}

400: Bad Request

Trying to use a job_id in partner_params that has already been used

{
"error": "Job already exists. Did you mean to set the retry flag to true?",
"code": "2215"
}

Uploading the Job Requirements

To perform a job, Smile ID requires a Zip file that contains the following information:

  • images - images are Selfie and/or ID card photo and/or liveness images

  • Info.json file - the structure of the info.json file is detailed below

Request Type: PUT

Environment

URL

Sandbox

Upload URL you were supplied while making a Job Request

Production

Upload URL you were supplied while making a Job Request

The request body will be of type binary (the zip file)

Info.json file

Parameter

Description

package_information

just use the example below

id_info

to view the list of required fields per id type see supported ID types

images

not used if files are uploaded. for image list structure, read more on Smile ID image types

in an image item all 3 parameters will exist: {

"image_type_id": 2,

"image": "<base64 string of image>",

"file_name": "<name of file in the zip that will be uploaded>"

}

Depending on the image_type_id one of the other parameters will be an empty string (“”)

Info.json Example

{
"package_information":
{
"apiVersion": {
"buildNumber": 0,
"majorVersion": 2,
"minorVersion": 0
}
},
"id_info":
{
"dob":"<dob in ID type specific format>",
"country":"<country code e.g. KE>",
"entered":true <job type 1> | false,
"id_type":"smile ID type keyword e.g. NATIONAL_ID",
"id_number":"00000000",
"last_name":"Leo",
"first_name":"Doe",
"middle_name":"Joe"
},
"images": [
{
<use either image or file_name, both cannot be used at the same time>
"image_type_id": <0 | 2>,
"image": "<base64 string of image>",
"file_name": "<name of file in the zip that will be uploaded>"
}
{
<use either image or file_name, both cannot be used at the same time>
"image_type_id": <1 | 3>,
"image": "<base64 string of image>",
"file_name": "<name of file in the zip that will be uploaded>"
}
]
}

Enhanced KYC + SmartSelfie™ with Document Verification vs Enhanced KYC + SmartSelfie™ without Document Verification

For Enhanced KYC + SmartSelfie™ where Document Verification is performed, an invalid/unauthentic ID card will result in job failure. Currently only Enhanced KYC + SmartSelfie™ performed in Kenya and Tanzania (with ID card photo submitted) will trigger Document Verification. Enhanced KYC + SmartSelfie™ where Document Verification is not performed, the job processing and result remains the same.

How Smile ID Processes the Job

Action

Kenya

Tanzania

ID lookup in ID authority database

ID information is queried in ID authority database

Not Available

Proof of life & spoof detection

Performed on user submitted selfie

Performed on user submitted selfie

Selfie compares

If photo is available in ID authority database, Selfie is compared to photo on file else Selfie is compared to user submitted ID card photo

Selfie is compared to user submitted ID card photo

Document Verification

Compare PII in ID authority

database against information on user submitted ID card

Ensure ID card is not expired, visually tampered with, blurry/unreadable, invalid (e.g. work ID card), etc.

Compare user submitted details against information on user submitted ID card

Ensure ID card is not expired, visually tampered with, blurry/unreadable, invalid (e.g. work ID card), etc.

Return Values (Explain what Actions are, make content usable)

The full list of keys and possible return values are highlighted below:

Name

Type

Description

Return Values

ConfidenceValue

String

Smile ID’s confidence that the user should be registered. Values are between 0% - 100%

0% - 100%

PartnerParams.job_id

String

A unique reference defined by you to keep track of the job

PartnerParams.job_type

String

The type of job you performed.

“1”

PartnerParams.user_id

String

A unique reference defined by you to keep track of the user

ResultCode

String

Numeric value of the job outcome.

For a list of potential error codes see here.

ResultText

String

Textual value of the job outcome. Human readable value for the result.

List of all result text is listed here.

SmileJobID

String

The Smile internal reference number for the job

Actions

Object

The JSON object contains the results of checks Smile ID performed on the job

{Human_Review_Compare

String

If the Smile ID system can not automatically decide on the face compares it will be reviewed by humans and the result will be displayed here

“Passed”

“Failed”

“Unable to Determine”

“Not Applicable”

Human_Review_ID_Card_Validation

String

Human review for validation of user submitted ID card

“Completed”

“Under Review”

“Not Applicable”

Human_Review_Liveness_Check

String

If the Smile ID system can not automatically decide on the liveness of the user submitted selfie, it will reviewed by humans. The result is displayed here

“Passed”

“Failed”

“Unable To Determine”

“Not Applicable”

Liveness_Check

String

Liveness check on user provided selfie

“Passed”

“Failed”

“Under Review”

“Not Applicable”

Register_Selfie

String

Register selfie of user

“Approved”

“Rejected”

“Provisionally Approved”

“Not Applicable”

Return_Personal_Info

String

Return user’s PII from ID authority

“Returned”

“Not Returned”

“Not Applicable”

Selfie_Provided

String

User provided a usable selfie

Selfie_To_ID_Authority_Compare

String

Compare user submitted selfie to government ID authority photo

“Completed”

“Under Review”

“ID Authority Photo Not Available”

“Not Applicable”

Selfie_To_ID_Card_Compare

String

Compare user submitted selfie to user submitted ID card photo

“Completed”

“Under Review”

“Not Applicable”

Validate_ID_Card

String

Validation of user submitted ID card

“Passed”

“Failed”

“Under Review”

“Not Applicable”

Verify_ID_Number

String

Query ID number in the ID authority database

“Verified”

“Not Verified”

“Issuer Unavailable”

“Not Applicable”

dob

String

Compare date of birth on user submitted ID card against date of birth in ID authority database (or date of birth submitted by user if ID authority access is unavailable)

“Correct”

“Incorrect”

“Invalid”

id_number

String

Compare ID number on user submitted ID card against ID number submitted by user

“Correct”

“Incorrect”

“Invalid”

id_type

String

Compare user submitted ID card type against ID type submitted by user

“Correct”

“Incorrect”

name

String

Compare names on user submitted ID card against names in ID authority database (or names submitted by user if ID authority access is unavailable)

“Correct”

“Misspelt”

“Mismatch”

“Invalid”

serial}

String

Compare Serial on user submitted ID card against Serial in ID authority database (or Serial submitted by user if ID authority access is unavailable)

“Correct”

“Incorrect”

“Invalid”

Example JSON Response

{
"Actions": {
"Human_Review_Compare": "Passed",
"Human_Review_ID_Card_Validation": "Completed",
"Human_Review_Liveness_Check": "Passed",
"Human_Review_Update_Selfie": "Not Applicable",
"Liveness_Check": "Passed",
"Register_Selfie": "Approved",
"Return_Personal_Info": "Returned",
"Selfie_Provided": "Passed",
"Selfie_To_ID_Authority_Compare": "Completed",
"Selfie_To_ID_Card_Compare": "Not Applicable",
"Selfie_To_Registered_Selfie_Compare": "Not Applicable",
"Update_Registered_Selfie_On_File": "Not Applicable",
"Validate_ID_Card": "Passed",
"Verify_ID_Number": "Verified",
"dob": "correct",
"id_number": "correct",
"id_type": "correct",
"name": "correct",
"serial": "correct"
},
"ConfidenceValue": "99.000000",
"PartnerParams": {
"job_id": "KE_TEST_100",
"job_type": "1",
"user_id": "KE_TESTTEST_100"
},
"ResultCode": "1210",
"ResultText": "Enroll User",
"SmileJobID": "0000056574",
"Source": "WebAPI",
"timestamp": "2021-05-06T08:48:50.763Z",
"signature": "..."
}

Evaluating the Results

Actions performed on the product are not completed at the same time, so we send results to your callback as they are ready. Also, if the Smile ID system can not automatically make a decision on an action it is passed to human reviewers, the system decision is sent via callback pending the time the reviewers make a final decision.

You can get the results of the job anytime by using the Job Status endpoint. Read more about the Job Status endpoint in the Utilities section of any integration option of your choice.

Result Codes and Result Texts

Result codes details what the current (or final) result of a job is. Result Codes for all jobs fall into one of three categories:

  1. Approved (or Pass) This means that all applicable Actions passed and the overall job was approved.

  2. Provisionally Approved This means that the job is awaiting a human review, or that a human review was inconclusive or that part of a job passed but another part was unable to be completed. You can treat these jobs as Approved or you handle them based on the Result Code. Please note a Pure Provisional result is a provisionally approved job, but one in which the image comparison Action was provisionally approved but the identity validation Action failed or could not return data. Also note, a Pending Approval result is a custom Strict setting where the user cannot progress in the system without a human review being completed on the Pending job.

  3. Rejected (or Fail) This means that one or more of the applicable Actions for job failed, and thus, the overall job was rejected according to Smile Identity standards.

General Failures Result Codes and Texts

This means no further processing is possible on the job. General failures occur when a job could not be submitted due to a logical/technical issue. These jobs do not show up in the portal and do not have a Smile Job ID.

Code

Text

Category

0001

Data Invalid

Rejected

0903

Zip Corrupt

Rejected

0907

FAIL - Possible Spoof - Strict Setting

Rejected

2405

Error - "You are not authorized to do that" *

-

2314

Error - No Zip File Received

-

2203

Error - Invalid JSON

-

2213

Error - A required parameter is missing

-

2204

Error - A parameter is of the wrong data type

-

2205

Error - You are not authorized to do that. *

-

2220

Error - Production is not enabled for this account. Please complete your KYC with Smile Identity.

-

2212

Error - Invalid job type **

-

2215

Error - Job already exists for job_id

-

* - read more on how to troubleshoot this error here ** - set Job Type to "1"

Product Specific Result Codes and Texts

Code

Text

Category

0911

No Face Found

Rejected

0912

Image Quality Judged Too Poor

Rejected

0810

Machine Judgement - PASS

Approved

0811

Machine Judgement - FAIL - Compare Rejected

Rejected

0812

Machine Judgement - Pure Provisional

Provisionally Approved

0813

Machine Judgement - FAIL, Possible Spoof - Settings Based on Normal/Strict/Custom

Rejected

0814

Machine Judgement - Provisional - Possible Spoof

Provisionally Approved

0815

Machine Judgement - Provisional - Compare Unsure

Provisionally Approved

1210

Human Judgement - PASS - Settings Based on Normal/Strict/Custom

Approved

1211

Human Judgement - FAIL - Human Compare Failed

Rejected

1212

Human Judgement - Spoof Detected

Rejected

1213

Human Judgement - Provisional - Liveliness Unsure

Provisionally Approved

1214

Human Judgement - FAIL - ID Card Validation Failed

Rejected

1012

ID Verification Success

Provisionally Approved

1013

Invalid ID

Rejected

1014

Unsupported ID number format

Rejected

1015

Error - Queried Database Unavailable *

Processing Continues with ID Card Image

0908

Error - Issuer not available

-

1016

Error - Need to Activate Product

-

2209

Error - Wrong job type. This user is already enrolled with user_id

-

* - If the queried ID info was issued in Kenya, the job fails and no further processing is performed