> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/kyc-mobile-sdk/sdk-user-journey.md).

# SDK User Journey

## Document Verification & Liveness via KYC SDK

From your app's perspective, there is **one entry point: the KYC SDK**. Once your app starts the KYC flow, the SDK calls Document Capture, Liveness, and Face Match in the right order and returns a single result.

You don't need to integrate separate "document SDK" and "liveness SDK" flows yourself.

```
Host App → KYC SDK → Document Capture → Liveness → Face Match → KYC SDK → Host App
                      └──────── handled inside the SDK ────────┘
```

{% hint style="info" %}
**Using Liveness on its own?** If a client plans to use Liveness as a standalone feature, see Liveness integration for instructions.
{% endhint %}

### Step 1: Choose the flow

When building the KYC configuration (`VidaKycRequest` on Android, `VIDAKYCConfig` on iOS), choose which checks the SDK runs.

| Flow                | Android           | iOS               | What it runs                                                               |
| ------------------- | ----------------- | ----------------- | -------------------------------------------------------------------------- |
| **ID Verification** | `ID_VERIFICATION` | `.idVerification` | Document capture, OCR, document verification                               |
| **Full KYC**        | `KYC`             | `.kyc`            | Document capture, OCR, document verification, selfie, liveness, face match |

{% hint style="warning" %}
For **Full KYC**, you must also attach a liveness configuration: `livenessConfig` (Android) / `VIDALivenessConfig` (iOS).
{% endhint %}

Once the flow type is set, the same `startFlow()` call runs all the required components automatically.

### Step 2: How the SDK runs the flow

When your app calls `startFlow()`:

{% stepper %}
{% step %}

#### KYC SDK → Document Capture

* Opens the SDK camera UI.
* Guides the user to capture the document, with auto-capture and quality checks (blur, glare, cropping, etc.).
* Sends the frames to the backend for OCR and document verification.
  {% endstep %}

{% step %}

#### Document Capture → Liveness

*Full KYC only.*

* After the document step is complete, the SDK moves to selfie capture.
* It collects the frames the liveness engine needs and runs the liveness checks.
  {% endstep %}

{% step %}

#### Liveness → Face Match

*Full KYC only.*

* The selfie is compared to the portrait extracted from the document.
* The face verification result is combined with the document and liveness results.
  {% endstep %}
  {% endstepper %}

All of these hops happen inside the SDK according to your chosen flow. The user experiences one continuous journey.

### Step 3: Get the combined result

When all internal steps finish, the SDK returns **one response object** in the success callback.

{% tabs %}
{% tab title="Android" %}
`onSuccess(VidaKycResponse)`

| Method                             | Returns                         |
| ---------------------------------- | ------------------------------- |
| `getVidaCardVerificationDetails()` | Document and OCR results        |
| `getVidaFaceMatchDetails()`        | Liveness and face match details |
| {% endtab %}                       |                                 |

{% tab title="iOS" %}
`onSuccess(response: VIDAKYCResponse)`

| Property                    | Returns                  |
| --------------------------- | ------------------------ |
| `ocrIdVerificationResponse` | Document and OCR results |
| `livenessResponse`          | Liveness results         |
| `faceVerificationResponse`  | Face match results       |
| {% endtab %}                |                          |
| {% endtabs %}               |                          |

{% hint style="success" %}
**Summary:** You don't call document verification or liveness separately. Configure what you need in the KYC request, call `startFlow()`, and the SDK handles the rest.
{% endhint %}
