KYC API Integration: Build It in 6 Steps (2026)
Create a workflow, start a hosted verification session, and confirm the outcome through a signed webhook or a server-side decision request. Full KYC costs $0.33 per completed check. The sandbox is free.

Contents
In this guide
Jump to the part you need.
This guide is for engineers who have to put identity checks inside signup, onboarding or re-authentication: create a workflow, start a session with one call, take the decision from a signed webhook, and keep a decision read as the fallback. Full KYC on Didit costs $0.33 per completed check and the sandbox is free. The caveat is sequencing: the workflow has to exist before your first session, and your webhook handler has to answer within five seconds.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
KYC API integration at a glance
| Item | Detail |
|---|---|
| API style | REST over HTTPS with JSON bodies, authenticated with an x-api-key header |
| Start a verification | POST https://verification.didit.me/v3/session/ |
| Read the decision | GET https://verification.didit.me/v3/session/{session_id}/decision/ |
| Real-time events | Webhooks signed with HMAC-SHA256 in the X-Signature-V2 header |
| Full ID check (KYC) | $0.33 per completed check |
| AML screening | $0.20 per check, or $0.53 for the KYC plus AML compliance bundle |
| Sandbox | Free and unlimited on every plan, every check mocked |
| Free plan credit | The first eligible Free-plan organization created for a company domain with a work email receives $10 in monthly credit. Phone verification codes are excluded. |
| Human review | Sessions in "In Review" wait for a reviewer in the Didit Business Console |
| Minimum setup | A published workflow, its UUID, a sandbox key and one POST. The sandbox result is mocked. |
Start free in the Didit sandbox, no sales call needed. If you would rather have an AI assistant write the glue, connect Didit to an AI assistant through our MCP server setup. Current unit prices sit on the Didit pricing page, and our User Verification product page describes the checks.
What a KYC API does
On Didit that is three objects. A workflow lists the checks and their configuration. A session is one person or business running that workflow, with a hosted URL you can redirect to, open in an SDK or embed in an iframe. A decision is what the checks produced, written as plural arrays such as id_verifications, liveness_checks, face_matches and aml_screenings. The User Verification quick start in our docs is the same flow.
This fits teams that need the verdict inside their own product: SaaS and marketplaces checking people at signup, fintechs and crypto exchanges onboarding clients, iGaming operators at registration, and any product that re-verifies existing accounts. We run identity and fraud checks for 4,000+ companies across 220+ countries and 14,000+ document types, with sub-2-second p99 inference. The integration is one call to start plus one webhook or read to finish.
Prerequisites
- A Didit organization at business.didit.me. The sandbox is free on every plan.
- An application inside that organization. The application holds the API keys and the workflows.
- A server that can receive an HTTPS POST, so webhook deliveries have somewhere to land.
- Your own stable identifier for the person, so you can pass it as
vendor_data. - No SDK required. These calls run from curl, Python, Node or anything else that speaks HTTP.
The six steps, in order
-
Create the application and copy the API key. In the console open Developers, then API keys. Every application gets a primary key with full access; create extra keys when a service or partner needs its own secret. You can also register programmatically with two calls. The address, password and code below are placeholders: use an inbox that can receive mail, a password that meets the rules (8+ characters, one uppercase, one lowercase, one digit, one special), and the six-character code from the email you receive.
curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \ -H "Content-Type: application/json" \ -d '{"email": "you@yourdomain.com", "password": "StrongP@ss1"}' curl -X POST https://apx.didit.me/auth/v2/programmatic/verify-email/ \ -H "Content-Type: application/json" \ -d '{"email": "you@yourdomain.com", "code": "A3K9F2"}'The verify-email response returns
application.api_keyfor live andsandbox_application.api_keyfor the sandbox. Store the sandbox key asDIDIT_API_KEYwhile you build, because every sandbox check is mocked and costs nothing. New keys look likesk_test_orsk_live_followed by 43 characters; keys created before that format have no prefix and still work, so never validate a key by its prefix. The key is a server-side secret and must never reach a browser bundle or a mobile app. -
Create and publish the workflow. A workflow is the list of checks a session runs. Create it once, persist the returned
id, reuse it for every session. This request configures document verification, passive liveness, face match and AML. The worked example prices a configuration that also completes device and IP analysis.curl -X POST https://verification.didit.me/v3/workflows/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_label": "Standard KYC", "workflow_type": "kyc", "features": [ {"feature": "OCR"}, {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}}, {"feature": "FACE_MATCH"}, {"feature": "AML"} ] }'You do not have to build it with curl. In the console, start from the KYC template, review the checks, and publish the workflow. A KYC workflow creates user sessions; a KYB workflow creates business sessions on the same endpoint.
-
Register the webhook destination. Do this before your first session so you can watch the initial sandbox events arrive. Subscribe the destination to
status.updatedto receive session status changes at your URL. Register a destination for each environment you use, and add destinations when consumers need different event types.curl -X POST https://verification.didit.me/v3/webhook/destinations/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"label": "Sandbox", "url": "https://myapp.com/api/webhooks/didit", "subscribed_events": ["status.updated", "data.updated", "user.status.updated", "user.data.updated"], "webhook_version": "v3"}'labelandurlare required. Save the returnedsecret_shared_keyasDIDIT_WEBHOOK_SECRET. If you lose it,GET /v3/webhook/destinations/{destination_uuid}/returns it again. There is no wildcard, so list every event family you want. -
Verify and handle the webhook. Preserve the incoming body. For
X-Signature-V2, recompute the HMAC over sorted, Unicode-preserved canonical JSON. ForX-Signature, use the exact raw bytes. Check timestamp freshness, compare in constant time and accept a match on the current or applicable previous header before acting on the event. Return a 2xx quickly to stay inside the five-second window, de-duplicate onevent_id, and apply the status to your database idempotently.X-Signature-Simpleis a deprecated last resort that authenticates only the envelope, so if you verify with it, re-fetch the decision instead of trusting the payload. Session webhooks include adecisionobject only forApproved,Declined,In Review, andAbandoned. For other statuses, handle the event using its top-level fields. -
Start a session. Call this endpoint each time your signup flow needs to create a verification session. Reuse the same
vendor_datafor the same person. Replace<WORKFLOW_ID>with the UUID you saved in step two before you run it.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"}'The response carries
session_id,urlandsession_token. Send the person tourl, open it in an SDK, or embed it in an iframe. Pass your own user id asvendor_dataso the session binds to that entity and duplicate detection works across sessions. Thecallbackis optional: it falls back to the workflow default, and if your application has allowed domains configured, an HTTP or HTTPS callback must match one of those origins, while custom app schemes are accepted. -
Read the decision as a fallback. Use it when a webhook was missed, when you backfill, or when your handler answered too slowly. The key needs the
read:sessionsprivilege.curl https://verification.didit.me/v3/session/$SESSION_ID/decision/ \ -H "x-api-key: $DIDIT_API_KEY"Branch on
session_kindbefore reading features, because the arrays differ between a person and a business.const decision = await (await fetch(url, { headers: { "x-api-key": API_KEY } })).json(); switch (decision.session_kind) { case "user": return handleUserDecision(decision); case "business": return handleBusinessDecision(decision); }
The ID document step inside a session. The same record comes back in the decision under id_verifications.
Expected output
Creating a session returns the session id, the hosted URL and a session token. When the person finishes, Didit redirects to your callback with ?verificationSessionId={session_id}&status={status} appended. Use the callback status to update the browser display. Before granting access or recording a verification outcome, confirm the result using a verified webhook or a server-side request to the decision endpoint.
A decision from GET /v3/session/{session_id}/decision/ and the same object inside the webhook carry session_id, session_kind, status, features, created_at, expires_at, decision_trace, reviews and the feature arrays. Common arrays for user sessions include id_verifications, liveness_checks, face_matches, nfc_verifications, poa_verifications, database_validations, aml_screenings, phone_verifications, email_verifications, ip_analyses, questionnaire_responses and document_ai_documents. A compact excerpt looks like this:
{
"session_id": "3f1c2b8e-0000-0000-0000-000000000000",
"session_kind": "user",
"status": "Approved",
"features": ["OCR", "LIVENESS", "FACE_MATCH"]
}
The id_verifications array holds the ID verification results when that check ran. If a check did not run, its array is absent or null, never a placeholder. Treat a missing key or a null as did not run rather than as a pass, and branch on session_kind before you read any feature array. Status is an exact, case-sensitive string.
| Status | What it means | What your integration does |
|---|---|---|
"Not Started" | The session exists, the person has not opened the link | Wait, or send a reminder |
"In Progress" | The person is working through the steps | No action |
"Approved" | The session was approved. Read decision_trace.decided_by for the decision source and status_override for any manual status override | Grant access and store the decision |
"Declined" | The session was declined. Read decision_trace.decided_by for the decision source and status_override for any manual status override | Notify the person, optionally request a resubmission |
"In Review" | Warnings need a person to settle them | Treat it as pending, a reviewer approves, declines or requests a resubmission |
"Awaiting User" | KYB only. The parent session waits on key people who were submitted | Wait, then re-check the parent session |
"Resubmitted" | The person was asked to redo specific steps | Wait for the new decision |
"Expired" | The link expired before it was opened | Create a new session and send a new link |
"Abandoned" | The person started and did not finish in time | Send a fresh link when the person returns |
"Kyc Expired" | An approved document passed its expiry date | Re-verify before the next sensitive action |
Note that "Kyc Expired" uses a single capital K, and "Awaiting User" only appears on KYB sessions.

