Socure Document Verification
Document Verification (documentverification
) also known as DocV allows you to confirm the authenticity of a wide range of government-issued identification cards. This includes driver's licenses, passports, visas, and other official documents.
The flow below describes the best practices to capture your customer's ID using the Socure WebSDK and processing it through Unit21.
Requirements
In order to use DocV, you must:
- Have a
SOCURE_API_KEY
in your Verification Service API Keys - Have access to the Socure developer portal: https://developer.socure.com/guide/websdk
Socure WebSDK
The Socure Document Verification WebSDK provides a Javascript framework for image capture using a mobile web browser, or a combination of desktop and mobile web browsers.
Follow the steps from Socure to setup the document capture. Make sure to specify enum 1
for the process enum (PROCESS_ENUM == 1
).
Every time one of your customers uploads a document using the WebSDK, simply record the UUID
returned from Socure. The UUID
is needed for the Unit21 API:
{
"referenceId": "123ab45d-2e34-46f3-8d17-6f540ae90303",
"uuid": "5d86672c-5e07-4813-be6c-6bd3b602371a"
}
Unit21 API
Once your have captured images of your customer's ID using the WebSDK and Socure has returned a UUID
, you can use the Create Entity or Update Entity Unit21 API Endpoints to run Document Verification Workflows.
You must include the UUID
returned from Socure as custom_data
for the entity on which you wish to perform the workflow: custom data.socure_document_uuid = 5d86672c-5e07-4813-be6c-6bd3b602371a
:
curl -X POST \
https://<API_ENDPOINT>/v1/entities/create \
-H 'Content-Type: application/json' \
-H 'u21-key: <YOUR_API_KEY>' \
-d '{
"user_data": {
"first_name": "John",
"middle_name": "Joseph",
"last_name": "Smith",
"day_of_birth": 14,
"month_of_birth": 1,
"year_of_birth": 1983,
"gender": "male",
"ssn": "733-99-5921"
},
"custom_data": {
"socure_document_uuid": "5d86672c-5e07-4813-be6c-6bd3b602371a"
},
"options": {
"identity_verifications": {
"workflow_id": "socure_docv",
"run_verifications": true
},
}
}'
In this example, a Document Verification workflow called socure_docv
has already been created. See the Verification Workflows section for more information.
If an alert is generated via the workflow, you will receive the Socure response in the alert as well as a copy of the ID documents.




Sample Socure Response (Successful):
A successful API request that includes the Document Verification module will return objects that contain information about the document and a result:
There are 3 possible results:
SOCURE_ACCEPT
SOCURE_REJECT
SOCURE_RESUBMIT
The results will appear in the response as well as the header of the alert:


Understanding the Raw Response
You can view the raw response in the alert:


{
"referenceId": "a1b23456-7cd8-9012-bad9-f86531bffdd5",
"documentVerification": {
"reasonCodes": [
"R824",
"V827"
],
"documentType": {
"type": "Drivers License",
"country": "US",
"state": "NY"
},
"decision": {
"name": "lenient",
"value": "accept"
},
"documentData": {
"firstName": "SAMPLE LICENSE",
"surName": "DOCUMENT",
"fullName": "SAMPLE LICENSE DOCUMENT",
"address": "123 Example Street NY 12345",
"documentNumber": "012 345 678",
"dob": "1985-06-09",
"expirationDate": "2016-06-01",
"issueDate": "2008-09-30"
}
}
}
In the documentVerification
section, the results and reason codes are detailed. Please see the section below for more information.
In the documentData
section, information read from the document is returned. This includes:
- firstName
- surName
- fullName
- address
- documentNumber
- dob
- expirationDate
- issueDate
Updated 16 days ago