Skip to main content

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.

KYC API Integration: Build It in 6 Steps (2026)

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

What you build, which endpoint does it, and what it costs
ItemDetail
API styleREST over HTTPS with JSON bodies, authenticated with an x-api-key header
Start a verificationPOST https://verification.didit.me/v3/session/
Read the decisionGET https://verification.didit.me/v3/session/{session_id}/decision/
Real-time eventsWebhooks 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
SandboxFree and unlimited on every plan, every check mocked
Free plan creditThe 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 reviewSessions in "In Review" wait for a reviewer in the Didit Business Console
Minimum setupA 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

  1. 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_key for live and sandbox_application.api_key for the sandbox. Store the sandbox key as DIDIT_API_KEY while you build, because every sandbox check is mocked and costs nothing. New keys look like sk_test_ or sk_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.

  2. 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.

  3. Register the webhook destination. Do this before your first session so you can watch the initial sandbox events arrive. Subscribe the destination to status.updated to 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"}'

    label and url are required. Save the returned secret_shared_key as DIDIT_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.

  4. Verify and handle the webhook. Preserve the incoming body. For X-Signature-V2, recompute the HMAC over sorted, Unicode-preserved canonical JSON. For X-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 on event_id, and apply the status to your database idempotently.

    X-Signature-Simple is 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 a decision object only for Approved, Declined, In Review, and Abandoned. For other statuses, handle the event using its top-level fields.

  5. Start a session. Call this endpoint each time your signup flow needs to create a verification session. Reuse the same vendor_data for 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, url and session_token. Send the person to url, open it in an SDK, or embed it in an iframe. Pass your own user id as vendor_data so the session binds to that entity and duplicate detection works across sessions. The callback is 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.

  6. 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:sessions privilege.

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

    Branch on session_kind before 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);
    }
    Session detail showing the ID document check with its extracted fields and verdict
    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.

What each status means for your integration
StatusWhat it meansWhat your integration does
"Not Started"The session exists, the person has not opened the linkWait, or send a reminder
"In Progress"The person is working through the stepsNo action
"Approved"The session was approved. Read decision_trace.decided_by for the decision source and status_override for any manual status overrideGrant 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 overrideNotify the person, optionally request a resubmission
"In Review"Warnings need a person to settle themTreat it as pending, a reviewer approves, declines or requests a resubmission
"Awaiting User"KYB only. The parent session waits on key people who were submittedWait, then re-check the parent session
"Resubmitted"The person was asked to redo specific stepsWait for the new decision
"Expired"The link expired before it was openedCreate a new session and send a new link
"Abandoned"The person started and did not finish in timeSend a fresh link when the person returns
"Kyc Expired"An approved document passed its expiry dateRe-verify before the next sensitive action

Note that "Kyc Expired" uses a single capital K, and "Awaiting User" only appears on KYB sessions.

Session overview in the Didit Business Console listing the checks and the warnings raised
The session overview in the console. The same warnings appear in 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_id and the hosted url, which confirms the session exists.
  • Complete the hosted flow. Open the returned url and complete the verification, then inspect the signed status.updated delivery. Check that its signature verifies against DIDIT_WEBHOOK_SECRET. The envelope and the decision both carry sandbox_scenario, which confirms the run used your scenario.
  • Retrieve the decision. The read returns the same scenario slug and a status that 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

Request fields on POST /v3/session/ and what the response gives back
FieldRequiredWhat it does
workflow_idYesUUID from /v3/workflows/. KYC workflows create user sessions, KYB workflows create business sessions
vendor_dataRecommendedYour stable identifier for the person or business, used for duplicate detection
callbackNoOptional 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_methodNoinitiator, completer or both
metadataNoA JSON object, echoed back in responses and webhooks, never shown to the user
tagsNoUp to 10 names, 50 characters each, filterable in the console
session_expiration_timeNoSeconds the link stays valid, from 3600 to 2419200
languageNoISO 639-1 code for the verification UI
expected_detailsNoName, date of birth, nationality, document types. Mismatches surface as decision warnings
sandbox_scenarioNoSandbox only. Reproduces a bundled outcome, rejected with 400 on live applications
Responsen/asession_id, url, session_token and the tags you set

Failure cases and recovery

What each error means and the fix
ResponseMeaningRecovery
401 on verification.didit.meKey wrong, malformed, revoked or expiredRe-fetch it with the login and organizations flow, or use a key that has not expired
403 on verification.didit.meNo key header, a scoped key without access to this resource, or a call from outside the key's IP listUse a key with that access from Developers then API keys
403 with application_deletedThe key's application was deletedDo not retry. The application and its keys no longer exist
403 on the decisionThe key lacks the read:sessions privilegeUse a key that holds that privilege
400 on workflow_idInvalid workflow UUIDUse the UUID of your published workflow
400 on callbackAllowed domains are configured and the URL is not on one of those originsUse an origin on the allowed list, or a custom app scheme
404 on a session routeThe session is outside the scoped key's workflows or statusesUse a key whose limits include that session
404 on the decisionThe session does not exist or belongs to another applicationCheck the application that created it
429Rate limitThe body carries a wait field in seconds. Back off, then retry
Webhook slower than 5s, 5xx or 404Delivery failedDidit 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-key header 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_data to associate sessions with the same user. Save the returned session_id before redirecting. Deduplicate webhook deliveries by event_id.
  • Verify before you act. Preserve the incoming request body. Verify X-Signature-V2 against sorted, Unicode-preserved canonical JSON, or X-Signature against 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.

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.

Published list prices for the steps a KYC workflow touches
StepPrice (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 ValidationVariable by country
Reusable KYC, workflow orchestrator, MCP serverFree

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.

Video thumbnail explaining Didit credits, auto-recharge and volume discounts
How credit, auto-recharge and plan discounts work, so you can model the bill before you go live.

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

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.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

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.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.