Add Didit KYC to a Clerk App: 7 Steps (2026)
Clerk handles sign-in. With no documented native connector, use our session API and signed webhooks to gate access. A full KYC check costs $0.33 per completed check.

Contents
In this guide
Jump to the part you need.
This guide is for teams whose sign-up and sign-in already run on Clerk and who need identity verification before a new account gets access. There is no documented native Clerk connector, so you connect Clerk users to Didit through the documented session API and webhooks. A full KYC check is $0.33, the sandbox is free, and the main caveat is that the Didit API key stays on your server.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
Didit with Clerk at a glance
| Item | Answer |
|---|---|
| Native Clerk connector from Didit | None documented. Use the session API plus webhooks. |
| Price per full KYC check | $0.33 (ID document $0.15, passive liveness $0.10, face match $0.05, device and IP analysis $0.03) |
| Sandbox | Free and unlimited on every plan. New sandbox keys start with sk_test_. |
| Free plan credit | On Free, the first organization created with an eligible work email for the company domain receives $10.00 in monthly credit. The credit excludes phone verification codes. |
| What links a Clerk user to a Didit session | Your Clerk user id, sent as vendor_data at creation, plus the session_id you record for that verification attempt |
| Where the decision comes from | Signed webhooks update the status shown to the user. Access comes only from a current decision lookup for the recorded session. |
| When you grant access | Only when GET /v3/session/{session_id}/decision/ for the session you recorded returns Approved |
| Business verification for Clerk organizations | Same API, a KYB workflow instead of a KYC workflow, from $2.00 per company |
What you build
Clerk authenticates the account. We check the person's identity before your app grants access to the verified area.
Your server creates a Didit session with the Clerk user id as vendor_data, and it records the returned session_id as the session for that verification attempt. You send the person to the hosted verification URL. We run the checks and send a signed webhook to your endpoint, and your endpoint matches the event to that recorded session and updates the status shown to the user. Before you grant protected access, retrieve the current decision for the recorded session and require Approved.
We serve 4,000+ companies. We support verification across 220+ countries and territories, and the verification flow is available in 54 languages. Inference latency is sub-2-second p99. The flow itself is hosted by us, so the Clerk user leaves your page and comes back to your callback URL.

How the Didit and Clerk integration works
| Part | Who runs it |
|---|---|
| Session creation and decision lookup | Your server, with the x-api-key header |
| Hosted verification flow | Didit, at the url returned by the create call |
| Status delivery | We post signed webhooks to your endpoint |
| Access gate | Your server, on a current decision lookup for the recorded session |
There is an optional build-time helper. The Didit integration prompt is the documented resource an assistant can use to write the integration, and the Didit MCP setup page covers the MCP server at https://mcp.didit.me/mcp, which signs in with OAuth. Neither changes the runtime contract: a session, a hosted URL, and a signed webhook. Signed webhooks update the status shown to the user. For each protected request, retrieve the current decision for the user's recorded session and grant access only if its status is Approved.

