Onfido LogoOnfido Logo

Developers

Document report

Start here

This guide presents a technical overview of Onfido's Document report.

Introduction

The Document report employs data integrity, visual authenticity and database record checks to verify identity documents such as passports, national ID cards and driver's licences. The report can also compare the data extracted from the document with data provided by the end user in other capture tasks or in the workflow input data, as an additional way of identifying potential discrepancies and fraudulent documents.

The majority of Document reports are automated and processed in seconds. If, however, Onfido encounters document images that use sophisticated counterfeiting techniques, or the capture is of poor quality (blurred, low resolution, obscured, cropped, or held at an unreadable angle), our software is supported by an expert manual review team to ensure an identity verification is subject to a thorough analysis in order to maximise fraud detection. Manual review can also be configured to be applied to all document verifications.

When document analysis falls back to manual review, the report results will be delivered asynchronously via webhook notifications. You can read more about webhooks in our API reference documentation.

During document capture, the Document report uses Near Field Communication (NFC) to validate the document's chip in order to verify the document. If NFC was successful, the visual authentication, image integrity and data consistency checks will not be performed. In addition, any data extracted from the document is returned in the properties attribute of the report. Please read our NFC for Document report guide for details on how to integrate and use NFC for Document reports.

The Document report breakdown tree

The results of Document reports are generated in the form of breakdowns and sub-breakdowns. A Document report can have an overall result of clear or consider.

The Document report uses the sub_result property to provide a more specific description of the overall report result. These sub-results and their meanings are described in the table below:

Sub-result
ClearIf all underlying verifications pass.
RejectedIf the report has returned information where the check cannot be processed further (for example, poor image quality or unsupported document).
SuspectedThe analysed document is suspected to be fraudulent.
CautionIf any other underlying verifications fail, but they don't necessarily point to a fraudulent document (for example, the name provided by the applicant doesn't match the one on the document).

Breakdowns are made up of sub-breakdowns. A breakdown will have a consider result when at least one of its sub-breakdowns contains a consider or unidentified result.

Breakdowns and sub-breakdowns are mapped to particular sub-results. Certain mappings can be changed, depending on your configuration. You can use the Document report breakdown tree diagram below to understand the mapping of different sub-breakdowns and breakdowns to a sub-result, and the options for configuration. You can also read how individual breakdowns contribute to the overall sub_result value in the Document report in our API reference documentation.

Note: The following diagram illustrates the options available in v2 and v3 of the Onfido API.

Document report breakdown tree 1

The following diagram shows the reasons which can lead to specific sub-breakdowns and therefore sub-results other than clear in v2 and v3 of the Onfido API:

Document report breakdown tree 2

More details regarding the structure of the Document report and an example result can be found in our API reference documentation.

For how to proceed with an applicant based on the various results, please refer to the suggested client actions section below.

Breakdown descriptions