decision_trace.status_warnings when you read the decision.A sandbox round trip you can repeat
Every sandbox check is mocked, so you can drive a session to the outcome you need before you touch live data. Four checkpoints, and each one gives you something to compare.
- Pick a scenario. Call
GET https://verification.didit.me/v1/sandbox/scenarios/with your sandbox key to read the catalog of scenario slugs. - Create the session with that slug. The create response gives you the
session_idand the hostedurl, which confirms the session exists. - Complete the hosted flow. Open the returned
urland complete the verification, then inspect the signedstatus.updateddelivery. Check that its signature verifies againstDIDIT_WEBHOOK_SECRET. The envelope and the decision both carrysandbox_scenario, which confirms the run used your scenario. - Retrieve the decision. The read returns the same scenario slug and a
statusthat matches what you asked the scenario to produce.
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", "sandbox_scenario": "decline_aml_hit"}'
A scenario slug is rejected with a 400 on a live application. You can also arm or re-arm one while the session is still Not Started with POST /v3/session/{session_id}/sandbox/arm/.
Inputs and outputs
| Field | Required | What it does |
|---|---|---|
workflow_id | Yes | UUID from /v3/workflows/. KYC workflows create user sessions, KYB workflows create business sessions |
vendor_data | Recommended | Your stable identifier for the person or business, used for duplicate detection |
callback | No | Optional redirect URL. Defaults to the workflow callback. If allowed domains are configured, an HTTP or HTTPS callback must match an allowed origin. Custom app schemes are accepted |
callback_method | No | initiator, completer or both |
metadata | No | A JSON object, echoed back in responses and webhooks, never shown to the user |
tags | No | Up to 10 names, 50 characters each, filterable in the console |
session_expiration_time | No | Seconds the link stays valid, from 3600 to 2419200 |
language | No | ISO 639-1 code for the verification UI |
expected_details | No | Name, date of birth, nationality, document types. Mismatches surface as decision warnings |
sandbox_scenario | No | Sandbox only. Reproduces a bundled outcome, rejected with 400 on live applications |
| Response | n/a | session_id, url, session_token and the tags you set |
Failure cases and recovery
| Response | Meaning | Recovery |
|---|---|---|
401 on verification.didit.me | Key wrong, malformed, revoked or expired | Re-fetch it with the login and organizations flow, or use a key that has not expired |
403 on verification.didit.me | No key header, a scoped key without access to this resource, or a call from outside the key's IP list | Use a key with that access from Developers then API keys |
403 with application_deleted | The key's application was deleted | Do not retry. The application and its keys no longer exist |
403 on the decision | The key lacks the read:sessions privilege | Use a key that holds that privilege |
400 on workflow_id | Invalid workflow UUID | Use the UUID of your published workflow |
400 on callback | Allowed domains are configured and the URL is not on one of those origins | Use an origin on the allowed list, or a custom app scheme |
404 on a session route | The session is outside the scoped key's workflows or statuses | Use a key whose limits include that session |
404 on the decision | The session does not exist or belongs to another application | Check the application that created it |
429 | Rate limit | The body carries a wait field in seconds. Back off, then retry |
| Webhook slower than 5s, 5xx or 404 | Delivery failed | Didit retries twice, after about 1 and 4 minutes, then drops it. Resend from the destination delivery log |
API integration best practices
- Keep the key on the server. The
x-api-keyheader is a long-lived secret, not a client token. Your browser gets a session URL, never the key. - Bind sessions to your own user record. Pass the same stable
vendor_datato associate sessions with the same user. Save the returnedsession_idbefore redirecting. Deduplicate webhook deliveries byevent_id. - Verify before you act. Preserve the incoming request body. Verify
X-Signature-V2against sorted, Unicode-preserved canonical JSON, orX-Signatureagainst the exact raw bytes. Check timestamp freshness, compare signatures in constant time and process the event only after verification succeeds. - Read the plural arrays. The V3 decision uses
id_verifications[],liveness_checks[]and the rest, because one workflow can run a step more than once. Singular V2 fields are gone. - Match status strings exactly.
"In Review"has a space and two capitals. Use strict equality, never a prefix match.
Paid steps and review boundaries
Billing is per completed check from prepaid credit. The sandbox costs nothing because every check is mocked. The $0.33 Full ID check combines document verification, biometrics (passive liveness and face match), and device and IP analysis, and you can also pay per step when a workflow uses only some of them.
| Step | Price (USD) |
|---|---|
| Full ID check (KYC) | $0.33 |
| ID Verification alone | $0.15 |
| Passive Liveness | $0.10 |
| Face Match 1:1 | $0.05 |
| Device and IP Analysis | $0.03 |
| AML Screening | $0.20 |
| Proof of Address | $0.20 |
| NFC chip reading (add-on) | $0.15 |
| Database Validation | Variable by country |
| Reusable KYC, workflow orchestrator, MCP server | Free |
Automated checks produce "Approved" or "Declined". When the checks raise warnings that policy says a person must settle, the session lands in "In Review" and waits for a reviewer in the console, who approves, declines or requests a resubmission. Your integration should treat "In Review" as a pending state, not as a failure. The decision records who decided: decision_trace.decided_by is manual, automatic or investigator, and status_override is set when a reviewer changed the status by hand. When a reviewer approves or declines, the resulting decision shows decided_by: manual. A resubmission request is a separate outcome: the session moves to "Resubmitted", goes back to the person, and comes back to a new decision when the steps are redone.