Prerequisites
| Requirement | Detail |
|---|---|
| Didit plan | Free works. On Free, the first organization created with an eligible work email for the company domain receives $10.00 in monthly credit. The credit excludes phone verification codes. Sandbox testing is free and unlimited. Growth is $99.00 a month with $115.00 of credit, and Scale is $299.00 a month with $350.00 of credit. |
| Didit account and application | An Organization at business.didit.me, with one Application for the project. Keys are scoped to the Application. |
| Didit workflow | A KYC workflow built in the console from the KYC template. Keep the workflow UUID. |
| API key | From Developers, then API keys, in the console. New live keys start with sk_live_ and new sandbox keys with sk_test_, followed by 43 URL-safe characters. Older keys can have no prefix. Server side only. |
| Key permissions | The key that reads decisions needs the read:sessions privilege. A scoped key without it returns 403. |
| Clerk side | An app where you can run server code and expose one POST endpoint for the Didit webhook. The Clerk user id is the only identifier you need. |
| Callback origin | An https URL on your own domain that the hosted flow can redirect to when the person finishes. |
Step by step: adding Didit KYC to a Clerk app
Step 1: Create the Didit Organization and Application
Go to business.didit.me, sign up with SSO or with email and password, and create your Organization. The Organization is where your team manages workflows, API keys and verification activity. Create one Application for the Clerk project so keys and sessions stay separate from anything else you build later.
Step 2: Build the KYC workflow in the console
Open Workflows in the sidebar and click New workflow. Choose Verifying users, then Start from a template and pick KYC. A Simple workflow runs its steps in a fixed order. A Node-based workflow branches on results if you want to send a warning case down a different path.
Before you publish, confirm that the template includes ID verification, passive liveness, face match and Device and IP Analysis. Those four steps are what make a full KYC check $0.33: $0.15 for the ID document, $0.10 for passive liveness, $0.05 for face match and $0.03 for device and IP analysis. Publish, then copy the workflow UUID. It goes into every session you create.
Step 3: Copy the API key
In the console, pick your Application from the dropdown at the top, then open Developers and API keys. The Primary key is the Application's own secret. Copy it into a server-side environment variable, for example DIDIT_API_KEY. Keep DIDIT_LIVE_API_KEY for production and point DIDIT_API_KEY at the sandbox key while you build, because every check in sandbox is mocked and free.
Send the Didit API key in the x-api-key header on server-side requests to verification.didit.me. Treat it as a server-side secret and never ship it to a browser or mobile bundle.
Step 4: Create a session with the Clerk user id
Do this from your server, in the code path that runs after Clerk has told you about the new user. Send the Clerk user id as vendor_data. The create call returns the session_id; record it as the session for this verification attempt, next to the Clerk user id.
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_2c9fExampleClerkId","callback":"https://myapp.com/kyc/return","metadata":{"plan":"pro"}}'
The response contains session_id, url and session_token. Redirect the person to url, or open it in an iframe or WebView. We append ?verificationSessionId={session_id}&status={status} to your callback URL when the flow finishes, so your return page can show the right message.
Two things bite here. If your Application has allowed domains set, the callback origin must be on that list, otherwise creation fails with 400 on callback. And the callback query string is for display only. It is not a verified result, so never grant access from it.
Step 5: Register a webhook destination
Register the destination and store the signing secret before you send the first sandbox user to the hosted flow, so no early delivery arrives without a secret to verify it against. Subscribe at least status.updated. Add data.updated if your team edits verification data in the console and you want to know about it.
curl -X POST https://verification.didit.me/v3/webhook/destinations/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label": "Clerk app", "url": "https://myapp.com/api/webhooks/didit", "subscribed_events": ["status.updated","data.updated"], "webhook_version": "v3"}'
Store the returned secret_shared_key as DIDIT_WEBHOOK_SECRET. You can read it again with GET /v3/webhook/destinations/{destination_uuid}/. There is no wildcard subscription, so list every event family you want.
Step 6: Verify the signature and dedupe
One header, one algorithm. X-Signature-V2 is HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON of the event, keyed with the destination secret. Verify X-Signature-V2 with the current destination secret. During rotation, verify X-Signature-V2-Previous with the previous secret while it is available; we send it for 24 hours after a destination's signing secret is rotated. Compare in constant time and accept a match on either header.
Both headers use HMAC-SHA256. They differ in what they sign: X-Signature-V2 signs sorted, Unicode-preserved canonical JSON, and X-Signature signs the original request bytes, so the raw-body signature only works if your stack hands you the body untouched. Read the raw body before you parse JSON, because parsing and re-encoding breaks that hash.
Freshness is a separate check. Reject the delivery if X-Timestamp, in Unix epoch seconds, differs from your server clock by more than 300 seconds, even if the signature matches.
Then dedupe on event_id. Apply the update idempotently and record the event_id when the update succeeds. Return 2xx within five seconds for a successfully processed event or a duplicate that was already processed. We retry twice, roughly 1 and 4 minutes after a failed delivery, then drop it, and you can resend from the destination's delivery log.
Step 7: Gate access on the status string
Statuses are exact, case-sensitive strings. Branch on them with strict equality. At session creation, take the Clerk user ID from the authenticated Clerk session and associate it with the returned Didit session_id. In the webhook handler, look up the recorded attempt by session_id and match the signed event's vendor_data, application_id and environment. Use matched status.updated events to refresh the recorded decision, and handle duplicate deliveries by event_id. When a user requests a protected route, use their authenticated Clerk user ID to read the current attempt. Before granting access, retrieve the current decision for the recorded session and require its status to be Approved, so an earlier Approved event arriving after a newer Declined event cannot reopen access. A sandbox approval must never grant production access.
| Didit status | Meaning | App behaviour |
|---|---|---|
Approved | All checks passed | Grant access and record the verification date |
In Review | Warnings need a human | Keep the account pending until a reviewer decides |
Declined | One or more checks failed | Block the verified area, offer a resubmission if the failure is fixable |
Not Started, In Progress, Resubmitted | Flow not finished | Keep the account pending and let the person resume |
Awaiting User | KYB only: waiting for one or more parties to finish their own verification | Keep the account pending |
Expired, Abandoned, Kyc Expired | Link timed out, the person never finished, or an approved document passed its expiry date | Keep access closed. A reviewer, or PATCH /v3/session/{sessionId}/update-status/, can move Abandoned or Kyc Expired to Resubmitted. Starting a fresh session instead is your app's choice. |
When you need the answer without waiting for a delivery, read the decision for the session you recorded:
curl https://verification.didit.me/v3/session/SESSION_ID/decision/ \
-H "x-api-key: API_KEY"
The returned status answers the access question for that Clerk user, and session_id confirms you read the right attempt. Branch on session_kind first: user for KYC sessions and business for KYB. The V3 decision returns plural arrays: id_verifications[], liveness_checks[], face_matches[], aml_screenings[]. If a feature did not run, the field is absent or null. Never assume singular V2 fields.

