Document
If you wish to request a document from the user this section will provide you with all the details to complete this. Each check will provide a report of the result from the document check. The user will have the option to upload an image or take a photo, this is configurable in the Client preferences section.
Here we describe how to:
- Request a document authenticity check on one or more documents.
- Request a supporting document - currently we support capturing a council bill, phone bill, utility bill and bank statement.
Name | Resources | Type | Manual check available |
---|---|---|---|
Document authenticity | 1x Document Resource | Asynchronous | ✅ |
Text extraction | 1x Document Resource | Asynchronous | ✅ |
Supporting documents | 1x Document Resource | Asynchronous | ✅ |
Document comparison | 2x Document Resource | Asynchronous | ❌ |
We provide guidelines in our user view on how to capture the clearest image. The user view will also handle requesting the number of sides of the document needed for verification.
Document Authenticity
A request to assess the characteristics of a document, to determine the validity of the ID document. Yoti will perform multiple checks on a ID document.
const documentAuthenticityCheck = new RequestedDocumentAuthenticityCheckBuilder()
.withManualCheckFallback()
.build();
Manual Authenticity check | Description |
---|---|
withManualCheckFallback | The document inspection falls back to a manual process, if automation does not auto approve or auto reject. |
withManualCheckNever | The document inspection never falls back to a manual process. This would be an automated only assessment. |
withManualCheckAlways | The document is always referred for manual review in Yoti's Security Centre. Note: This config may result in additional charges. |
Please see below sections on how to minimise which countries / documents are shown to the user. You can also see our documents coverage using our API.
If the document has a barcode on the document we will attempt to do a barcode comparison check. We will attempt to compare the data and provide you the result.
Text Extraction
If you are capturing a users document you may find it usual to capture the data on the document. A request to obtain the data printed visually on a document, in structured form. If machine data extraction is not successful, there is an option (selected at session creation) to fall back to manual data extraction. This generates a ‘text data check’ automatically, and the document is reviewed by one of our document processing experts.
const textExtractionTask = new RequestedTextExtractionTaskBuilder()
.withManualCheckFallback()
.withCreateExpandedDocumentFields(false)
.build();
Manual Data extraction | Description |
---|---|
withManualCheckFallback | This will initiate manual data extraction only if the automatic extraction fails. We strongly recommend this option. |
withManualCheckNever | If the ID fails on automatic extraction, Yoti will not attempt manual extraction and will return a failure in the report. |
withManualCheckAlways | The document is always referred for manual review in Yoti's Security Centre, regardless of whether machine data extraction has succeeded or failed. Note: This config may result in additional charges. |
withCreateExpandedDocumentFields | If set to true enables the retrieval of expanded document fields including the "source" of each document field. |
NFC (native only)
Near Field Communication (NFC) protocol helps two devices communicate wirelessly when they are placed near each other. NFC hardware is being included in more and more devices, and readers in documents thus we have added the ability to extract data using NFC.
const textExtractionTask = new RequestedTextExtractionTaskBuilder()
.withManualCheckFallback()
.withChipDataDesired()
.build();
// Ignore NFC chip
const textExtractionTask = new RequestedTextExtractionTaskBuilder()
.withManualCheckFallback()
.withChipDataIgnore()
.build();
NFC enablement | Description |
---|---|
withChipDataDesired | Enable NFC capabilities |
withChipDataIgnore | Disable NFC capabilities |
Request multiple documents
It is possible to ask for more than one ID document from the user in the same session using an array. You will receive two reports and images of all documents submitted.
const {
SessionSpecificationBuilder,
DocumentRestrictionsFilterBuilder,
DocumentRestrictionBuilder,
RequiredIdDocumentBuilder
} = require('yoti');
const requiredDocument = new RequiredIdDocumentBuilder()
.build();
const anotherRequiredDocument = new RequiredIdDocumentBuilder()
.build();
const sessionSpec = new SessionSpecificationBuilder()
// Additional required document
.withRequiredDocument(requiredDocument)
.withRequiredDocument(anotherRequiredDocument)
.build();
If you wish to add filters on which documents you want to show please see section below.
Document comparison check
If you request your users to upload more than one document we offer the ability to cross check the data, please see below for configuration:
const documentComparisonCheck = new RequestedIdDocumentComparisonCheckBuilder().build();
const sessionSpec = new SessionSpecificationBuilder()
// ...
.withRequestedCheck(documentComparisonCheck)
// ...
.build();
Yoti will check and compare the following user data and provide you with a sub check result:
- Name
- Date of birth
Document settings
This section will outline helpful api features we have.
- List of documents supported
- Restriction of documents / countries. If you do not wish to accept all documents or countries you can configure your session to add / remove which countries and document types are displayed to the user on the user view.
Supported Documents
To see all documents that are supported please see the code snippet below.
const path = require('path');
const fs = require('fs');
const { IDVClient } = require('yoti');
const YOTI_CLIENT_SDK_ID = 'YOUR_SDK_ID';
const YOTI_PEM = fs.readFileSync(path.join(__dirname, '/path/to/pem'));
const idvClient = new IDVClient(YOTI_CLIENT_SDK_ID, YOTI_PEM);
idvClient.getSupportedDocuments().then((supportedDocuments) => {
supportedCountries = supportedDocuments.getSupportedCountries();
supportedCountries.map((country) => {
countryCode = country.getCode();
documents = country.getSupportedDocuments();
});
});
Yoti will return a list of countries listed by ISO 3166 country code. Each country will list an array of supported documents from that country.
Filtering Settings
Settings | Description |
---|---|
Orthogonal restrictions | Allow (whitelist) or remove (blacklist) by country and document type independently. |
Document restrictions | This filter allows greater precision but is more verbose to use. It provides multiple restrictions that filter by country and document type together. |
Non latin documents | Yoti can support an array of non latin documents from multiple countries. |
Expired documents | By default expired documents will not be accepted, but you are able to enable the use of expired documents. |
Enable non-latin documents
Yoti can support a number of non latin documents from multiple countries. A list can be found below:
Type | Countries |
---|---|
Driving Licence | China, Iraq, Japan, South Korea, Syria |
National ID | China, Egypt, Iraq, Israel, Japan, Kazakhstan, Lebanon, Russia, Saudi Arabia, South Korea, Syria, Taiwan |
Residence permit | Saudi Arabia |
Please be aware that these documents do not support manual text extraction. Data can only be obtained using Optical Character Recognition (OCR) only. The API allows you to enable support for all non-latin documents, or selectively choose which ones to process using the filters provided below.
Enable expired documents
Yoti can support expired documents, the feature simply needs to be enabled.
Orthogonal restriction
Allow (whitelist) or remove (blacklist) by country and document type independently.
If you create a WHITELIST for one country / document and also a BLACKLIST for the other, then the BLACKLIST will overrule the WHITELIST.
const {
SessionSpecificationBuilder,
RequiredIdDocumentBuilder,
OrthogonalRestrictionsFilterBuilder
} = require('yoti');
const filter = new OrthogonalRestrictionsFilterBuilder()
// Allow from specific countries
.withWhitelistedCountries(['GBR', 'JPN'])
// Deny from specific countries
.withBlacklistedCountries(['FRA'])
// Allow specific documents
.withWhitelistedDocumentTypes(['PASSPORT'])
// Deny certain documents
.withBlacklistedDocumentTypes(['DRIVING_LICENCE'])
// Allow non latin documents
.withAllowNonLatinDocuments(true)
// Allow expired documents
.withAllowExpiredDocuments(true)
.build();
const requiredDocument = new RequiredIdDocumentBuilder()
.withFilter(filter)
.build();
const sessionSpec = new SessionSpecificationBuilder()
// New method in addition to existing create session methods
.withRequiredDocument(requiredDocument)
.build();
Document restriction
This filter allows greater precision but is more verbose to use. It provides multiple restrictions that filter by country and document type together.
const {
SessionSpecificationBuilder,
DocumentRestrictionsFilterBuilder,
DocumentRestrictionBuilder,
RequiredIdDocumentBuilder
} = require('yoti');
const documentRestriction = new DocumentRestrictionBuilder()
// Set countries
.withCountries(['GBR'])
// Set document types
.withDocumentTypes(['PASSPORT'])
.build();
const filter = new DocumentRestrictionsFilterBuilder()
// Set document restriction
.withDocumentRestriction(documentRestriction)
// Specify if this filter is an allowed list, or denied list
.forWhitelist() // or forBlacklist() if disallowing this filter
// Allow non latin documents
.withAllowNonLatinDocuments(true)
// Allow expired documents
.withAllowExpiredDocuments(true)
.build();
const requiredDocument = new RequiredIdDocumentBuilder()
.withFilter(filter)
.build();
const sessionSpec = new SessionSpecificationBuilder()
// New method in addition to existing create session methods
.withRequiredDocument(requiredDocument)
.build();
Multiple documents and filter
Please see example code for requesting multiple documents with filtering.
const {
SessionSpecificationBuilder,
DocumentRestrictionsFilterBuilder,
DocumentRestrictionBuilder,
RequiredIdDocumentBuilder
} = require('yoti');
const documentRestriction = new DocumentRestrictionBuilder()
.withCountries(['GBR'])
.withDocumentTypes(['PASSPORT'])
.build();
const filter = new DocumentRestrictionsFilterBuilder()
.withDocumentRestriction(documentRestriction)
.forWhitelist()
.build();
const requiredDocument = new RequiredIdDocumentBuilder()
.withFilter(filter)
.build();
const anotherDocumentRestriction = new DocumentRestrictionBuilder()
.withCountries(['GBR'])
.withDocumentTypes(['DRIVING_LICENCE'])
.build();
const anotherFilter = new DocumentRestrictionsFilterBuilder()
.withDocumentRestriction(anotherDocumentRestriction)
.forWhitelist()
.build();
const anotherRequiredDocument = new RequiredIdDocumentBuilder()
.withFilter(anotherFilter)
.build();
const sessionSpec = new SessionSpecificationBuilder()
// Additional required document
.withRequiredDocument(requiredDocument)
.withRequiredDocument(anotherRequiredDocument)
.build();