Worked cost example
Take 10,000 completed KYC checks a month with AML screening on every one, at list price.
- KYC: 10,000 x $0.33 = $3,300.00
- AML: 10,000 x $0.20 = $2,000.00
- Monthly total at list price: $3,300.00 + $2,000.00 = $5,300.00
The same volume on the Growth plan, which takes 4% off full KYC and AML screening, costs $99 a month and adds $115 of monthly credit:
- KYC: 10,000 x $0.3168 = $3,168.00
- AML: 10,000 x $0.192 = $1,920.00
- Checks: $3,168.00 + $1,920.00 = $5,088.00
- Usage after included credit: $5,088.00 - $115.00 = $4,973.00
- Total including the monthly plan fee: $4,973.00 + $99.00 = $5,072.00
Scale takes 10% off the same two lines at $299 a month with $350 of credit:
- KYC: 10,000 x $0.297 = $2,970.00
- AML: 10,000 x $0.18 = $1,800.00
- Checks: $2,970.00 + $1,800.00 = $4,770.00
- Usage after included credit: $4,770.00 - $350.00 = $4,420.00
- Total including the monthly plan fee: $4,420.00 + $299.00 = $4,719.00
Growth and Scale discounts apply to Didit prices. Carrier charges pass through at cost. Transaction monitoring overages cost $0.001 per transaction beyond the monthly allowance on every plan. Enterprise is a custom annual contract starting at $15,000 a year, and the sandbox run you build on costs $0. Read the current numbers on the Didit pricing page and in the pricing docs.
Sources
- Didit docs: Quick start
- Didit docs: API authentication
- Didit docs: Create session API
- Didit docs: Retrieve session decision
- Didit docs: Webhooks and HMAC signing
- Didit docs: Verification statuses
- Didit docs: Sandbox testing
- Didit docs: Pricing and billing
- Didit full product facts
- Didit pricing page
- Didit User Verification product page
- Didit live price feed
- Didit integration prompt for coding agents
- Didit MCP server setup
The next step is a sandbox run, not a demo call. Start in the Didit sandbox, publish a KYC workflow, and send the session call from step five. If you already know what you want to verify and you want an AI assistant to wire it, paste the prompt from the Didit integration prompt or connect the MCP server.
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
Alejandro Rosas
Co-founder and CTO

