Skip to main content

How to Parse the Didit Session Decision and Webhook Payload

Didit returns each feature report as a plural array in the decision response and inside the webhook decision envelope. Branch on <code>session_kind</code> first: KYC and KYB sessions carry different arrays, and a feature that.

How to Parse the Didit Session Decision and Webhook Payload

Contents

In this guide

Jump to the part you need.

This page is for developers turning a Didit decision into rows in their own system: the decision endpoint and the status.updated and data.updated webhooks. Reading a decision is not a billed line in the price book. You pay per completed check, from $0.33 for a full ID check. The caveat that catches teams first: a feature that did not run is absent or null, never a placeholder, and media fields are presigned links that expire.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

The decision response and the webhook at a glance

What you get back from Didit and how to read it
SurfaceWhat it returnsRule for your parser
GET https://verification.didit.me/v3/session/{session_id}/decision/The full decision for one KYC or KYB sessionSend x-api-key with the read:sessions privilege
Webhook status.updated and data.updatedThe event envelope, with a decision object when the session status qualifiesdecision is present only for Approved, Declined, In Review and Abandoned. Otherwise fetch the decision endpoint
session_kind"user" (KYC) or "business" (KYB)Branch on this before you touch any feature array
Feature arraysAlways plural: id_verifications[], liveness_checks[], face_matches[], aml_screenings[] and so onAbsent or null when the step did not run, never a placeholder
warnings[]Risk objects with feature, risk, log_type, short_description, long_description, node_idRead the stable risk code, not the text
Media fieldsportrait_image, front_image, document_file and similarPresigned URLs with a limited window. Download early, store the bytes, not the URL

Start free in the sandbox at https://business.didit.me/, no sales call. If you build with an AI assistant, connect Didit through https://didit.me/developers/mcp/. The endpoint reference is the Sessions API overview, and prices and plan details live on https://didit.me/pricing/.

Prerequisites

What you need before parsing a decision
RequirementWhat you needWhere
PlanSandbox testing is free and unlimited on every plan. The Free plan also gives $10.00 of monthly credit to eligible organizations that sign up with a work emaildidit.me/pricing
Client and keyAn API key sent in the x-api-key headerAPI authentication and API keys
PermissionThe key must carry the read:sessions privilege, or the decision endpoint answers 403Retrieve Session
SessionA session_id returned by POST /v3/session/. The workflow's type decides KYC or KYBCreate Session
Webhook receiverA POST endpoint that keeps the raw body, plus the destination signing secretWebhooks

Set it up in seven steps

  1. Create an API key in the Business Console and grant it read:sessions. A key without that privilege gets 403 on the decision endpoint even when the session exists. The error body is {"detail": "You do not have permission to perform this action."}.

  2. Create the session with POST /v3/session/ and keep the returned session_id. You do not tell the API whether it is KYC or KYB: KYB workflows create Business Verification sessions and KYC workflows create User Verification sessions.

  3. Fetch the decision with the call from the docs. The id is the one you stored in step 2.

    curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
      -H "x-api-key: <API_KEY>"
  4. Branch on session_kind before reading any array. The documented handler pattern in JavaScript is a plain switch:

    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);
    }
  5. Register a webhook destination subscribed to status.updated and data.updated, and store its signing secret. There is no wildcard, so list every event family you want to receive. You can create several destinations and fan out to different URLs.

  6. In your receiver, read the raw body first, then check the freshness of X-Timestamp (within 300 seconds), then verify X-Signature-V2 with constant time comparison against the header and its -Previous variant when present. Only then parse the JSON and dispatch on webhook_type. Verify before parsing, never after.

  7. Store the verdict, read warnings[], and download every media field you need before the presigned window closes. Return 2xx fast and update state idempotently using event_id.

What the decision response contains

Both kinds share the same top level: session_id, session_kind, session_number, session_url, status, workflow_id, vendor_data, metadata, callback, features, expected_details, created_at, expires_at, contact_details, reviews, status_override, decision_trace, linked_records, biometric_retention, and the reviewer fields assignee, waiting_since and sla_due_at.

Three of those deserve a line in your parser. status uses exact, case sensitive strings, including "Kyc Expired" with a single capital K, so compare with === and never lower case the value. decision_trace tells you how the status was reached, with decided_by set to manual, automatic or investigator, plus warning_counts. status_override is non-null when a reviewer changed the status by hand, and automatic_status preserves what the automation decided.

A few fields are contextual. linked_records carries same_face, earlier_verifications and network summaries, or null. biometric_retention gives jurisdictions and deletes_at, the date the live biometric data is deleted. database_validation_not_performed_reason explains why a configured database validation produced no result when database_validations is null. shared_from_session, sandbox_scenario and fraud_check appear only for imported sessions, sandbox scenarios and Fraud Check sessions.

