DocV Web SDK Capture App Customization
Customize Your Capture App Flow
The Predictive Document Verification (DocV) Web SDK includes customizable options that allow you to modify the user interface and user experience of the Capture App flow.
After completing your SDK integration, use this section to learn how to build and deploy a customized flow that matches your organization's style, branding, and document verification use case.
Step 1: Build your Capture App flow in RiskOS™
On the DocV App page in RiskOS™:
- Select your Capture App flow use case, then customize the Capture App UI to match your application's theme.
- When you are finished, save the flow to the Production environment.
Step 2: Deploy your custom flow
The DocV Web SDK requires you to make a POST request to the /api/evaluation endpoint to generate a docvTransactionToken. You can deploy your custom flow settings using the data.individual.docv.config object parameters in the API request body. The docvTransactionToken returned in the API response will automatically apply your Capture App flow settings to the transaction.
curl --location 'https://riskos.socure.com/api/evaluation' \
--header 'accept: application/json' \
--header 'authorization: Bearer a182150a-363a-4f4a-xxxx-xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--header 'X-API-Version: 2025-01-01.orion' \
--data-raw '{
...
"docv": {
"config": {
"send_message": false,
"language": "en",
"use_case_key": "customer_use_case_key",
"redirect": {
"method": "GET",
"url": "https://www.socure.com",
"document_type": "license"
}
}
}
}'
The following table lists the config object parameters:
| Parameter | Type | Description |
|---|---|---|
send_message |
Bool | Set to true to enable SMS text message. Default is false.To prepopulate the consumer's phone number: - Set the send_message field to true.- Provide a valid mobile number. Note: SMS behavior varies by region. |
language |
Optional | Determines the language package for the UI text. Contact support@socure.com for new language support. |
use_case_key |
String | Deploys a customized flow on a per-transaction basis. Replace with your flow name. If empty, the default flow is used. |
redirect |
Object | Contains method and url parameters for redirecting after the document capture process. |
method |
String | Defines the redirect method. Possible values are GET or POST. Required if redirect is provided. |
url |
String | Destination URL for redirect. Required if redirect is provided. |
document_type |
String | Specifies a single acceptable document type. - license: Driver's license- passport: PassportIf incorrect, the endpoint will use the defined document type in RiskOS™. |
How the redirect object works
The optional redirect object conforms to the following type:
{
url: string;
method: 'GET' | 'POST';
headers?: { [key: string]: string };
delay?: number;
}
The redirect object allows you to redirect the consumer using:
url: Destination website address with optional query strings.method: Possible values areGETorPOST.headers: Optional request headers.delay: Delay before redirecting in milliseconds.
How document_type works
The document_type field sets a default acceptable document using license for driver's license or passport for passport. It simplifies the flow, skipping the Selected ID Type Screen and starting directly on the Document Capture Screen.
Step 3: Redirect to the Capture App
When you call the /api/evaluation endpoint, it returns a one-time-use document request URL for redirecting the consumer to the Capture App flow. Depending on your integration workflow, the consumer can access the URL using the methods listed below.
To send the document request URL via SMS:
- In the API request body, set:
send_messagetotrue.- Provider a mobile number in the
phone_numberfield.
curl --location 'https://riskos.socure.com/api/evaluation' \
--header 'accept: application/json' \
--header 'authorization: Bearer a182150a-363a-4f4a-xxxx-xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--header 'X-API-Version: 2025-01-01.orion' \
--data-raw '{
...
"phone_number": "+13475550100",
"docv": {
"config": {
"send_message": true,
...
}
}
}'
To display a QR code:
- Call the Evaluation endpoint.
- Collect the base64 value in the
qrcodefield of the API response. - Display this value as a QR code image in your application.
Tip: To disable the SMS text message, set
sendMessagetofalse. Alternatively, set it totrueand use the QR code as a fallback if SMS fails.
{
...
"response": {
"data": {
"docvTransactionToken": "70c6a4bc-f646-4c6a-94c1-9cd428e356ef",
"eventId": "70c6a4bc-f646-4c6a-94c1-9cd428e356ef",
"qrcode": "data:image/png;base64,iVBO......K5CYII=",
"url": "https://verify.socure.com/#/dv/70c6a4bc-f646-4c6a-94c1-9cd428e356ef"
}
},
...
}
To redirect a consumer to the Capture App on a mobile web browser, set send_message to false in the API request.
curl --location 'https://riskos.socure.com/api/evaluation' \
--header 'accept: application/json' \
--header 'authorization: Bearer a182150a-363a-4f4a-xxxx-xxxxxxxxxxxx' \
--header 'content-type: application/json' \
--header 'X-API-Version: 2025-01-01.orion' \
--data-raw '{
...
"docv": {
"config": {
"send_message": false,
...
}
}
}'
Use the url field value returned in the /api/evaluation response to redirect the consumer to their mobile device's browser.