Questions
Frequently asked questions
What is the best API for KYC in 2026?
We fit teams that want a hosted verification flow, signed session webhooks, and published per-check pricing. You start a check with POST /v3/session/, receive the decision by signed webhook, and pay $0.33 per completed KYC check. Check the same criteria on any provider you evaluate: document coverage, how manual review is handled inside the API, and whether the webhook payload carries the full decision.
How does a KYC API work end to end?
You create a workflow that lists the checks, you create a session for one person with that workflow, and you send the person to the hosted URL. We run the checks configured in your workflow. A Full ID check includes document verification, passive liveness, face match and device and IP analysis. Add AML screening if you need it. Didit then posts the result to your webhook and exposes it at the decision endpoint. Your application stores the status and the decision arrays against your own user id.
How long does a KYC API integration take?
A first sandbox session needs a published workflow, its UUID, a sandbox key and one POST, and the sandbox result is mocked. Production work is the part after that: webhook signature verification, a handler that answers in five seconds, idempotent status updates, and mapping the status strings into your own state machine.
Is there an AML KYC API I can call on its own?
AML screening is a workflow feature and also a standalone server-to-server call, priced at $0.20 per check. Add AML screening to the KYC workflow to read its results alongside the identity checks in aml_screenings. KYC plus AML is $0.53 as the compliance bundle.
How do I automate KYC during client onboarding?
Create the session when the account is created, passing your own id as vendor_data. Gate account access on a status from a Didit webhook verified with X-Signature-V2 or X-Signature, or from a server-side read of the session decision. If you verify with X-Signature-Simple, read the decision server-side before granting access. Approve on "Approved", hold on "In Review", and treat "Expired" or "Abandoned" as a reason to send a new link. Keep the session_id so your server can retrieve the decision if the webhook is missed.
Can I try a KYC API without a sales call?
Yes. Create an organization at business.didit.me and use the free sandbox, where every check is mocked. The first eligible Free-plan organization created for a company domain with a work email receives $10 in monthly credit, and phone verification codes are excluded. You can run the six steps in the free sandbox without a sales call.
What does a KYC API cost per check?
Full KYC is $0.33 per completed check, made of ID 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. For full KYC and AML screening, Growth costs $99 a month and reduces unit prices by 4%, while Scale costs $299 a month and reduces them by 10%. Enterprise starts at $15,000 a year.
How do I test KYC flows without real documents?
Use the sandbox application key. Every check is mocked, so you can drive a session to approval, decline or review without collecting real data. Pass a sandbox_scenario slug on create to reproduce a specific outcome, then swap DIDIT_API_KEY for the live key when the organization has credit.
Which webhook events should I subscribe to?
Subscribe to status.updated and data.updated for sessions. Add user.status.updated and user.data.updated if you use the User entity for reusable KYC. There is no wildcard, so name every family you need, and create separate destinations when different services must receive them.
What happens to a session that goes to In Review?
Automated checks found warnings that need a person, so the session waits in "In Review" until a reviewer in the Didit Business Console approves it, declines it or asks the user to redo specific steps. An approval or decline from a reviewer produces a decision where decision_trace.decided_by is manual, and status_override records the automatic outcome it replaced. A resubmission request takes the session to "Resubmitted" instead of ending it with a decision.
Which status strings do I need to handle in code?
There are ten values: "Not Started", "In Progress", "Approved", "Declined", "In Review", "Awaiting User", "Resubmitted", "Expired", "Abandoned" and "Kyc Expired". They are exact and case-sensitive, "Kyc Expired" uses a single capital K, and "Awaiting User" only appears on KYB sessions. Use strict equality and keep a default branch so a new value cannot crash your handler.
Is the KYC API REST with an API key, or OAuth?
The verification API takes a server-side key in x-api-key. Protected account-management routes on apx.didit.me take a Bearer JWT. If that JWT expires, call POST /auth/v2/programmatic/login/ to obtain a fresh one.
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


