> ## 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 旅程与用户体验

> Didit 端到端的用户验证体验，涵盖证件采集、生物识别活体检测、智能重试和实时反馈，并经过优化，以推动行业领先的完成率。



会话生命周期 Prompt
        将提示词复制到剪贴板



      
      

\<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 → `403 {"detail": "You do not have permission to perform this action."}`. Wrong, revoked or expired key → `401`.
\- 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>



      
      

粘贴到

本指南介绍了终端用户在典型的**身份证件检查 + 活体检测**会话中的完整体验，并重点介绍了旨在实现高完成率的 UX 优化细节。本节 Didit Academy 课程严格按照用户视角完整还原托管流程：起始屏幕、证件采集、活体自拍，以及从已通过到已拒绝的各种结果页面。[用户实际看到的体验 — Didit Academy](https://www.youtube.com/embed/LzGe-dMWjUw?rel=0\&playsinline=1)## 流程概览![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. 国家/地区与证件类型选择**用户选择其国家/地区和证件类型（护照、身份证等）。> [!NOTE]
>
> 如果您的工作流配置为**单一证件类型**，系统将**自动跳过**此屏幕，直接引导用户进入采集环节。**3. 带智能重试的证件采集**用户拍摄其证件正面。
**设备端质量检查**：在提交之前，SDK 会检查反光、模糊和边缘裁剪。如果检测到问题，系统会提示用户重新拍摄。**带引导式重试的后端核验**：提交后：- **通过** → 进入活体检测环节
- **未通过** → 用户会看到具体的指导说明（例如“证件已过期”、“MRZ 无法识别，请在更充足的光线下重拍”），而非泛泛的错误提示这种自助重试闭环显著提升了通过率。请在[身份证件验证警告](https://docs.didit.me/zh/core-technology/id-verification/warnings-id-verification.md)中查看完整的核验结果列表。**4. 活体检测 + 人脸比对**自拍活体检测可确保用户本人在场，并有效防范重放及深度伪造攻击。如果用户未及时响应，流程会**自动重试一次**，而不是直接判定失败。**5. 最终结果**所有检查完成后，用户会看到以下三种结果之一：| 结果 | 描述 |
| - | - |
| **已通过** | 所有检查均已通过。数据已提取，并可通过 API/Webhook 获取。 |
| **已拒绝** | 系统判定该验证无法通过。 |
| **审核中** | 自动化检查无法得出明确结论，需要人工审核。 |您的工作流决定用户后续会看到哪些步骤，并按照您设定的顺序展示。
例如：- [电话验证](https://docs.didit.me/zh/core-technology/phone-verification/overview.md)和[邮箱验证](https://docs.didit.me/zh/core-technology/email-verification/overview.md)
- [问卷](https://docs.didit.me/zh/core-technology/questionnaires/overview.md)
- [地址证明](https://docs.didit.me/zh/core-technology/proof-of-address/overview.md)
- [生物识别同意书](https://docs.didit.me/zh/getting-started/biometric-consent.md)
- [文档签署](https://docs.didit.me/zh/core-technology/electronic-signature/overview.md)通过将智能 UX、渐进式核验、可操作反馈与平稳重试相结合，Didit 验证旅程在无需人工干预的情况下，既能让正常用户顺利完成流程，又能将不法分子拒之门外。


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