Business
How to Integrate a KYC API in One Day: Step-by-Step Guide
Didit's KYC integration is one workflow, one session call per user and a signed webhook destination: create the session, send the user to the hosted URL, read the decision. Full ID check $0.33, sandbox free.

Contents
In this guide
Jump to the part you need.
This guide is for a developer who needs a working KYC flow in one day and has no appetite for a sales call. With Didit you create a workflow, start a session, send the user to a hosted link and read the decision from a signed webhook. The full ID check costs $0.33 and the sandbox is free. The caveat: paid checks require live keys and credit. Sandbox testing is free; use scenarios to test status handling.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
The short version
| Question | Answer |
|---|---|
| Outcome | A verified user record and a stored decision you can audit, in one of the documented statuses |
| Build effort | One published workflow, one POST /v3/session/ per user, one webhook handler |
| Price per completed full ID check | $0.33: ID document $0.15 + passive liveness $0.10 + face match 1:1 $0.05 + device and IP analysis $0.03 |
| Sandbox | Free and unlimited. Sandbox keys start with sk_test_ |
| Authentication | x-api-key on https://verification.didit.me; Bearer JWT only on https://apx.didit.me |
| Calls you write | POST /v3/workflows/, POST /v3/session/, POST /v3/webhook/destinations/, GET /v3/session/{session_id}/decision/ |
| Main caveat | Paid checks need live keys and credit, and In Review means a person makes the final call |
Start free in the sandbox at business.didit.me, no sales call. If you build with an AI assistant, connect Didit to it through the MCP setup for every client. The pricing page lists what each module costs.
The outcome, and the method we recommend
By the end of the day you want three things: a user who has passed a document check, a liveness check and a face match; a stored decision with the evidence behind it; and a status your product can act on without guessing. Every Didit session returns that as one object, and the state machine is published in the docs.
We recommend the hosted session route instead of building capture yourself. You create one session per user, hand over a verification URL, and Didit runs document capture, liveness and face match in the order your workflow defines. Didit hosts the capture and liveness flow, so your integration can redirect users to the hosted URL. That keeps camera permissions, document framing and liveness detection inside Didit's flow. If you later need a single check inside your own UI, the standalone APIs call the same modules server to server at their own published prices.
One detail that saves debugging time: status values are exact, case-sensitive strings, including Kyc Expired with a single capital K. Match them with strict equality.
Prerequisites
- A Didit account and an Organization. Eligible organizations receive $10 of monthly credit, with the first organization created on an eligible work email. Sandbox testing is free on every plan.
- An Application inside that organization, and its API key from Developers then API keys in the Business Console. Treat the key as a server-side secret and never ship it to a browser bundle.
- A published workflow. You can describe what you need, start from a template, or start empty in the Console, or create one with
POST /v3/workflows/. - A public HTTPS endpoint for webhooks that answers within 5 seconds.
- A callback URL. If your application has allowed domains configured, an http or https callback must be on one of those origins, otherwise session creation fails with 400.
- curl or any HTTP client. SDKs exist and are free, but no SDK is required for the flow below.
Eight steps from zero to a decision
Step 1: Create the account and get an API key
The console route is fastest: sign in, pick your Application, open Developers then API keys, and copy the Primary key. New keys start with sk_live_ or sk_test_ followed by 43 URL-safe characters.
You can also register programmatically, which is useful for CI or for an agent. The register call emails a 6-character code with a 10-minute lifetime, and the verify call returns both keys inline:
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"}'
Expected output, trimmed to the fields you need:
{
"access_token": "eyJ...",
"organization": { "uuid": "..." },
"application": { "api_key": "sk_live_...", "mode": "live" },
"sandbox_application": { "api_key": "sk_test_...", "mode": "sandbox" }
}
Store sandbox_application.api_key as your sandbox key while you build. Addresses that cannot receive mail, such as @example.com, are rejected with email_undeliverable.
Step 2: Create a workflow
A workflow is the ordered list of checks. This one runs OCR, passive liveness, a 1:1 face match and AML screening:
curl -X POST https://verification.didit.me/v3/workflows/ -H 'x-api-key: $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"}
]
}'
The response contains id. Persist it as your workflow ID. Publish the workflow in the Console before you create live sessions.
Step 3: Create a session
One session per user. vendor_data is your own stable identifier and is also used for duplicate detection across sessions:
curl -X POST https://verification.didit.me/v3/session/ -H 'x-api-key: $API_KEY' -H 'Content-Type: application/json' -d '{"workflow_id": "$WORKFLOW_ID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'
Expected output, trimmed:
{
"session_id": "1f0c...",
"session_number": 1234,
"session_token": "abcdef123456",
"status": "Not Started",
"vendor_data": "user-42",
"url": "https://verify.didit.me/session/abcdef123456"
}
Three fields matter: session_id to reconcile later, url to send the user to, and status, which stays Not Started until the user opens the link. Optional fields worth knowing: metadata is echoed back in responses and webhooks, language sets the verification UI language with an ISO 639-1 code, and expected_details turns mismatches into decision warnings.
Step 4: Send the user into the hosted flow
Redirect to url, open it in an in-app browser, or embed it in an iframe. Didit handles document capture, the selfie and liveness, in the order the workflow defines.

