> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idmetagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding Checks & Check Statuses

> Every check performed on a document in Document Verification V2, what it verifies, why it fails, and how it affects the final verdict

Document Verification V2 runs a set of checks on every uploaded document. This page explains each check that appears in the **Verification Details** section of the Trust Validation Results page and in the `verificationStatuses`, `securityChecks` and `imageQuality` arrays of the API response.

For the checks supported by each document, see [Supported documents](https://docs.idmetagroup.com/resources/document-verification-v2/supported-documents.md).

***

## How the response is structured

The checks perform during Document Verification V2 is shown in the table below:

| Title | Response key | What it contains |
| - | - | - |
| **Overall Verification Checks Statuses** | `verificationStatuses[]` | List of checks performed and status (`verificationType` + `verificationStatus`). |
| **Document Security Checks** | `securityChecks[]` | The individual tamper, forgery and liveness checks behind `DocumentSecurityCheck`. |
| **Document Image Quality** | `imageQuality[]` | The individual capture-quality checks behind `DocumentQualityCheck`. |
| **Document Type** | `documentType` | Contains information about the document that was submitted |
| **Document Extracted Data** | `extractedData` | Contains the OCR values for each field on the document, plus the document images and extracted portraits. |

Example of Document Verification V2 response

```json theme={null}

{
  "verificationStatuses": [
    {
      "verificationType": "DocumentTypeCheck",
      "verificationStatus": "Passed"
    },
    {
      "verificationType": "DocumentSecurityCheck",
      "verificationStatus": "Passed"
    },
    {
      "verificationType": "DocumentExpirationCheck",
      "verificationStatus": "Passed"
    },
    {
      "verificationType": "DocumentQualityCheck",
      "verificationStatus": "Failed"
    },
    {
      "verificationType": "DocumentTextExtraction",
      "verificationStatus": "Passed"
    },
    {
      "verificationType": "MinAgeRequirement",
      "verificationStatus": "Passed"
    }
  ],
  "extractedData": {
    "images": [],
    "textFields": []
  },
  "documentType": {
    "documentName": "Indonesia - Id Card (2011) #2",
    "country": "Indonesia",
    "documentYear": "2011",
    "documentType": "identity_card",
    "filteredCountry": null,
    "filteredDocumentTypes": null,
    "documentTypeMatchesFilter": null
  },
  "imageQuality": [
    {
      "imageQualityCheckType": "ImageFocus",
      "result": "Passed"
    },
    {
      "imageQualityCheckType": "Potraits",
      "result": "Passed"
    },
    {
      "imageQualityCheckType": "Bounds",
      "result": "Passed"
    },
    {
      "imageQualityCheckType": "Perspective",
      "result": "Failed"
    },
    {
      "imageQualityCheckType": "ImageResolution",
      "result": "Passed"
    },
    {
      "imageQualityCheckType": "ImageColorness",
      "result": "Passed"
    }
  ],
  "securityChecks": [
    {
      "securityCheckType": "DocumentImagePatterns",
      "result": "Passed"
    },
    {
      "securityCheckType": "PhotoForgery",
      "result": "Passed"
    },
    {
      "securityCheckType": "HumanFacePhoto",
      "result": "Passed"
    },
    {
      "securityCheckType": "LivenessCheck",
      "result": "Passed"
    },
    {
      "securityCheckType": "BlackAndWhiteCopyCheck",
      "result": "Passed"
    },
    {
      "securityCheckType": "Occlusion",
      "result": "Not Performed"
    }
  ]
}
```

***

## Check statuses

Every check returns one of three values.

| Status | Meaning | Affects the verification results |
| - | - | - |
| `Passed` | The check ran and found no issue. | Yes, positively |
| `Failed` | The check ran and found an issue. | Yes, see [How the final verdict is decided](#how-the-final-verdict-is-decided) |
| `Not Performed` | The check did not run. | No |

> [!NOTE]
>
> `Not Performed` is **not** a failure. It means the check was not run, because:
>
> * the check is not supported for this document type or version
> * the information the check needs is missing from the document (for example, no expiry date or no portrait area)
> * image quality was too low for the check to run
> * only one side was uploaded and the check needs the other side
> * the check is not enabled for your template (for example, `MinAgeRequirement`)

***

## 1. Document Type Check

`verificationType: "DocumentTypeCheck"`

Checks whether the document was recognized as a known, valid version of a document in the reference database (country, document type and design year). If Document Type Filtering is enabled, it also matches the document type filtering based on allowed country and document types.

| Status | Meaning |
| - | - |
| `Passed` | The document matched a known, accepted template. |
| `Failed` | The document could not be matched to a valid template. It may be an unsupported, deprecated or altered document. |

The recognized document is returned in `documentType`:

```json theme={null}
"documentType": {
  "documentName": "Philippines - Driving License (2017)",
  "country": "Philippines",
  "countryCode": "PHL",
  "documentYear": "2017",
  "isDeprecatedDocument": false,
  "documentTypeMatchesFilter": true,
  "filteredCountry": "Philippines",
  "filteredDocumentTypes": ["driving_license"]
}
```

`documentTypeMatchesFilter` shows the result of the document type filter set up in **Trust Flow Tool Settings**:

| Value | Meaning |
| - | - |
| `true` | The submitted document matches an allowed document type. |
| `false` | The submitted document is not an accepted document type. |
| `null` | No document type filter is set up. |

If the uploaded document does not match the allowed document type in `filteredDocumentTypes`, the entire verification will be rejected.

Example of rejected document type response due to not matching the document type filter:

```json theme={null}
"documentType": {
    "documentName": "Philippines - Criminal police permit #1",
    "country": "Philippines",
    "documentYear": "",
    "documentType": "nbi",
    "filteredCountry": "ID",
    "filteredDocumentTypes": [
      "indonesia_ktp"
    ],
    "documentTypeMatchesFilter": false
  }
```

***

## 2. Document Security Check

`verificationType: "DocumentSecurityCheck"`

Checks whether the document is genuine and has not been forged. It looks for signs of counterfeiting, a replaced or pasted-on photo, a photocopy, a document shown on a screen instead of held in front of the camera, and parts of the document being covered.

Types of security checks:

| `securityCheckType` | What it checks | Common failure causes |
| - | - | - |
| `DocumentImagePatterns` | Compares the shape, size, colour and location of the document's security patterns against the reference stored in the Documents Database. Uses white, UV and IR light. | Counterfeit or altered document, reprinted document, design that doesn't match the detected version |
| `PhotoForgery` | Whether the holder's photo was replaced, altered or attached incorrectly (printed or glued on, as this document type specifies). Looks for the edges of a pasted-on photo. | Photo substitution, a photo pasted or printed over the original |
| `HumanFacePhoto` | Whether a human face is present in the document's photo area. | Photo area blank, covered or unreadable, or contains something other than a face |
| `LivenessCheck` | Whether a physical document was captured, rather than an image of it shown on a screen or replayed in another way. | Photo of a screen, screenshot, digital image re-captured from a device |
| `BlackAndWhiteCopyCheck` | Whether the document is a black-and-white photocopy, which lacks the original's colour and security features. | Greyscale photocopy or printout |
| `Occlusion` | Whether any part of the document (text, photo, signature, barcode, security features or edges) is covered. | Fingers over the card, stickers, objects lying on the document |

***

## 3. Document Quality Check

`verificationType: "DocumentQualityCheck"`

Groups the capture-quality checks below. These check the **photo**, not the **document**, so a failure usually means the user should take the picture again.

The parent status is derived the same way as for the security check. A quality failure on its own leads to **Review Needed**, not Rejected.

| `imageQualityCheckType` | What it checks | Typical failure cause |
| - | - | - |
| `ImageFocus` | Whether the image is sharp enough and not blurred, evaluated by edge clarity and contrast. | Camera didn't focus, hand moved |
| `Potraits` | Whether a face can be detected on the document. This checks that a portrait is **present**, not that it is genuine. | Portrait covered, blurred or hit by glare |
| `Bounds` | Whether the whole document, including all four corners, is in the image. | Cropped edge or corner |
| `Perspective` | Whether the document was photographed at too steep an angle. | Camera not parallel to the document |
| `ImageResolution` | Whether the document's pixel density (DPI) is above the required minimum. | Document too far from the camera, low-resolution camera |
| `ImageColorness` | Whether the image contains colour or is effectively greyscale. | Greyscale scan, black-and-white filter |

***

## 4. Document Text Check

`verificationType: "DocumentTextExtraction"`

Checks the text read from the document (OCR). Each field is checked in two ways:

1. **Source validity:** each value is checked on its own: check digits, date and number formats, and consistency between pages.
2. **Source comparison:** when a field appears in more than one place on the document, the values must match. For example, the document number in the MRZ against the printed (`VISUAL`) number, or the barcode against the printed text.

| Status | Meaning |
| - | - |
| `Passed` | Text was extracted and no field failed validation. |
| `Failed` | At least one field failed validation. See `textExtractionFailures`. |
| `Not Performed` | No text could be extracted. |

> [!NOTE]
>
> Many national ID cards have no MRZ or barcode, so there is no second source to compare against. In that case the check returns `Passed` as long as text was extracted and no field was flagged. It does not return `Not Performed` just because there was nothing to compare.

When a field has values from several sources, `textFields` contains one entry per source, tagged with `source`:

```json theme={null}
{
  "fieldName": "Document Number",
  "value": "A1234567",
  "source": "MRZ",
  "status": "Failed"
},
{
  "fieldName": "Document Number",
  "value": "A1234561",
  "source": "VISUAL",
  "status": "Failed"
}
```

### Failure reasons

The reason of failure is displayed in `extractedData.textExtractionFailures.reasons[].type`

| `reasons[].type` | Meaning |
| - | - |
| `SourceValidity` | The value from the named source failed its own validation (check digit, format, and so on). |
| `SourceComparison` | Values from two sources don't match each other. |
| `Unspecified` | The field was flagged as failed, but no specific reason was given. |

A text failure on its own leads to **Review Needed**, because it is usually caused by a poor capture rather than by fraud.

***

## 5. Minimum Age Requirement

`verificationType: "MinAgeRequirement"`

> [!NOTE]
>
> This entry is **only included** when **Restrict Age** is turned on in your template and the minimum age is above 0.

Calculates the holder's current age from the **Date of Birth** field. If the date can't be read, it uses the document's own **Age** field.

| Status | Meaning |
| - | - |
| `Passed` | The holder is at or above the minimum age. |
| `Failed` | The holder is below the minimum age. **The whole verification is Rejected.** |

***

## 6. Document Expiration Check

`verificationType: "DocumentExpirationCheck"`

Checks the document's **Date of Expiry** against the current date.

| Status | Meaning |
| - | - |
| `Passed` | The document is not expired. |
| `Failed` | The document is expired. |
| `Not Performed` | The document has no expiry date, or it could not be read. |

***

## How the final verdict is decided

The overall result (`verificationStatusCode`, also sent in the webhook) is decided in this order. The first rule that matches wins.

| Condition | Result |
| - | - |
| Document doesn't match your **Document Type Filter** (any document in the request) | **Rejected** |
| Holder is below the **minimum age** (any document) | **Rejected** |
| Any **security check** is `Failed` | **Rejected** |
| Holder matched your **custom watchlist** | **Review Needed** |
| Checks failed, and **all** the failures are in `DocumentQualityCheck` and/or `DocumentTextExtraction` | **Review Needed** |
| Any other check failed (for example, `DocumentTypeCheck` or `DocumentExpirationCheck`) | **Rejected** |
| All checks passed | **Verified** |
| The result is inconclusive | **Review Needed** |

### Document-specific adjustments

Some genuine documents always trip a particular check because of how they are made (for example, a photo glued onto thin card stock, or a card that is always printed in black and white). For these documents, IDmeta overrides the check before the result is stored. The API response, the dashboard and the webhook therefore always show the same result.

***

## Key takeaways

* `Not Performed` never counts against a document.
* A failed **security** check always rejects the verification.
* **Quality** and **text** failures on their own lead to Review Needed. Ask the user to retake the photo.
* On two-sided documents, a failure on either side counts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.