BreakdownSub-breakdownDescription
Age validationAsserts whether the age calculated from the document's date of birth data point is greater than or equal to the minimum accepted age set at account level. The default minimum age is 16 years old, but you can request to have this changed.
Minimum accepted ageThe minimum accepted age, configureable at account level.
Data comparisonEstablishes whether the information points extracted from the document match the information supplied when creating an applicant through the API.
Date of birthA comparison of the document's date_of_birth field.
First nameA comparison of the document's first_name field.
Last nameA comparison of the document's last_name field.
GenderA comparison of the document's gender field.
Data validationAsserts whether the format and length of the fields are correct for the document type.
GenderDetermines whether the document's gender field is the expected length and format for this document type.
Date of birthDetermines whether the document's date_of_birth field is the expected length and format for this document type.
Document numbersDetermines whether the document_numbers field is the expected length and format for this document type.
Document expirationValidates the expiry date extracted from a document, flagging if a document's expiry date has passed.
Expiry dateValidates whether the expiration date has the incorrect format, or whether the date is in the past.
Machine Readable Zone (MRZ)A validation of the document's mrz.
BarcodeValidates the barcode against the defined standard for this document type (only available from API v3.2 onwards).
Image integrityAsserts whether the document is of sufficient quality to verify.
Conclusive document qualityMeasures the ability to make a fraud assessment based on the quality of the applicant's document. Applied by our expert manual review team when documents are unclassifiable as fraudulent or genuine.
Colour pictureFlags if the image is black and white. This is because black and white documents prevent a full fraud assessment as the majority of security features are colour.
Image qualityFlags if there is a low-resolution image where the document information is not readable, the MRZ is obscured or unreadable or vital data points are obscured or unreadable.
Supported documentIndicates whether the submitted document type is supported by Onfido and by the customer, or whether the document is issued by a country subject to comprehensive US sanctions.
Video document presenceAsserts whether there is at least a document with video and none of the documents has a video whose signature was checked and is invalid.
Data consistencyAsserts whether data represented in multiple places on the document is consistent. For example, between MRZ lines and OCR extracted text on passports.
Date of expiryAsserts the consistency of the data in the document's date_of_expiry field.
Document typeAsserts the consistency of the document type.
NationalityAsserts the consistency of the data in the document's nationality field.
Issuing countryAsserts the consistency of the data in the document's issuing_country field.
Document numbersAsserts the consistency of the document_numbers field.
GenderAsserts the consistency of the data in the document's gender field.
First nameAsserts the consistency of the data in the document's first_name field.
Last nameAsserts the consistency of the data in the document's last_name field.
Date of birthAsserts the consistency of the data in the document's date_of_birth field.
Multiple data sources presentmultiple_data_sources_present is for cases where we don't obtain a US barcode because it wasn't extracted, wasn't decoded, or wasn't there at all (e.g. if the back of the document wasn't available). It acts as a validation for the data_consistency breakdown: if 2 sources are present, then data consistency is possible and the other sub-breakdowns are enabled. multiple_data_sources_present can be disabled if needed. In this case, it will be returned as null and have no impact on the sub-result.
Visual authenticityAsserts whether visual (non-textual) elements are correct given the document type.
Face detectionIndicates whether a face was detected on the document.
Original Document Present (ODP)Indicates whether the provided image is an image of the original document or, for example, a photo of a photo of a document or a photo of a computer screen.
FontsIndicates whether fonts in the document match the expected ones.
Picture face integrityFlags if the pictures of the person identified on the document show signs of tampering or alteration.
Digital tamperingFlags when the image of the document is suspected to have been digitally tampered with.
Security featuresFlags if security features expected on the document are missing or wrong.
TemplateIndicates whether the document matched the expected template for the document type and country it is from.
OtherThis sub-breakdown is returned for backward compatibility reasons. Its value will be consider when at least one of the other breakdowns is consider, and clear when all the other breakdowns are clear.
Compromised documentAsserts whether the image of the document has been found in our internal database.
Document databaseAsserts whether the document is publicly available as compromised.
Repeat attemptsAsserts whether the document has been reused in a suspicious way.
Police recordIndicates whether a document has been reported as lost, stolen or compromised to the UK Metropolitan Police.
Issuing AuthorityAsserts whether data on the document matches the issuing authority data.
NFC passive authenticationAsserts whether the document's NFC chip data was tampered with (only available from API v3.2 onwards).
NFC active authenticationAsserts whether the document's NFC chip is original or cloned (only available from API v3.2 onwards).

Document Report task

Similar to other Onfido reports, to run a Document report, a Document Report task should be added to a Studio workflow from the Workflow Builder.

When constructing a Studio workflow, a Document Report task must always follow the route of a Document Capture task in order to extract the appropriate input data. Input data for this task can also be received from the workflow input data, an Autofill task or a Profile Data Capture task.

Below you will find an illustrated example of a Studio workflow running a Document report:

Document report workflow

More information about report tasks can be found in our Studio Product Guide.

Document Report task results

If you want to obtain the specific outputs from the Document Report task via the Onfido API (for example, the overall report result or breakdown results), you can manage this by configuring the Workflow Output in the Studio Workflow Builder. You can also retrieve all associated output data from a Document report.

You can refer to our Studio product guide for more information on Workflow Output configuration. Once set up, the output can be consumed by making a Retrieve Workflow Run call to the Onfido API. Report results are found in the output property.

Workflow Run results can also be accessed on the "Results" tab of your Studio Dashboard.

Suggested client actions

In this section, we explore a range of specific scenarios for the Document Report by examining individual sub_results from the report breakdown and describe some common suggested actions.

The details of the Document Report breakdown structure are described above in this guide, and are also documented in our API reference.

The following scenarios are provided as examples, and are based on default configurations. Where breakdowns can be configured to map to alternative sub_results, this is noted. To discuss such configuration changes, please ask your contact at Onfido or email our Client Support team.

'rejected' sub_result scenarios

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
image_integrity: supported_documentVerify that the document is supported.

You can review the full list of documents Onfido supports.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
image_integrity: image_quality Request an additional image of the same document

The most common reason for a document to be deemed “unprocessable”, is the fact that key data points might be obstructed, cropped, or not visible. Such documents are rejected for poor image quality.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
age_validation: minimum_accepted_ageBlock

Asserts whether the age calculated from the document’s date of birth data point is greater than or equal the minimum accepted age set at account level. The standard threshold is 16 years old but you can write to your Onfido contact to have this changed.

'suspected' sub_result scenarios

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: original_document_present (can be configured to map to caution sub-result)a. Ignore
b. Refer to manual team for review
c. Request an additional document

Onfido deploys a number of texture analysis algorithms to detect whether or not an image contains any of the following:

  • screenshots
  • pictures of pictures
  • printouts

Original document scanning presents a difficult challenge that in our experience is best solved via the combination of tech and human expertise. If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: picture_face_integritya. Block
b. Refer to manual team for review

Onfido deploys a number of algorithms designed to analyse whether the picture in a document image may be a physical insertion or otherwise digitally tampered.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: fontsa. Block
b. Refer to manual team for review

Our machine learning models are constantly refining their ability to recognise, categorise and distinguish between fraudulent fonts and genuine travel document font types such as OCRB.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: templatea. Block
b. Refer to manual team for review

The template breakdown is triggered by algorithms trained to recognise genuine templates and formats of documents, and is supplemented by our manual team’s expert knowledge.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: digital_tamperinga. Block
b. Refer to manual team for review

We analyse a document to recognise if the document is suspected of being created digitally or digitally tampered as opposed to being created physically or tampered in a physical manner.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
visual_authenticity: security_featuresa. Block
b. Refer to manual team for review

The Onfido engine is trained to pick out a number of distinct security features in each document, and is supplemented by the work of our manual team of experts.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

Potential contributing breakdownPotential client action(s)
data_validation: gender, expiry_date, mrz, date_of_birth, document_numbersa. Block
b. Refer to manual team for review

The Onfido engine asserts whether algorithmically validatable elements are correct. For example, MRZ lines and document numbers.

If our algorithms fail to produce a result beyond a certain degree of certainty, documents will be referred to manual analysts to supplement the engine's decision.

'caution' sub_result scenarios

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
data_validation: document_expirationa. Ignore
b. Refer to manual team for review
c. Request an additional document

The document_expiration sub-breakdown validates the expiry date extracted from a document and checks its validity. If this is flagged, the document has expired.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
image_integrity: conclusive_document_qualitya. Ignore
b. Refer to manual team for review
c. Request an additional document

This breakdown is applied by our expert manual review team when both product and human analysis fail to yield a concrete result either way.

Our manual team will apply this breakdown for documents they receive which are unclassifiable as fraudulent or genuine.

Potential contributing breakdown and sub-breakdown(s)Potential client action(s)
image_integrity: colour_picture (can be configured to map to rejected sub-result)a. Ignore
b. Refer to manual team for review
c. Request an additional document

The Onfido engine deploys color reading algorithms designed to detect whether or not a black and white image has been submitted, flagging these.

'clear' sub_result scenario

We recommend that you allow the user to proceed in this scenario.

Document Video Report

Onfido offers a variation on the Document report, called a Document Video report, which ensures compliance with European Telecommunications Standards Institute (ETSI) regulations in relevant geographical areas.

Besides capturing a photo, our SDK records a 1.5-second video of an applicant's document, available for download via API or directly from your Dashboard.

If a video isn't successfully recorded or there are signs that it was tampered with, the Document Video Report will be rejected, adhering to ETSI compliance requirements. In this instance, the Document Report's overall result will be consider due to image_integrity > video_document_presence being consider. In a Studio workflow, a negative video_document_presence returns a failed result.

Document Video Reports are compatible with our iOS (28.3.0 or higher), Android (16.3.0 or higher) and Web (12.2.1 or higher) SDKs.

For the Web SDK, customers must include the following configurations:

  • useLiveDocumentCapture option set to true (not applicable from version 10.2.0 onwards)
  • forceCrossDevice option set to true
  • uploadFallback option set to false (not applicable from version 13.0.0 onwards)

Please note: From iOS 30.4.0, Android 21.0.1 or Web 14.16.0 onwards, document videos uploaded to the Onfido backend by the SDK have their own media IDs. Document video UUIDs can found by retrieving the list of media associated with an applicant, and used to download specific videos via API.

More details regarding the structure of the Document Video report and an example result can be found in our API reference documentation.

BETA Document reports

In addition to the Document report, Onfido offers a number of BETA Document reports. For more information about the features in these BETA reports, follow the links below to our API reference documentation, or contact your account manager.