On completion Didit redirects to your callback and appends ?verificationSessionId={session_id}&status={status}. Do not treat the redirect as the decision. It is a UI event, and the signed webhook is the source of truth.
Step 5: Register a webhook destination
curl -X POST https://verification.didit.me/v3/webhook/destinations/ -H 'x-api-key: $API_KEY' -H 'Content-Type: application/json' -d '{
"label": "Production",
"url": "https://myapp.com/api/webhooks/didit",
"subscribed_events": ["status.updated", "data.updated", "user.status.updated", "user.data.updated"],
"webhook_version": "v3"
}'
label and url are required. Save the returned secret_shared_key as your webhook secret. There is no wildcard, so list every event family you want to receive.
Step 6: Verify the signature, then handle the event
- Read the raw request body before parsing JSON.
- Reject any request where the difference between now and
X-Timestampis more than 300 seconds. - Recompute the HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON with your destination secret and compare it in constant time against
X-Signature-V2, and againstX-Signature-V2-Previouswhen present. - De-duplicate on
event_id, respond 2xx within 5 seconds, and apply the change idempotently.
The envelope looks like this, trimmed:
{
"event_id": "b1e2...",
"session_id": "1f0c...",
"status": "Approved",
"webhook_type": "status.updated",
"timestamp": 1627680000,
"environment": "live",
"vendor_data": "user-42",
"decision": { "session_kind": "user" }
}
The decision object appears for Approved, Declined, In Review and Abandoned, and mirrors the decision endpoint. V3 returns plural arrays such as id_verifications[], liveness_checks[], face_matches[] and aml_screenings[]. Never assume the singular V2 fields.
Step 7: Fetch the decision for reconciliation
If a webhook is missed or you are reconciling an older session, fetch the same object:
curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ -H 'x-api-key: $API_KEY'

A response is one of two kinds, so branch on the discriminator before reading feature arrays:
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);
}
Step 8: Map statuses in your product
Store the raw status string next to your own derived state. Every session starts at Not Started and ends in a decision or a timeout.
| Status string | What it means for your app |
|---|---|
Not Started | Session created, link not opened. Send a reminder or let it expire |
In Progress | User is inside the flow. Show a pending state |
Approved | All checks passed. Grant access and store the decision |
Declined | A check failed. The decision carries the warnings, and a reviewer can request a resubmission |
In Review | Warnings need a person. Your app waits, a compliance reviewer decides in the Console |
Awaiting User | A KYB parent session waits for required parties to complete verification |
Resubmitted | User was asked to redo specific steps and is doing them |
Expired | The link timed out before it was opened |
Abandoned | Started, not finished in time |
Kyc Expired | A previously approved document passed its expiry date |
Use strict equality for every documented status, including Awaiting User:
function nextState(status) {
switch (status) {
case "Not Started": return "remind";
case "In Progress": return "wait";
case "Approved": return "grant";
case "Declined": return "deny";
case "In Review": return "pending_review";
case "Awaiting User": return "wait_for_parties";
case "Resubmitted": return "wait";
case "Expired": return "new_session";
case "Abandoned": return "remind";
case "Kyc Expired": return "reverify";
default: throw new Error("Unknown status: " + status);
}
}
KYB uses the same session endpoint
A KYC workflow creates a User Verification session. A KYB workflow creates a Business Verification session. There is no separate KYB endpoint. Send the same POST /v3/session/ call with a KYB workflow_id. For KYB, expected_details takes company_name, registry_country and registration_number to pre-fill the registry search; person-level fields are ignored on KYB sessions.
KYB is priced from $2.00 per company for registry data by country and tier, plus $0.20 entity AML, $0.20 person AML per UBO or officer, and $0.33 for each linked KYC. The pricing page lists the KYB lines, and the Business Verification quickstart in the docs covers the flow.