Branch on session_kind: KYC and KYB return different arrays

This is the single most common parsing mistake. The arrays differ by kind, and the field set for the other kind does not appear at all. There are no nulls and no placeholders for a feature that does not exist in that kind.

Feature arrays by session_kind
Arraysession_kind: "user" (KYC)session_kind: "business" (KYB)
id_verificationsYesNo
liveness_checksYesNo
face_matchesYesNo
nfc_verificationsYesNo
poa_verificationsYesNo
database_validationsYesNo
registry_checksNoYes, with company, officers, beneficial owners and ownership structure
document_verificationsNoYes
key_people_checksNoYes, with officers, beneficial owners, submitted parties and a UBO KYC summary
aml_screenings, phone_verifications, email_verifications, questionnaire_responses, ip_analyses, bank_verifications, signaturesYesYes

signatures appears only when the workflow has an E-signature step. bank_verifications holds one item per Bank Verification step and stays null until an account is evaluated. Read its method (open_banking, account_lookup, or a microdeposits or statement fallback) and the continued_without_bank flag when the person skipped the step before any attempt was evaluated.

A feature array can be absent or null independently of the others, and an array that is present holds report objects. This fragment is illustrative, not a complete response and not a fixed shape:

{
  "session_kind": "user",
  "status": "Approved",
  "id_verifications": [ { "status": "Approved", "node_id": "first_id_verification" } ],
  "liveness_checks": [ { "status": "Approved", "node_id": "liveness" } ],
  "face_matches": null,
  "nfc_verifications": null,
  "nfc_skip_reason": "DOCUMENT_WITHOUT_CHIP"
}

The two null arrays mean those steps did not run on this session. Treat null and absent the same way in your parser, and check for the array before you loop over it.

Parsing id_verifications, liveness_checks and face_matches

Every report object in every array carries three common fields. status is the feature level lifecycle status. node_id pins the report to the workflow graph node that produced it, which is how you tell two ID steps apart in a multi-instance workflow, and it is null for legacy single-feature sessions. warnings[] holds the risk signals filtered to that feature and that node.

An id_verifications[] item adds the OCR output: document_type as a readable class such as Passport or Identity Card, document_subtype as a registry code, document_number, personal_number and barcodes. barcodes is always an array and each entry preserves the reader output with type, position, data, data_raw and side. A document without barcode output returns [], so check length rather than truthiness.

liveness_checks[] and face_matches[] follow the same V3 serializer shape with the same common fields. The complete field list for each report object, including every nullable column, is on the data models page, which is the canonical schema for the standalone APIs as well.

nfc_verifications[] needs its own branch. Each item carries is_nfc_skipped and skip_reason alongside status, chip_data and authenticity. chip_protocol is icao or jpki, and a Japan My Number Card read puts its evidence under jpki with the ICAO fields null. When the step was bypassed, nfc_verifications stays null and the top-level nfc_skip_reason explains why, with values such as USER_SKIPPED, DOCUMENT_WITHOUT_CHIP, DEVICE_WITHOUT_NFC or MRZ_KEY_UNAVAILABLE.

The ID document tab of a Didit session in the Business Console, showing the parsed document fields
The same ID report you parse from id_verifications[], rendered in the Business Console session view.

Reading the warnings array

Warnings are where the reason for a Declined or In Review status lives. Each object has a stable shape. feature is one of ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, KYB_REGISTRY, KYB_DOCUMENTS or KYB_KEY_PEOPLE. risk is a stable code such as DOCUMENT_EXPIRED or LOW_LIVENESS_SCORE, and that code is the only safe key for your own logic. log_type is error, warning or information. short_description and long_description are the human readable labels, and long_description is the one written for end-user surfaces. additional_data carries risk-specific context, for example a score and the threshold it missed.

{
  "feature": "ID_VERIFICATION",
  "risk": "DOCUMENT_EXPIRED",
  "additional_data": null,
  "log_type": "error",
  "short_description": "Document expired",
  "long_description": "The document's expiration date has passed, rendering it no longer valid for use.",
  "node_id": "first_id_verification"
}

Do not match on the description strings. They are display copy and can change. Store risk plus node_id and, when you show something to the user, show long_description.

A session overview in the Didit Business Console with the warnings raised against the session listed
Warnings surfaced on the session overview. The same objects arrive in every feature's warnings[] array.

portrait_image, front_image, document_file and the other media fields are presigned URLs with a limited validity window. Download them promptly and never persist the URL itself. Teams that store the link in a database and render it weeks later get a failing request from the media host, and no amount of retrying fixes it: the window is closed. Fetch a fresh decision response and download the new URL promptly instead of retrying the old one. The check itself did not fail, so do not move the session to a failed state because a download returned an error.

The webhook envelope for status.updated and data.updated

