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

# Selfie and Face Match

> Compare the photo on the document with a selfie.

Face Match compares the applicant's selfie with the photo on their identity document and returns a similarity score. It confirms that the person completing the verification is the document holder.

| | |
| - | - |
| API identifier | `face-matching` |
| Result key | `servicesResults.faceMatching` |
| Requires | Both a selfie and a document must be provided |

## When to use it

* Any onboarding where you need to know the applicant is the owner of the document
* Together with [Liveness](https://docs.checkin.com/products/liveness.md): Face Match shows the faces match, Liveness shows a real person took the selfie

## How it works

1. If the selfie step is enabled in the flow, the applicant is asked to capture their face.
2. Auto-capture takes the photo as soon as the face fits the oval frame. If the applicant struggles, a manual capture button is available as a fallback.
3. The selfie is compared with the portrait on the document. When the chip was read with [NFC](https://docs.checkin.com/products/nfc.md), the chip portrait is used instead.
4. The result shows how similar the faces are, and your verification rules decide the status.

With [instant liveness](https://docs.checkin.com/products/liveness.md#liveness-methods), liveness is assessed during the same selfie capture.

![Flow Main](https://mintcdn.com/checkin-com/25GVaDB7DHI1hjGE/images/flow-main.png?fit=max\&auto=format\&n=25GVaDB7DHI1hjGE\&q=85\&s=9e0aa134840fb8b9b505654bfaf6f563)

Web SDK flow with Document Check, selfie and liveness

## Request

In the API, send the document and the selfie in the same application:

```json theme={null}
{
  "verificationTypes": ["data-extraction", "face-matching"],
  "application": {
    "documents": [
      {
        "files": [{ "kind": "single-page", "uri": "data:image/jpeg;base64,..." }]
      }
    ],
    "selfie": {
      "files": [{ "kind": "selfie", "uri": "data:image/jpeg;base64,..." }]
    }
  }
}
```

In the Web SDK, mobile SDKs and verification links, Checkin.com handles the capture, so image requirements only apply when you send files through the API.

Through the API, send an image, or a video as WebM (VP8) or MP4 (AVC), of up to 10 MB. We recommend images of 720p or higher.

See [File requirements](https://docs.checkin.com/integrate/api/submit-application.md#file-requirements).

## Configuration

Turn on **Face portrait** in **Flows → \[flow name] → Services**. It adds the selfie step and matches the selfie with the document portrait. There are no other settings for the selfie step.

In **Settings → Verification rules → Facial Similarity Check** (or the flow's own verification rules), you choose whether each selfie finding sends the application to review or declines it: not a real selfie, mismatch with liveness, missing photos, multiple faces.

See [Verification rules](https://docs.checkin.com/backoffice/verification-rules.md).

## Result

| Field | Meaning |
| - | - |
| `status`, `processingState`, `comment`, `verifier` | Service outcome |
| `results[].score` | Face similarity score |
| `results[].files` | IDs of the files that were compared |
| `results[].selfieQuality` | Check list |
| `fraudAssessment.hasFaceFramesManipulation` | Result of the face frames manipulation check |
| `deepFake` | See [Deepfake detection](https://docs.checkin.com/products/deepfake-detection.md) |
| `faceRecognition` | Present when [Face Similarity](https://docs.checkin.com/products/add-ons/face-similarity.md) or [Age Estimation](https://docs.checkin.com/products/add-ons/age-estimation.md) is requested |
| `biometrics` | See below |

### Example

```json theme={null}
{
  "faceMatching": {
    "serviceType": "face-matching",
    "status": "approved",
    "processingState": "done",
    "comment": "Face is similar to the one in the document\nLevel of confidence is 89%",
    "results": [
      {
        "score": 0.8913,
        "files": ["images/...", "images/...", "images/...", "images/..."],
        "selfieQuality": {
          "group": "selfieQuality",
          "description": "Selfie provided",
          "considers": [
            { "id": "FM006", "name": "faceMatch", "type": "clear", "status": "approved", "description": "Face is similar to the one in the document" },
            { "id": "FM007", "name": "multipleFacesFound", "type": "clear", "status": "approved", "description": "One face at photo." }
          ]
        }
      }
    ],
    "biometrics": { "calculated": { "...": "see below" } }
  }
}
```

`comment` shows the score as a level of confidence, for example `0.8913` as 89%. `results[].files` lists every image that was compared, which can include liveness frames.

### Biometrics

`faceMatching.biometrics.calculated` can contain:

| Field | Example value |
| - | - |
| `issues` | `0` |
| `match` | `false` |
| `ageDifference` | `0` |
| `acceptableAgeDifference` | `5` |
| `ageDifferenceOk` | `true` |
| `breakdowns` | Check list, for example `FM009` `faceSimilarityVerification` |
| `summary` | `appsDateStart`, `appsDateEnd`, `documentTypeMatch`, `personalDetailsMatch` |

See [Face Similarity](https://docs.checkin.com/products/add-ons/face-similarity.md) and [Age Estimation](https://docs.checkin.com/products/add-ons/age-estimation.md).

## Concerns

| Code | Message |
| - | - |
| `FM003` | This is not a selfie. |
| `FM004` | Faces are not similar between selfie and liveness |
| `FM005` | Face matching is not possible: documents or selfie are not provided |
| `FM006` | Face is not similar to the one in the document |
| `FM007` | Multiple faces found at photo. |
| `FM008` | Potential video stream manipulation detected. |

Face Similarity, Age Estimation and Deepfake detection concerns are on their own pages.

All codes are in [Considers lists](https://docs.checkin.com/integrate/results/considers-lists.md).


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