In a KYB parent session, the Key People step submits the parties and spawns child KYC or KYB sessions. The parent stays in Awaiting User until required parties complete verification. Handle that status explicitly; it is not a failure.
Inputs and outputs
| Field | Direction | Required | What it does |
|---|---|---|---|
workflow_id | Input | Yes | Stable workflow UUID. A KYC workflow creates a user session, a KYB workflow creates a business session |
vendor_data | Input | No, strongly recommended | Your identifier for the person, used for duplicate detection across sessions |
callback | Input | No | Where the hosted flow returns the user, with session id and status appended |
metadata | Input | No | Arbitrary JSON echoed in responses and webhooks, never shown to the user |
language | Input | No | ISO 639-1 code for the verification UI |
contact_details | Input | No | Pre-fills phone or email steps and can send notification emails |
expected_details | Input | No | Expected person or business details. For KYB, pass company_name, registry_country and registration_number; mismatches become decision warnings |
session_id | Output | n/a | Used for the decision lookup and for your own records |
url | Output | n/a | Hosted verification link for this user |
status | Output | n/a | Exact status string, in webhooks and in the decision response |
session_kind | Output | n/a | user or business. Always branch on it first |
decision_trace | Output | n/a | How the status was reached: automatic, manual or investigator, with warning counts |
biometric_retention | Output | n/a | The date the live biometric data of that session is deleted |
Failure cases and recovery
| Symptom | Cause | Fix |
|---|---|---|
| 401 on verification.didit.me | Key wrong, malformed, revoked or expired | Re-fetch it with programmatic login and the organization lookup, or issue a new key in Developers then API keys |
| 403 on verification.didit.me | No key header, a scoped key without access to that resource, or a call from outside the key's IP list | Use a key that holds the needed privilege |
403 with application_deleted | The key's application was deleted | Do not retry. Use a key of an application that exists |
400 on workflow_id | Invalid workflow | Check the UUID returned by the workflow call |
400 on callback | Callback origin is not on the application's allowed domains | Add the origin or use a custom URL scheme |
| 404 on a decision | Session does not exist, or belongs to a different application | Confirm you are using the same application that created the session |
| 429 | Rate limit | The response includes a wait field in seconds. Back off, then retry |
| Webhook never arrives | Your handler answered 5xx or 404, or took longer than 5 seconds | Didit retries twice, after about 1 and 4 minutes, then drops the delivery. Resend from the destination's delivery log |
Test in the sandbox before you touch a live key
Sandbox keys behave like live keys and every check is mocked, so you can build the whole loop without PII or billing. Scenarios let you reproduce outcomes on purpose: list them with GET /v1/sandbox/scenarios/, pass sandbox_scenario when you create the session, or arm a session afterwards with POST /v3/session/{session_id}/sandbox/arm/ while it is still Not Started. The field is rejected with 400 on live applications, which is exactly what you want. Paid checks require live keys and credit. Sandbox testing is free; use scenarios to test status handling.
Paid steps and where review starts
Building is free. Paying starts when a live key runs a check on a live session. All unit prices in this section come from the pricing page and the pricing docs:
- Full ID check: $0.33 per completed check, which is ID document $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03.
- AML screening: $0.20 per check against 1,300+ lists. Ongoing AML monitoring is $0.07 per user per year.
- NFC chip reading: $0.15 per check as an add-on.
- Phone verification: the carrier price for the country and channel plus a $0.02 Didit fee. Country totals are on the phone price list.
Billing is per completed check from prepaid credit. Plan credit is added every month and top-ups last 12 months. Growth is $99 a month with $115 of credit and 4% off every Didit price, Scale is $299 a month with $350 of credit and 10% off. Current terms live on the pricing page and in the pricing docs.
Review is a boundary, not a bug. Automated checks resolve most sessions, but a session can land in In Review when warnings need a person. A compliance reviewer then approves, declines or requests a resubmission in the Console, and status_override plus decision_trace record who acted and what the automatic status was. Build your UI so In Review is a legitimate pending state.
What a one-day integration costs
Take a product that verifies 1,000 users in the first month and screens 200 of them against AML lists. These are published list prices from the pricing page.
- 1,000 full ID checks: 1,000 x $0.33 = $330.00
- 200 AML screenings: 200 x $0.20 = $40.00
- Total at list price: $330.00 + $40.00 = $370.00, or $0.37 per verified user
The same volume on Scale, with 10% off Didit prices: $0.33 x 0.90 = $0.2970 per full ID check, so 1,000 x $0.297 = $297.00 in ID checks plus 200 x $0.18 = $36.00 in AML screening, for $333.00 of usage. The $10 of monthly credit for eligible organizations covers about 30 full ID checks ($10.00 / $0.33 = 30.3) before you add anything.
Sources
- Didit docs: Quick Start
- Didit docs: API Authentication
- Didit docs: Create Session
- Didit docs: Retrieve Session Decision
- Didit docs: Webhooks
- Didit docs: Verification statuses
- Didit docs: Sandbox test data
- Didit docs: Pricing
- Didit docs: Data models
- Didit docs: Integration prompt
- Didit pricing page and pricing.json, read November 26, 2026
- Didit MCP server
- FATF guidance on customer due diligence
- EUR-Lex for the AMLD6 and eIDAS 2.0 texts
The next step is the sandbox: sign up at business.didit.me, publish a workflow, and run the calls above with an sk_test_ key. No sales call.
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
How long does it really take to integrate the Didit KYC API?
The flow is four calls and one webhook handler: create a workflow, create a session, register the destination, read the decision. Plan time for mapping statuses and testing sandbox scenarios. A team that only needs a hosted link can publish a workflow in the Console and share it without writing code.
How much does one Didit KYC API call cost?
The $0.33 is the price of a completed full ID check, not of a single API call: $0.15 for the ID document, $0.10 for passive liveness, $0.05 for face match 1:1 and $0.03 for device and IP analysis. Creating a session costs nothing on its own, because billing is per completed check from prepaid credit. Adding AML screening makes the completed check $0.53. Sandbox checks are free, and eligible organizations receive $10 of monthly credit, with the first organization created on an eligible work email. The published price list is on the pricing page.
Is the Didit KYC API free?
No. Building is free and the sandbox is unlimited, but live checks are billed per completed check from prepaid credit at published list prices. Eligible organizations receive $10 of monthly credit, with the first organization created on an eligible work email.
Which endpoint creates a verification session?
POST https://verification.didit.me/v3/session/ with your workflow_id in the body and your API key in the x-api-key header. The same endpoint handles KYC and KYB: the workflow type decides which kind of session is created.
Do I need an SDK to use the Didit KYC API?
No. Everything here is plain HTTPS with a JSON body, so curl, fetch or any HTTP client works. Didit publishes SDKs and they are free, but they are a convenience, not a requirement.
How do I verify a Didit webhook signature?
Read the raw body, check that X-Timestamp is within 300 seconds of now, then recompute an HMAC-SHA256 over the sorted canonical JSON with your destination's shared secret and compare it in constant time with X-Signature-V2. Respond 2xx within 5 seconds and de-duplicate on event_id. If you verify only the envelope with the deprecated simple signature, re-fetch the decision instead of trusting the payload.
What happens if my webhook endpoint is down?
Didit retries twice, after about 1 and 4 minutes, then drops the delivery. You can resend it from the destination's delivery log. For reconciliation, fetch the decision from GET /v3/session/{session_id}/decision/.
What does the In Review status mean?
Automated checks produced warnings that need a person, so the session waits for a compliance reviewer in the Console. The reviewer approves, declines or asks for a resubmission, and the record keeps the manual decision next to the automatic status. Your app should treat it as pending, not as a failure.
Can I test a decline or an AML hit in the sandbox?
Yes. Sandbox scenarios reproduce specific outcomes deterministically, either by passing sandbox_scenario when you create the session or by arming the session afterwards with the sandbox arm endpoint. The same field returns 400 on live applications.
Does the same endpoint handle KYC and KYB?
Yes. POST https://verification.didit.me/v3/session/ creates a User Verification session for a KYC workflow and a Business Verification session for a KYB workflow, so there is no separate KYB endpoint. The workflow type decides the session kind. For KYB, pass company_name, registry_country and registration_number in expected_details to pre-fill the registry search.
What is Didit, and what does https://didit.me/ cover?
Didit is infrastructure for identity and fraud, used by 4,000+ companies across 220+ countries: user verification (KYC), business verification (KYB) and transaction monitoring, on one API with a public price list. https://didit.me/ covers the product lines, prices and developer entry points, and the Didit docs hold the step-by-step integration recipe.
Can a coding agent run this integration for me?
Yes. Didit publishes one integration prompt at didit.me/developers/integration-prompt that takes an agent from account creation to webhook verification, and an MCP server at didit.me/developers/mcp. Review the generated code for key handling before you deploy it.
Do I have to change my architecture to use the KYC API?
The documented route is four calls and one webhook handler: create a workflow, create a session, register a destination, and read the decision. It also uses the callback redirect and the decision endpoint for reconciliation. Add more only if your product needs it.
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


