> ## 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.

# Cross Trust Validation Face Compare

> Learn how to perform face compare from current document verification potrait against a biometric selfie from a previous Trust Validation using the sourceTrustValidationId (stvid) URL parameter.

## Overview

The **Advanced Face Compare** feature can compare the potrait extracted from the document against a **Biometrics Verification selfie** from an earlier completed Trust Validation.

This is done by comparing:

* the **potrait extracted during the current Document Verification session**, and
* the **selfie captured during a previous Biometrics Verification Trust Flow**

You link the two sessions by passing the earlier Trust Validation ID as `stvid` (`sourceTrustValidationId`) in the Direct Link / preview URL.

<Note>
  This feature is available upon request and is not enabled on your account by default. If **Perform Advance Face Compare** is not available in tool settings, enable it via the feature flag on your company, or contact your support administrator.
</Note>

***

## Why this feature is needed

You may already have a completed Trust Validation that includes Biometrics Verification. Later, you may run a separate Document Verification flow and need to confirm that the person on the document matches the biometric selfie from that earlier Trust Validation.

Common situations include:

* linking a new document to an identity that was already biometrically verified
* re-checking identity continuity across separate Trust Flows
* verifying a document against a known biometric source when you already have the prior Trust Validation ID

<Note>
  Use this feature when you already know the source Trust Validation ID and want to reuse its Biometrics Verification selfie for face compare.
</Note>

***

## How it works

Create **two** Trust Flows.

### 1. Trust Flow 1 — Biometrics Verification (source selfie)

Create a Trust Flow that includes **Biometrics Verification**.

Run this flow first. When it completes, copy the **Trust Validation ID** from the result. You will pass this value as `stvid` in Trust Flow 2.

<Note>
  Do not enable **Perform Advance Face Compare** in this Trust Flow. This flow only captures and stores the source biometric selfie.
</Note>

Example Trust Flow 1 with Biometrics Verification

<img src="https://mintcdn.com/idmeta/us2zndZMfCaHq8Db/images/advance-face-compare-account-validation-trust-flow.png?fit=max&auto=format&n=us2zndZMfCaHq8Db&q=85&s=2076c149e70955a4fdd6a3eeee3a49be" alt="Trust Flow builder showing Biometrics Verification step" width="1373" height="516" data-path="images/advance-face-compare-account-validation-trust-flow.png" />

### 2. Trust Flow 2 — Document Verification with Advanced Face Compare

Create a second Trust Flow that includes **Document Verification**.

In the **Document Verification Tool Settings**, enable:

`Perform Advance Face Compare`

If this option is not visible, enable the feature flag on your company, then refresh tool settings.

<img src="https://mintcdn.com/idmeta/kWeizWB5DyP6K8P8/images/advanced-face-compare-stvid-tool-settings.png?fit=max&auto=format&n=kWeizWB5DyP6K8P8&q=85&s=ce1e9158f6ceef18e8f4fffd910e14e6" alt="Document Verification tool settings with Perform Advance Face Compare enabled" width="714" height="1024" data-path="images/advanced-face-compare-stvid-tool-settings.png" />

### 3. Pass `stvid` when running Trust Flow 2

After Trust Flow 1 has completed, run Trust Flow 2. On the preview / Direct Link URL, add the `stvid` parameter with the Trust Validation ID from Trust Flow 1:

`stvid`

Example:

```text theme={null}
&stvid=9c3987f5-2bd4-4f11-84de-4c283582f32c
```

This stands for **Source Trust Validation ID**. The system uses this value to locate the completed Trust Flow 1 result, extract the Biometrics Verification selfie as the **source image**, and perform face compare against the current Document Verification session.

<img src="https://mintcdn.com/idmeta/kWeizWB5DyP6K8P8/images/advanced-face-compare-stvid-url.png?fit=max&auto=format&n=kWeizWB5DyP6K8P8&q=85&s=1137f99a0eb7da374514d8090fd6aa6f" alt="Browser URL showing the stvid parameter appended to the Direct Link URL" width="1024" height="602" data-path="images/advanced-face-compare-stvid-url.png" />

***

## End-to-end flow

### Trust Flow 1 — capture the source biometric

The user completes Biometrics Verification in Trust Flow 1.

After completion, note the Trust Validation ID. Example:

```text theme={null}
9c3987f5-2bd4-4f11-84de-4c283582f32c
```

### Trust Flow 2 — compare using `stvid`

Initiate Trust Flow 2 (Document Verification) with **Perform Advance Face Compare** enabled.

In the Direct Link / preview URL, include the `stvid` parameter:

```text theme={null}
https://web-sdk.idmetagroup.com?...&stvid=9c3987f5-2bd4-4f11-84de-4c283582f32c
```

The platform will then:

1. look up the Trust Validation Result for the given `stvid`
2. retrieve the Biometrics Verification selfie from that earlier result
3. use the face from the current Document Verification session as the target
4. compare both faces
5. return a similarity score

<Note>
  The `stvid` value must be a valid Trust Validation ID from a completed Trust Flow that includes Biometrics Verification. If the ID is missing, invalid, or has no biometric selfie, the platform will not be able to retrieve the source image.
</Note>

***

## URL parameters

**`stvid`**

**Meaning:** Source Trust Validation ID (`sourceTrustValidationId`)

**Purpose:** Used during Trust Flow 2 to locate the earlier Trust Validation Result that contains the Biometrics Verification selfie used as the source image for face compare.

**Examples:**

* `9c3987f5-2bd4-4f11-84de-4c283582f32c`
* `c0ed3607-a8cc-4e88-b6d9-5109e2a8a390`

**Important:** Pass the Trust Validation ID from the completed Trust Flow 1 (Biometrics Verification) session.

***

## Mobile SDK

This also works on the Mobile SDK. Pass `stvid` during initialization of the KYC process:

```dart theme={null}
IdmetaFlutter.startVerification(
  userToken: userToken,
  clientId: clientId,
  trustFlowId: trustFlowId,
  stvid: '9c3987f5-2bd4-4f11-84de-4c283582f32c',
  metadata: metadata,
);
```

***

## Result behavior

When a matching prior Trust Validation Result is found through `stvid`, the system will:

* retrieve the Biometrics Verification selfie from that Trust Validation
* compare it against the face from the current Document Verification session
* generate a similarity score
* include a **Source Image Trust Validation ID** linking back to the source Trust Validation Result, so you can trace which biometric selfie was used for comparison

This score can then be used by your platform to help determine whether the faces match.

<img src="https://mintcdn.com/idmeta/kWeizWB5DyP6K8P8/images/advanced-face-compare-stvid-results.png?fit=max&auto=format&n=kWeizWB5DyP6K8P8&q=85&s=420f3368218ae10163eda3781a8d01e6" alt="Trust Validation result showing Biometrics Face Compare Advance Document Verification with Source Image Trust Validation ID" width="1024" height="405" data-path="images/advanced-face-compare-stvid-results.png" />

***

## Summary

Advanced Face Compare can reuse a Biometrics Verification selfie from another Trust Validation by ID.

To use this flow:

1. create Trust Flow 1 with **Biometrics Verification** and complete it
2. create Trust Flow 2 with **Document Verification** and enable **Perform Advance Face Compare** (enable the company feature flag if the setting is not available)
3. pass `stvid` on the Trust Flow 2 preview / Direct Link URL with the Trust Validation ID from Trust Flow 1
4. use the returned similarity score to help determine whether the faces match

The platform looks up the Trust Flow 1 biometric image via `stvid` and performs face compare against the current Document Verification session.
