DocV Integration
The end-to-end integration path: create an evaluation, receive the docvTransactionToken/QR Code/URL, and direct the user to the capture experience.
Before you start
ACCEPT, REVIEW, REJECT).
evaluation_completed events for asynchronous decisions and optional case_notes_added events for status updates.
Test with Postman
Use this Postman collection to send sample requests to the Evaluation API and validate your Direct API integration in Sandbox.
Step 1: Start an evaluation
Submit consumer data to the RiskOS™ Evaluation API. Because your workflow contains a Document Request step, RiskOS™ pauses the evaluation and returns the docvTransactionToken your app uses to launch capture.
Endpoint
Start with Sandbox for development and testing, then move to Production for live applications.
POST https://riskos.sandbox.socure.com/api/evaluationPOST https://riskos.socure.com/api/evaluationAuthentication
Include your API key in the Authorization header as a Bearer token, with standard JSON headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json
X-API-Version: 2025-01-01.orion # optional – pins a specific API versionExample request
Send the consumer's PII and your docv.config capture settings. The SDK path does not use data.individual.custom.redirect_uri — that field is for Hosted Flows.
curl --request POST \
--url https://riskos.sandbox.socure.com/api/evaluation \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"id": "APP-123456",
"timestamp": "2025-07-31T15:00:10.761Z",
"workflow": "consumer_onboarding",
"data": {
"individual": {
"given_name": "John",
"family_name": "Smith",
"date_of_birth": "1989-05-07",
"phone_number": "+19998887777",
"address": {
"line_1": "1234 N College Ave",
"locality": "New York City",
"major_admin_division": "NY",
"country": "US",
"postal_code": "10001"
},
"docv": {
"config": {
"send_message": false,
"language": "en",
"redirect": {
"method": "GET",
"url": "https://www.socure.com",
},
}
}
}
}
}'import os
import requests
url = "https://riskos.sandbox.socure.com/api/evaluation"
headers = {
"Authorization": f"Bearer {os.getenv('YOUR_API_KEY')}",
"Content-Type": "application/json"
}
payload = {
"id": "APP-123456",
"timestamp": "2025-07-31T15:00:10.761Z",
"workflow": "consumer_onboarding",
"data": {
"individual": {
"given_name": "John",
"family_name": "Smith",
"date_of_birth": "1989-05-07",
"phone_number": "+19998887777",
"address": {
"line_1": "1234 N College Ave",
"locality": "New York City",
"major_admin_division": "NY",
"country": "US",
"postal_code": "10001"
},
"docv": {
"config": {
"use_case_key": "your-use-case-key",
"document_type": "license",
"language": "en-us"
}
}
}
}
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()Captures a government-issued ID and a selfie. Set document_type to skip the document-selection screen, or omit it to let the consumer choose.
// ...excerpt of the full request body — data.individual shown
"individual": {
"given_name": "John",
"family_name": "Smith",
"phone_number": "+19998887777",
"address": {
"country": "US"
},
"docv": {
"config": {
"document_type": "license",
"language": "en-us",
"send_message": false,
"redirect": {
"method": "GET",
"url": "https://www.socure.com"
}
}
}
}Captures supporting documents such as utility bills or bank statements (JPEG, PNG, or PDF). No selfie or facial match. Select the flow with use_case_key and omit document_type.
// ...excerpt of the full request body — data.individual shown
"individual": {
"given_name": "John",
"family_name": "Smith",
"phone_number": "+19998887777",
"address": {
"country": "US"
},
"docv": {
"config": {
"use_case_key": "YOUR_SECONDARY_DOC_FLOW",
"language": "en-us"
}
}
}Captures a live selfie for age, liveness, and trust checks. Select the flow with use_case_key and omit document_type.
// ...excerpt of the full request body — data.individual shown
"individual": {
"given_name": "John",
"family_name": "Smith",
"phone_number": "+19998887777",
"address": {
"country": "US"
},
"docv": {
"config": {
"use_case_key": "YOUR_SELFIE_FLOW",
"language": "en-us"
}
}
}Captures a live selfie and compares it to a prior DocV headshot. Requires additional_context.previous_reference_id — the reference ID of the earlier evaluation that holds the headshot.
// ...excerpt of the full request body — data.individual shown
"individual": {
"given_name": "John",
"family_name": "Smith",
"phone_number": "+19998887777",
"address": {
"country": "US"
},
"additional_context": {
"previous_reference_id": "3639f9ad-e1fe-4e3e-9202-18faf20ace56"
},
"docv": {
"config": {
"use_case_key": "YOUR_REVERIFICATION_FLOW",
"language": "en-us"
}
}
}The result enrichment object varies by flow:
The final verification result payload nests the DocV result under a flow-specific key —
documentVerification,secondaryDocument,selfieIntelligence, orselfieReverification. Parse the object that matches the flow you ran. See Receive DocV Results.
Request fields
Validation rules & accuracy guidance
These rules ensure RiskOS™ has enough information to run Document Verification.
Recommended fields
Every request is recommended to include:
given_namefamily_namephone_number(E.164 format)address.country
Conditionally required fields
Add these fields when the scenario applies:
docv.transaction_token— links the evaluation to an existing Document Request session (v5).additional_context.previous_reference_id— required when running the Selfie Reverification enrichment.
Accuracy guidance
Add date_of_birth, email, and the remaining address fields (address.line_1, address.locality, address.major_admin_division, address.postal_code) for the highest match accuracy.
Top-level fields
Path: root request object
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | String | Required | Customer-defined unique identifier for the request. Must be unique per evaluation — reusing an ID causes RiskOS™ to treat the request as a re-run and can affect results. | "APP-123456" |
timestamp | String <Date-Time> | Required | RFC 3339 timestamp indicating when the evaluation request was initiated. | "2025-07-31T15:00:10.761Z" |
workflow | String | Required | Environment-specific workflow identifier from RiskOS™. Must identify a single active workflow. | "consumer_onboarding" |
data.ip_address | String | Optional | Client IP address (IPv4/IPv6). Used for device intelligence. | "1.2.3.4" |
Individual fields
Path: data.individual
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
transaction_token | String | Conditional | Used to link an evaluation to an existing Document Request session. Use when you already have a DocV transaction and want the Evaluation call to continue or associate with that existing DocV flow, rather than starting from scratch. | "1e89eec0-f7a3-4210-b74b-a76bc9556c50" |
given_name | String | Recommended | Consumer's first/given name. | "John" |
family_name | String | Recommended | Consumer's last/family name. | "Smith" |
date_of_birth | String | Optional | Date of birth in ISO 8601 format (YYYY-MM-DD). | "1989-05-07" |
national_id | String | Optional | Consumer's national identification number. For US consumers, an SSN or ITIN (full, or last four digits). Hyphens are optional. | "461118208" |
phone_number | String | Recommended | Phone number. The API expects E.164 format but tolerates hyphens and spaces. | "+19998887777" |
email | String | Optional | Consumer's email address. | "[email protected]" |
additional_context | Object | Optional | Passes additional data required by specific Socure products. See Additional context fields. | { "previous_reference_id": "…" } |
Address fields
Path: data.individual.address
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
line_1 | String | Optional | The first line of the consumer's address. | "1234 N College Ave" |
line_2 | String | Optional | An optional second line, such as apartment or suite number. | "Apt 4B" |
locality | String | Optional | City, town, or village where the consumer resides. | "New York City" |
major_admin_division | String | Optional | State, province, or region (ISO 3166-2). | "NY" |
postal_code | String | Optional | ZIP, postal code, or equivalent regional identifier. | "10001" |
country | String | Required | Country in ISO 3166-1 alpha-2 country code format. | "US" |
DocV fields
Path: data.individual.docv
DocV behavior is configured server-side through the docv object and its nested config object. All fields are optional or conditional:
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
transaction_token | String | Conditional | Transaction token from the Document Request API response (v5). Use this if integrated with Socure's DocV solution. | "1e89eec0-f7a3-4210-b74b-a76bc9556c50" |
barcode_payload | String | Optional | Barcode payload from the back of an ID as a base64-encoded string (typically 300–500 bytes). Send it here to verify a barcode in a single Evaluation call — the recommended method — instead of uploading it first. No image data. | "<base64-encoded barcode payload>" |
config | Object | Optional | Configuration options controlling Capture App behavior and the document verification flow. | { "document_type": "license" } |
config.document_type | String (license | passport) | Optional | Restrict capture to a single type to skip the document selection screen. | "license" |
config.use_case_key | String | Optional | Deploy a specific Capture App flow. Defaults to your account's default flow. | "your-use-case-key" |
config.send_message | Boolean | Optional | Set to true to send the consumer an SMS with the document request URL. Defaults to false. Sent from short code 33436 in the US & Canada; from +1 (510) 330-19xx in other countries. | false |
config.language | String | Optional | Capture App UI language. Defaults to en-us. | "en-us" |
config.redirect.url | String (URL) | Conditional | Destination URL the Capture App sends the consumer to after capture completes or is canceled. Required if redirect is provided. | "https://www.example.com" |
config.redirect.method | String (GET | POST) | Conditional | HTTP method for the redirect. Required if redirect is provided. | "GET" |
config.transaction_token | String | Conditional | Used primarily in Sandbox testing to indicate the expected decision outcome. Required when simulating test results. See Test Your Integration. | "SOC32671365" |
Additional context fields
Path: data.individual.additional_context
The additional_context object passes extra data required by specific Socure products and flows:
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
driver_license | String | Optional | Driver's license number. | "000000000" |
driver_license_state | String | Optional | Two-letter issuing state code. | "NY" |
previous_reference_id | String (UUID) | Conditional | Reference to a prior evaluation. Required when using the Selfie Reverification enrichment. | "3639f9ad-e1fe-4e3e-9202-18faf20ace56" |
Note:
For the complete field schema, see the Evaluation API Reference.
Step 2: Handle the paused response
When the workflow reaches the Document Request step, RiskOS™ pauses the evaluation and returns decision: "REVIEW", status: "ON_HOLD", and eval_status: "evaluation_paused". The docvTransactionToken is returned inside data_enrichments, under the SocureDocRequest enrichment.
This response is non-terminal:
The
REVIEWdecision is not the final outcome — the evaluation resumes automatically after capture and resolves toACCEPTorREJECT. Do not route the consumer on this response.
{
"id": "APP-123456",
"workflow": "consumer_onboarding",
"eval_id": "d48bcc0e-ab3c-43a4-b03e-67208458ec62",
"decision": "REVIEW",
"status": "ON_HOLD",
"eval_status": "evaluation_paused",
"data_enrichments": [
{
"enrichment_provider": "SocureDocRequest",
"status_code": 200,
"response": {
"data": {
"docvTransactionToken": "1e89eec0-f7a3-4210-b74b-a76bc9556c50",
"eventId": "bfc890ee-e999-4445-9a5f-d3ec1dd7a6d5",
"qrCode": "data:image/png;base64, iVBOR...",
"url": "https://verify.socure.com/#/dv/bfc890ee-e999-4445-9a5f-3ec1dd7a6d5"
},
"referenceId": "3639f9ad-e1fe-4e3e-9202-18faf20ace56"
}
}
]
}These fields confirm the workflow is waiting for capture:
| Field | Value | Meaning |
|---|---|---|
eval_id | UUID | The evaluation identifier. Persist this — you need it to correlate the result webhook. |
decision | REVIEW | The workflow is paused, not finished. Do not treat this as a final decision. |
status | ON_HOLD | The evaluation is held, waiting for the consumer to complete capture. |
eval_status | evaluation_paused | Confirms the pause at the Document Request step. |
Response field definitions:
| Field | Location | Description |
|---|---|---|
docvTransactionToken | data_enrichments[n].response.data (SocureDocRequest) | The launch asset for the SDK path. Pass this to the SDK with your SDK key to start capture. |
qrCode | data_enrichments[n].response.data (SocureDocRequest) | Used for QR code handoff. The QR code includes the web URL for the Capture Experience |
url | data_enrichments[n].response.data (SocureDocRequest) | The web URL for the Capture Experience for web integrations |
Persist the launch asset and the
eval_id:Store the
eval_idin your backend to match the result webhook to this evaluation. Also store thedocvTransactionTokento launch capture. For tracking and reconciliation, persistid,eval_id,decision,status,eval_status, andworkflow.
Step 3: Launch the Capture App
For consumers completing verification, launch DocV using the integration method that best fits your experience:
- SDK: Embed a DocV SDK in your iOS, Android, React Native, or web application. The Socure SDKs provide the built-in capture experience, guide the consumer through document and selfie capture, and handle image upload.
- Web: Redirect the consumer to a Socure-hosted verification URL to complete capture in a mobile browser. This can also be used for QR code or SMS handoff, allowing consumers to start verification on one device and complete capture on a camera-enabled mobile device.
For SDK and web integrations, RiskOS™ automatically resumes the paused evaluation when capture is completed or the session expires.
For SDK integrations, pass the following values when initializing capture:
docvTransactionToken— from the evaluation response (data_enrichments[n].response.data.docvTransactionToken).- Your SDK key — from the RiskOS™ Dashboard.
For installation, initialization, platform-specific setup, supported devices, and the full launch API, go to the page for your platform:
To compare the SDK families first, see the DocV SDK documentation.
The Capture App does not return a decision:
The Capture App is a client-side handoff step only. Your backend still creates the evaluation and receives the final decision by webhook. Once capture launches, the consumer completes it without further backend interaction — RiskOS™ automatically resumes the paused evaluation when capture finishes or the session expires.
Step 4: Receive the result
Once capture finishes, RiskOS™ resumes the evaluation and delivers the final ACCEPT, REVIEW, or REJECT decision through the evaluation_completed webhook. You can also retrieve the result with a GET request using the eval_id you persisted in Step 2.
For the webhook payload, the enrichment objects returned per flow type, and how to retrieve results, see Receive DocV Results.
Retry behavior
A capture session runs once. If it does not reach SESSION_COMPLETE — it expires, the consumer declines consent, or DocV returns reject or resubmit — the evaluation resolves to REJECT. To give the consumer another attempt, both of these approaches are valid:
- Create a new evaluation (recommended). Start a fresh evaluation with a new
docvTransactionToken. Each attempt is self-contained, which makes it easier to manage. To tie attempts back to the same business record, include your own external transaction ID in theidfield. - Mint a fresh
docvTransactionTokenwithin the same evaluation. Configure your workflow to re-attempt on aresubmitdecision or aSession Expiredevent, which preserves the evaluation context and avoids re-running upstream enrichments. See Automate terminal handling.
These workflow re-attempts are separate from the targeted retakes the Capture App prompts inside a single session when an image fails a quality check. See Predictive DocV SDK FAQs.
To decide what to tell the consumer after a failure, resolve the returned reasonCodes against the reason code catalog rather than hard-coding individual values. See Reason Codes.
Error handling
If the API returns an HTTP error (4xx or 5xx), handle it before processing any evaluation logic:
| Status code | Meaning | What to do |
|---|---|---|
400 | Bad request — missing or invalid fields | Check the request body against the required fields above. |
401 | Unauthorized — invalid or missing API key | Verify your Authorization header and that the key matches the environment. |
404 | Not found — invalid eval_id or endpoint | Confirm the eval_id and endpoint URL. |
429 | Rate limited | Back off and retry after the Retry-After header value. |
500 | Internal server error | Retry with exponential backoff (max three attempts). |
For the full error schema and all error codes, see the Errors Reference.
Troubleshooting
SDK fails to start or returns "launch failed"
Invalid or expired docvTransactionToken
- Initialize the SDK with a current, unused token.
- Regenerate a new token if the previous one expired, you consumed it, or you invalidated it. A token from a completed or expired evaluation can't be reused — create a new evaluation.
Network or firewall restrictions
- The SDK must reach Socure backend services over HTTPS. Review corporate firewall and proxy rules to allow outbound HTTPS traffic.
- Ask the consumer to temporarily disable ad-blockers, VPNs, or content filters that might block SDK scripts or domains.
Verify a barcode in a single call
To verify a document barcode — the encoded data on the back of a driver's license or state ID — send the barcode payload as a base64-encoded string in the barcode_payload field on the individual's docv data. RiskOS™ verifies the barcode as part of the evaluation and returns the decision in the same response. This is the standard, recommended method for barcode verification: one call, with no separate upload step and no capture handoff, so you skip the following Steps 2–4.
This option is optional and additive — your existing two-call flow keeps working, so you can adopt the single call when convenient.
| Two calls | Inline barcode (one call) | |
|---|---|---|
| API calls | 2 — upload, then evaluate | 1 — evaluate only |
| Barcode data | Uploaded separately, referenced by a transaction token | Sent inline in the Evaluation request body |
| Added latency | A few hundred milliseconds typically; 1–1.9 seconds in slower cases | Removed — no separate storage round trip |
| Front / back / selfie images | Existing upload flow | Unchanged — still uses the existing upload flow |
{
"id": "APP-123456",
"timestamp": "2025-07-31T15:00:10.761Z",
"workflow": "consumer_onboarding",
"data": {
"individual": {
"docv": {
"barcode_payload": "<base64-encoded barcode payload>"
}
}
}
}Provide the barcode payload as a base64-encoded string — typically 300–500 bytes. Don't send image data in this field. Front, back, and selfie images are unaffected and continue through the capture flow described earlier in this topic.
FAQs
Does the Android SDK support 16 KB memory page size requirements?
Yes. The Android SDK supports 16 KB page sizes starting with v5.1.1. If you're on an older version, upgrade to v5.1.1 or later to maintain compliance with Google's latest requirements.
Do the SDKs validate images at capture time?
Yes. The DocV SDKs guide consumers and apply immediate quality checks — framing, glare, blur, and document presence — before submitting images to backend verification. The DocV SDKs may prompt consumers to retake an image to improve quality, which reduces downstream failures and abandonment.
Related
Updated 9 days ago