In Review case gets decided.Field and event mapping
| Didit field or event | What it carries | Where it goes |
|---|---|---|
vendor_data | Your stable identifier, echoed in responses and webhooks | The Clerk user id, set once at session creation |
session_id | UUID of this verification | Your own record, keyed by the Clerk user id, one row per attempt |
status.updated | Envelope plus a decision object on Approved, Declined, In Review and Abandoned | A notification that updates the recorded status shown to the user |
event_id | UUID of the event. Use it to deduplicate repeat deliveries. | Your dedupe key |
status | One exact string from the status list | The verification state you store and read later |
application_id, environment | Which Didit application sent the event, and live or sandbox | Match both before you change access |
metadata | Arbitrary JSON you sent at creation, never shown to the user | Your own flags, for example plan tier or signup source |
decision.id_verifications[] | Document data, OCR fields, barcodes, warnings | Server side only. Do not copy identity payloads into anything the browser can read. |
biometric_retention.deletes_at | The date live biometric data for the session is deleted | Your retention record, for privacy requests |
One rule covers most questions here: the client only ever learns approved, pending or blocked. Every other field stays behind your server.
Test with sandbox data
Sandbox is free and unlimited on every plan. Use the sk_test_ key, create your sessions against the same endpoints, and every check comes back mocked, so you can run the full path without a real ID document.
The sandbox catalog gives you named scenarios. List them with GET /v1/sandbox/scenarios/, then pass a slug as sandbox_scenario on session creation. The scenario expands its bundled magic values onto contact_details and expected_details so the session reproduces that outcome. You can also arm or re-arm a scenario after creation with POST /v3/session/{session_id}/sandbox/arm/, as long as the session is still Not Started. The field is rejected with 400 on a live application.
What success looks like
- The create call returns
session_id,urlandsession_token, and the URL opens the hosted flow. - Completing the flow posts
status.updatedto your endpoint withenvironmentset tosandboxand the scenario slug insandbox_scenario. - An approved scenario arrives with
statusequal toApprovedand adecisionobject that carries the result arrays for the steps that ran, for exampleid_verifications[],liveness_checks[]andface_matches[]. - Leave one sandbox session unopened and confirm its decision is
Not Started. Run a declined scenario from the catalog and confirm its decision isDeclined. Both must keep protected access closed. - The signature check passes against
DIDIT_WEBHOOK_SECRET, and a replayed delivery is ignored because theevent_idis already stored. - The Clerk user you tested with is marked verified once, not twice, and the event matches the
session_idyou recorded.
Error cases and fixes
| Symptom | Cause | Fix |
|---|---|---|
401 on verification.didit.me | The x-api-key header is wrong, malformed, revoked or expired | Use a valid key, and replace a revoked or expired key with a fresh one from Developers, then API keys |
403 on verification.didit.me | The x-api-key header is missing, the key's permission does not cover the requested action, or the call comes from an address outside the key's IP allowlist | Send x-api-key, check the key's permission for that action, and check its IP allowlist. Decision retrieval needs read:sessions. |
403 with application_deleted | The key's application was deleted | Do not retry. Use a key from an application that exists. |
| 400 on session create | Invalid workflow_id, or a bad session_expiration_time | Copy the workflow UUID from Workflows, and keep expiry between 3600 and 2419200 seconds |
| 400 saying the callback must be on one of the application's allowed domains | Allowed domains are set and your return URL is not on them | Add the exact scheme, host and port, or use a deep link scheme which is always accepted |
| 404 on the decision route | The session does not exist, it belongs to another application, or a scoped key does not cover its sessions | Check that you use the key of the application that created the session, and that the key's limits include that session |
| 429 | Rate limit | Back off for the number of seconds in the wait field, then retry |
| Webhook delivery fails | Your handler answered after more than 5 seconds, or it returned a 5xx or 404 response | We retry twice, after about 1 and 4 minutes, then drop the delivery. Fix the handler, then resend from the destination's delivery log. |
| Signature never matches | X-Signature-V2 was computed over JSON that was parsed and re-encoded instead of canonicalized, X-Signature was computed over a parsed body instead of the original request bytes, or the signing secret does not match | Canonicalize the JSON before computing X-Signature-V2, and keep the raw bytes for X-Signature. Verify X-Signature-V2 with the destination's current secret and X-Signature-V2-Previous with its previous secret during rotation. |
| Timestamp rejected | X-Timestamp is more than 300 seconds from your server clock | Sync the server clock. A stale timestamp fails the freshness check even when the signature matches. |
What Didit KYC costs in a Clerk app
We charge per completed check from prepaid credit.
| Item | Price (USD) | Unit |
|---|---|---|
| Full KYC check | $0.33 | check |
| ID document only | $0.15 | check |
| Passive liveness | $0.10 | check |
| Face match 1:1 | $0.05 | check |
| Device and IP analysis | $0.03 | check |
| AML screening | $0.20 | check |
| Ongoing AML monitoring | $0.07 | user per year |
| White label flow | $0.10 | check |
| Workflow Orchestrator, MCP server, reusable KYC | Free | included |
| Business verification (KYB) | From $2.00 | company |
Plans: Free is $0.00 with $10.00 of monthly credit for eligible organizations. Growth is $99.00 a month with $115.00 of credit and discounts the KYC and AML checks in this guide by 4%. Scale is $299.00 a month with $350.00 of credit and discounts them by 10%. Enterprise is a custom annual contract from $15,000 a year. Monthly credit does not roll over, and top-ups last 12 months.
Worked example: 1,000 sign-ups completing KYC and AML
Take 1,000 new Clerk users a month, each completing a full KYC check plus AML screening, on the Growth plan.
- KYC at the Growth price: 1,000 x $0.3168 = $316.80
- AML at the Growth price: 1,000 x $0.1920 = $192.00
- Growth usage total: $316.80 + $192.00 = $508.80
- Minus the $115.00 of monthly credit included in the plan: $508.80 - $115.00 = $393.80 drawn from top-ups
- Effective monthly cost: $99.00 plan fee + $393.80 = $492.80
- Cost per user completing both checks: $492.80 / 1,000 = $0.4928
The list-price usage total before credits is 1,000 x $0.33 = $330.00 for KYC plus 1,000 x $0.20 = $200.00 for AML, so $530.00. The $10.00 of Free plan credit covers 30 completed full KYC checks at $0.33 each, with $0.10 left.
Disconnecting Didit from your Clerk app
- Stop creating new Didit sessions: remove the create call from your sign-up path.
- Decide how to handle pending attempts before you retire the webhook endpoint.
- Remove the Didit credentials from this app.
- Follow your organization's retention and deletion requirements for stored verification records. When present,
biometric_retention.deletes_atgives the deletion date for the session's live biometric data.
Sources
- Didit Quick Start
- Didit API Authentication
- Didit Create Session API
- Didit Retrieve Session Decision API
- Didit Webhooks
- Didit Verification Statuses
- Didit Web SDKs overview
- Didit integration prompt
- Didit pricing page
- Didit pricing as JSON
- Didit pricing in the docs
- Didit MCP server
- Didit Business Console
Start in the sandbox at business.didit.me. It is free, there is no sales call, and you can run your first session against a Clerk test user before you touch a live key.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
How do I add identity verification to a Clerk app?
Your server creates a session with the Clerk user id as vendor_data, then records the returned session_id as the session for that attempt. Your app redirects the person to the hosted url. When the signed status.updated webhook arrives, your server matches it to the recorded session and updates the status shown to the user. Access opens only after a fresh decision lookup for that session returns Approved.
Is there an official Didit integration for Clerk?
There is no documented native Clerk connector. The documented route is the session API plus webhooks, with the Clerk user id carried in vendor_data and the session_id recorded per attempt.
How much does Didit KYC cost per Clerk user?
A full KYC check is $0.33, made of ID document verification at $0.15, passive liveness at $0.10, face match at $0.05 and device and IP analysis at $0.03. AML screening adds $0.20. On Growth the same check is $0.3168 and on Scale $0.297.
Where do I store the verification result for a Clerk user?
On your own side, keyed by the Clerk user id, as a small record holding the session_id, the status string and the date. Expose three UI states to the client: approved, pending and blocked. Your server enforces access to protected routes, so the browser never decides. Do not copy document data, liveness frames or AML hits into anything the browser can read.
Can I require identity verification before a user reaches the app?
Yes. Create the session right after the user exists in Clerk, send them to the hosted URL, and keep the verified area closed until the current decision for their recorded session is Approved. The person can still sign in with Clerk, but the gate decides what they see, not the sign-in itself.
Does the Didit API key go in the browser or in Clerk?
Neither. The key is a server-side secret, and the verification API does not use OAuth bearer tokens, it reads the x-api-key header. Keep it in your backend environment, never in a client bundle, a public repository or Clerk configuration that a browser can read.
What happens if a user abandons verification and comes back?
If the session is still valid, send the person back to the same url: Not Started and In Progress both let them resume, and you can check expires_at on the decision. If the session has timed out and the status is Expired or Abandoned, keep access closed and record a new attempt with a new session_id. Starting a fresh session is your app's choice, and a reviewer can also request a resubmission for Abandoned or Kyc Expired.
Which Didit statuses should block access?
Grant access only when the current decision for the recorded session is Approved. Treat In Review, Not Started, In Progress, Resubmitted and Awaiting User as pending, and note that Awaiting User applies to KYB sessions only. Treat Declined as blocked, and keep access closed on Expired, Abandoned and Kyc Expired.
How do I test without real identity documents?
Use your sk_test_ key and the sandbox catalog. List the scenarios with GET /v1/sandbox/scenarios/, pass one as sandbox_scenario when you create the session, and the outcome is reproduced without a real document. Sandbox is free and unlimited on every plan.
Do I need a webhook if the callback already returns a status?
Use signed webhooks for automatic status updates. For each protected request, fetch the current decision from Didit on your server and require Approved for the user's recorded session. Callback parameters arrive through the browser, so use the server-side decision for access and treat the parameters as display hints. Handle the case where the browser never returns.
Can I verify a Clerk organization as a business instead of a person?
Create a session with a KYB workflow. For a Clerk organization, pass its stable organization ID as vendor_data and put company_name, registry_country and registration_number inside expected_details. KYB starts at $2.00 per company for company registry retrieval, and linked KYC and person AML for owners and officers are billed separately. Branch on session_kind in every handler.
Can an AI assistant write this integration for me?
The Didit integration prompt is the documented resource an assistant can use to write the integration: it covers the account, workflow, session, hosted UI, webhook and decision steps. The MCP server at https://mcp.didit.me/mcp signs in with OAuth if your client supports it. Give the assistant your framework and say that the Clerk user id becomes vendor_data.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


