Skip to main content

capture-onfido-sdk

Using Capture with 'onfido' SDK

This section contains the changes you must perform when you are using the alternative integration flow (web only). In this integration path, you upload the images to Onfido using the Capture service and with onfido set as sdk.

Changes in the Assure API

You must upgrade the SDK to the latest version. For details, see Onfido's developer pages.

We have now upgraded the Onfido JS SDK version used in the Assure API Start capture flow service to version 12.2.2 for web.

This change only impacts end-users that resides in USA (see section 1 below).

We have also done a change in the Capture configurations structure (see section 2 below), but you do not need to change anything, since we have converted all existing configurations.

1. New consent required for end-users in the USA

If the Onfido SDK detects that the end-user is located in the USA, they will see a new screen with Onfido's privacy statement and terms of service.

Onfido privacy notices and consent for web (US)

Onfido privacy notices and consent for web (US)

If the end-user does not accept, the process will fail with failReason "USER_CONSENT_DENIED". Here is an example of an Assure process where the end-user was from USA and did not consent:

{
"status": "failed",
"processId": "49f8e1c7-7950-4ef4-af53-fb5e22ef5514",
"provider": "onfido",
"failReason": {
"type": "USER_CONSENT_DENIED",
"message": "User denied consent."
},
...
}

If the end-user accepts, the process will continue as usual.

2. New structure for Capture configurations

We have done some changes to the structure inside the onfidoConfigs field. However, you dot not have to make any changes because we have automatically converted your configurations to the current format. You just need to make sure to continue using the configurations in this latest format.

Important

If any of your configurations have stopped working or have not been upgraded to the latest format, please contact us so that we can quickly fix it for you.

To do this, you can either:

For details on the current structure accepted in the onfidoConfigs field, check the Onfido documentation on GitHub: Onfido SDK UI Layer > Customizing the SDK.

Here is an example of a Capture configuration with onfidoConfigs that is compatible with the latest version:

{
"id": "capture-config-example",
"pageTitle": "My custom onboarding",
"favicon": "data:image/png;base64,iVBOR",
"fontName": "Tangerine",
"fontUrl": "https://fonts.googleapis.com/css?family=Tangerine",
"fontColor": "#123456",
"buttonsColor": "#654321",
"buttonsHoverColor": "#000000",
"buttonsTextColor": "#FFFFFF",
"defaultCountry": "NLD",
"onfidoConfig": {
"language": "en",
"steps": [
{
"type": "document",
"options": {
"documentTypes": {
"passport": true,
"driving_licence": true,
"national_identity_card": false
},
"forceCrossDevice": true
}
}
],
"translations": {
"en": {
"locale": "en_US",
"phrases": {
"doc_select": {
"title": "Verify your identity",
"subtitle": "Select the type of document you would like to upload",
"button_license": "Driving licence"
},
"doc_submit": {
"title_license_back": "Submit licence (back)",
"title_license_front": "Submit licence (front)"
},
"doc_capture": {
"prompt": {
"title_license": "What type of licence do you have?"
}
},
"photo_upload": {
"body_license_back": "Take a photo of the back of your licence",
"body_license_front": "Take a photo of the front of your licence"
},
"cross_device_checklist": {
"title": "Great, that's everything we need",
"subtitle": "We're now ready to verify your identity",
"list_item_doc_one": "Document uploaded"
}
}
}
}
},
"customCss": ".onfido-sdk-ui-Theme-defaultLogo .onfido-sdk-ui-Theme-footer .onfido-sdk-ui-Theme-logo { background-image: none; } .ods-button { color: #FFFFFF !important; background-color: #284E80 !important; } .ods-button:hover { color: #FFFFFF !important; background-color: #000000 !important; }",
"createdAt": "2021-12-14T09:04:11Z",
"updatedAt": "2022-02-21T14:03:06Z"
}
On this page