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

# ユーザー認証の流れ：KYCフローとUX

> Diditの検証UXを一通り解説します。ID撮影、生体ライブネス、スマートな再試行、リアルタイムのフィードバックで、業界トップクラスの完了率を目指します。



セッションライフサイクルのプロンプト
        Copy prompt to clipboard



      
      

\<pre>

\````# Goal — drive a user through a full verification session

The session is the unit you build against. One `POST /v3/session/` returns a hosted URL; your user opens it; Didit runs the workflow; you receive a webhook with the decision.

For the complete recipe (SDK pick per platform, HMAC signature pipeline, decision parsing, every status), copy the canonical prompt at:

https://docs.didit.me/integration/integration-prompt

\## Session lifecycle at a glance

\| Phase | Trigger | What happens |
\|---|---|---|
\| Create | `POST https://verification.didit.me/v3/session/` | Returns `session_id`, `url`, `session_token`. Status = `Not Started`. |
\| User opens `url` | SDK / iframe / redirect | Status flips to `In Progress`. The hosted flow handles country, ID capture, liveness, retries. |
\| Processing | Didit backend | OCR, liveness, face match, AML, etc. run; per-feature plural arrays populate on the decision. |
\| Decision | `status.updated` webhook | One of `Approved`, `Declined`, `In Review`, `Awaiting User` (KYB resub), `Resubmitted`, `Abandoned`, `Expired`, `Kyc Expired`. |

\## Create a session

\```bash
curl -X POST https://verification.didit.me/v3/session/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "$WORKFLOW_ID",
"vendor_data": "user-42",
"callback": "https://myapp.com/kyc/return"
}'
\```

Always pass `vendor_data` — it is the linking key that binds the session to the persistent [User entity](/entities/users/overview). Without it the session is orphaned.

\## Receive the decision

Webhook (recommended) — register a destination with `webhook_version: "v3"` subscribed to `status.updated` and `data.updated`. Verify the `X-Signature-V2` header (HMAC-SHA256 of canonical JSON).

Polling fallback —
\```bash
curl https://verification.didit.me/v3/session/$SESSION_ID/decision/ \
-H "x-api-key: $DIDIT_API_KEY"
\```

The V3 decision returns plural arrays for every feature: `id_verifications[]`, `liveness_checks[]`, `face_matches[]`, `aml_screenings[]`, `nfc_verifications[]`, `proof_of_address_checks[]`, etc. Never assume V2 singular fields.

\## Failure modes

\- Missing API key → `401 {"detail": "Invalid or missing API key"}`.
\- Invalid `workflow_id` → `400`.
\- User abandons the flow → status becomes `Abandoned`.
\- Workflow asks for resubmit → status `Resubmitted`, payload includes `resubmit_info`; re-deliver the same `url`.

\## Sources of truth

\- /sessions-api/create-session — request body schema
\- /sessions-api/retrieve-session — V3 decision schema
\- /integration/verification-statuses — literal status strings
\- /integration/webhooks — signature verification, retries
\- /reference/data-models — per-feature decision shape
\- /integration/integration-prompt — canonical end-to-end prompt````

\</pre>



      
      

Paste into

このガイドでは、**身分証明書の確認とライブネステスト**のセッションで、一般的なエンドユーザーが体験する内容と、高い完了率を生むUXの最適化を解説します。このDidit Academyのレッスンでは、ユーザーに見えるとおりにホスト型フローを順に追います。最初の画面、書類の撮影、ライブネスのセルフィー、承認から拒否まですべての結果画面を扱います。[ユーザーが実際に見る画面 — Didit Academy](https://www.youtube.com/embed/LzGe-dMWjUw?rel=0\&playsinline=1)## フローの概要![開始画面から、IDとセルフィーの撮影を経て結果表示までの、Diditの本人確認のユーザージャーニー](https://mintcdn.com/didit-0f962782/z6T2GHM4Zh-iSj-K/images/user-verification-flow.png?fit=max\&auto=format\&n=z6T2GHM4Zh-iSj-K\&q=85\&s=cc77846e25a476c7e91281295f079e80)**1. 開始画面**ユーザーは、期待を明確に伝える、すっきりとしたブランド付きの画面（例：「身分証明書とご自身の顔が必要です」）に到達します。不安を取り除くことで離脱を減らします。**2. 国と書類の選択**ユーザーは、国と書類の種類（パスポート、IDカードなど）を選びます。> [!NOTE]
>
> ワークフローが**単一の書類タイプ**に設定されている場合、この画面は**自動的にスキップ**され、ユーザーはそのまま撮影に進みます。**3. インテリジェントな再試行つきのID撮影**ユーザーは書類の表面を撮影します。
**端末内での品質チェック** — 送信の前に、SDKが反射、ぼけ、端の見切れをチェックします。問題が検出されると、ユーザーは撮り直しを求められます。**ガイド付き再試行によるバックエンド検証** — 送信後は次のとおりです。- **合格** → ライブネスに進む
- **不合格** → 一般的なエラーではなく、具体的な指示（例：「書類の有効期限切れ」、「MRZが読み取れません。明るい場所で撮り直してください」）がユーザーに表示されるこのセルフサービスの再試行ループにより、通過率が大幅に向上します。検証結果の全一覧は、[本人確認の警告](https://docs.didit.me/core-technology/id-verification/warnings-id-verification.md)を参照してください。**4. ライブネスと顔照合**セルフィーによるライブネスチェックで、ユーザーがその場にいることを確認し、リプレイやディープフェイクによる攻撃を防ぎます。ユーザーが時間内に応答しない場合、処理は即時に失敗とせず、**自動的に1回再試行**します。**5. 最終結果**すべてのチェックが完了すると、ユーザーには次の3つの結果のいずれかが表示されます。| 結果 | 説明 |
| - | - |
| **Approved** | すべてのチェックに合格しました。データが抽出され、API/Webhookで利用できます。 |
| **Declined** | システムが、検証を承認できないと判断しました。 |
| **In Review** | 自動チェックでは結論が出ませんでした。手動レビューが必要です。 |スマートなUX、段階的な検証、実用的なフィードバック、穏やかな再試行を組み合わせることで、Diditの検証ジャーニーは、正当なユーザーをスムーズに進め、悪意ある者を締め出します。手作業による介入は不要です。


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