A session event carries the envelope below. decision appears only when the status is Approved, Declined, In Review or Abandoned. For every other status the envelope tells you something changed and you fetch the decision yourself.

{
  "event_id": "uuid",
  "session_id": "uuid",
  "status": "Approved",
  "webhook_type": "status.updated",
  "created_at": 1627680000,
  "timestamp": 1627680000,
  "application_id": "uuid",
  "environment": "live",
  "sandbox_scenario": null,
  "workflow_id": "uuid",
  "workflow_version": 1,
  "vendor_data": "your-internal-user-id",
  "metadata": { "user_type": "premium" },
  "decision": { }
}

KYB and business-session payloads also include business_session_id and session_kind set to business. environment is live or sandbox, and sandbox_scenario holds the armed scenario slug on sandbox sessions. Use event_id as the key for handling a repeated delivery idempotently.

data.updated signals edited verification data. If the payload has no decision, fetch the decision endpoint.

Verify the signature before you parse

  1. Read the raw request body. Do not parse the JSON before verification.
  2. Reject the request if abs(now - X-Timestamp) is more than 300 seconds.
  3. Recompute the HMAC-SHA256 with your destination secret. X-Signature-V2 is the recommended header and signs the sorted, Unicode-preserved canonical JSON. X-Signature signs the exact raw bytes and only works if your stack does not re-encode the body.
  4. Compare in constant time against the header and, when present, its -Previous variant, so verification keeps working while you deploy a rotated secret.
  5. Only then parse and dispatch on webhook_type.

X-Signature-Simple is a deprecated last-resort fallback. It authenticates the envelope only, not the decision body. If you verify with it, re-fetch the decision from GET /v3/session/{session_id}/decision/ instead of trusting the payload.

Reading a decision from an AI assistant

If you want an assistant to inspect a response while you build the parser, connect the Didit MCP server instead of pasting keys into a chat. The server is hosted at https://mcp.didit.me/mcp with OAuth sign-in and it is free on every plan. The parsing rules on this page still apply: plural arrays, session_kind first, risk codes not description strings.

Didit Academy lesson cover for using Didit with MCP
The Didit MCP server lets an assistant call the documented endpoints directly. Setup for every client is at didit.me/developers/mcp.

Field and event mapping

What each event gives you and what to read
EventFires whendecision in payloadWhat your code should do
status.updated with ApprovedAll checks passedYes, full decisionGrant access, store the verdict, download media
status.updated with DeclinedOne or more checks failedYes, with warningsRead warnings[].risk, then notify the user
status.updated with In ReviewAutomation flagged warnings that need human review on the sessionYes, with warningsHold the decision, queue it for your reviewer
status.updated with AbandonedThe user started and did not finish in timeYesTreat as incomplete, not as a failure
status.updated with Not Started, In Progress, Expired, Resubmitted, Awaiting User, Kyc ExpiredAny other move in the lifecycleNoCall the decision endpoint for the current state
data.updatedVerification data was edited on the sessionOnly when the session status qualifies, as with status.updated. Otherwise there is noneRe-read the affected arrays, or fetch the decision endpoint when the payload carries no decision

Test with sandbox data

Sandbox sessions run the same code path with environment set to sandbox. Arm a scenario before the verification starts and the decision comes back with the matching status, for example decline_aml_hit to exercise your Declined path and your warning rendering. A scenario can only be armed before the verification starts, so a late attempt is rejected. Sandbox testing is free and unlimited on every plan.

Expected success looks like this: the decision endpoint returns 200 with session_kind set, the arrays you expect for that kind and no placeholder fields; your receiver returns 2xx as soon as possible; and a redelivery of the same event_id is handled idempotently, so your stored state does not change twice. Then repeat the whole flow with one real live session before you rely on it.

Error cases and fixes

Failure, cause and fix for decision reads and webhook parsing
SymptomCauseFix
401 Authentication credentials were not provided or are invalid.Wrong, malformed, revoked or expired keyCheck the x-api-key value, create a new key
403 You do not have permission to perform this action.No key sent, or the key lacks read:sessionsAdd the privilege to the key
403 This API key can't be used from this IP address.Key has an IP list and the call came from outside itAdd the IP or drop the list
404 {"detail": "Not found."}The session does not exist in either the KYC or the KYB table, or belongs to a different applicationCheck the id, check the application. Do not retry
404 Session not found.A key limited to some workflows or statuses, on a session outside those limitsWiden the key limits or use a different key
A media download fails long after the sessionThe presigned window closedFetch a fresh decision response and download the new URL promptly
Signature mismatchBody re-encoded before verification, or wrong secretVerify over raw bytes or canonical JSON with the destination secret, accept the -Previous header during rotation
Timestamp rejectedClock skew beyond 300 secondsCompare against X-Timestamp from the request, not a cached value
decision missing in a webhookThe status is one that carries no decisionCall the decision endpoint
429Rate limit or quota reachedWait for Retry-After, then retry

Disconnect

To stop the integration: revoke the API key that held read:sessions, remove the webhook destination in the Business Console so deliveries stop, and remove the Didit connector from your assistant if you added one. Keep the media you already downloaded and the decisions you already stored.

What parsing costs on both sides

The public price book has no line for reading a decision or for receiving a webhook. What you pay for is the checks that ran inside the session. Prices below are list prices from the live feed on November 26, 2026.

Take 2,000 completed full ID checks in a month, where 500 of those sessions also run AML screening. The ID checks are 2,000 x $0.33 = $660.00. The AML checks are 500 x $0.20 = $100.00. Total: $760.00 for the month, and the decision reads and webhook deliveries in that same month add nothing to it.

On Scale, at a 10% discount, the same month is 2,000 x $0.297 = $594.00 plus 500 x $0.18 = $90.00, which is $684.00 of checks. Add the $299.00 monthly fee and the month costs $983.00. The fee is covered by the discount once monthly Didit spend passes $299.00 / 0.10 = $2,990.00 at list price.

For KYB, one company with a single owner who takes a linked KYC is $2.00 for registry retrieval plus $0.20 company AML plus $0.20 person AML plus $0.33 for the linked full ID check, which is $2.73 at the floor. The registry line varies by country and data tier, so the $2.00 registry line is a floor and the total starts at $2.73.

Your side of the cost is engineering, not metered calls: a receiver that keeps raw bodies, a signature check, a branch on session_kind, and storage for the media you download before the links expire.

If you build with an AI assistant, the Didit MCP server setup for every client is at https://didit.me/developers/mcp/.

Sources

Next step: open the sandbox at https://business.didit.me/, create a key with read:sessions, and run one session end to end. No sales call, and sandbox testing is free.

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

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What does the Didit session decision API response look like?

It is one JSON object from GET https://verification.didit.me/v3/session/{session_id}/decision/ with a top level shared by KYC and KYB (session id, kind, status, workflow, timestamps, reviews) plus feature arrays. Every per-feature report follows the V3 serializer shape and is returned as a plural array, never a single object.

Why are id_verifications, liveness_checks and face_matches arrays instead of objects?

V3 introduced multi-instance workflows, so a workflow can run the same feature more than once. Each report carries a node_id that pins it to the workflow graph node that produced it. Older V2 endpoints still work but only return the first instance.

How do I tell a KYC session from a KYB session in the response?

Read the top-level session_kind field. It is "user" for a User Verification (KYC) session and "business" for a Business Verification (KYB) session. Branch on it before touching any array, because KYC returns id_verifications, liveness_checks and face_matches while KYB returns registry_checks, document_verifications and key_people_checks.

How do I fetch the session decision result after a status.updated webhook?

If the payload already contains a decision object, use it. That happens for Approved, Declined, In Review and Abandoned. For every other status, call GET /v3/session/{session_id}/decision/ with your x-api-key and read the arrays from that response. Use the webhook's event_id to handle a repeat delivery idempotently.

Why do my portrait_image and front_image links return an error after a while?

Media fields are presigned URLs with a limited validity window, so the link stops working once that window closes. Download the file promptly and store the bytes rather than the URL. To get a fresh link, fetch a fresh decision response and take the new URL from it.

What are the fields in the Didit warnings array?

Each warning has feature, risk, additional_data, log_type, short_description, long_description and node_id. risk is the stable code your logic should key on, and long_description is the text written for end-user surfaces.

What does the DOCUMENT_EXPIRED risk code mean?

It means the expiration date on the submitted document has passed, so the document is no longer valid for use. The warning comes with feature set to ID_VERIFICATION and log_type set to error. A related code, LOW_LIVENESS_SCORE, carries the score and threshold in additional_data.

Why does Retrieve Session return 404 not found?

The session id does not exist in either the KYC or the KYB table, or it belongs to a different application. A key that is limited to certain workflows or statuses returns Session not found. with a 404 when the session falls outside those limits. A 404 is not worth retrying, check the id and the key limits instead.

Why does Retrieve Session return 403 permission denied?

The body {"detail": "You do not have permission to perform this action."} means no key was sent or the key lacks the read:sessions privilege. Other 403 bodies name a different cause, such as an IP list or an endpoint outside the key's scope. Read the body, then fix the key.

Which webhook event types carry verification results?

status.updated carries the decision when the session reaches Approved, Declined, In Review or Abandoned. data.updated signals edited verification data, and if the payload has no decision, you fetch the decision endpoint. There is no wildcard subscription, so list both explicitly on your destination.

Is parsing a decision billed separately?

No. The public price book bills the checks that run inside the session, such as ID verification at $0.15 or a full ID check at $0.33, and lists no charge for reading a decision. Sandbox testing is free and unlimited.

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.