Didit Node SDK: Identity Verification Integration Reference
Didit's Node SDK (@didit-protocol/sdk-node) is free. Install it, configure a server-side API key, create a session, verify X-Signature-V2 webhooks and read the decision. A full ID check costs $0.33; sandbox is free.

Contents
In this guide
Jump to the part you need.
The Didit Node SDK is @didit-protocol/sdk-node, published on npm and free to use. It fits a Node backend that creates sessions, verifies webhooks and reads decisions. We provide typed requests and responses, verification for the webhooks we send, and Didit Authentication token checks. A full ID check costs $0.33 and sandbox testing is free. The caveat: never ship this SDK to a browser or mobile bundle, and your runtime needs fetch, so Node 18 or newer.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
Ways to call Didit from a Node backend
Choose the Node SDK or the REST API for backend calls. MCP is a separate assistant integration for compatible OAuth clients.
| Route | What it is | Command or endpoint | Price |
|---|---|---|---|
| Node server SDK | Official typed client for the server APIs, with webhook signature verification and Authentication token checks | npm install @didit-protocol/sdk-node | Free |
| REST API directly | The same server endpoints called with fetch or curl, no SDK layer | POST https://verification.didit.me/v3/session/ | $0.33 per completed full ID check in a workflow. Standalone API calls use their own published prices. |
| MCP connector | Separate assistant integration for compatible OAuth clients, for exploration and assistant-driven setup | didit.me/developers/mcp | Free |
Coverage differs by route. Node SDK 1.0.1 lacks the two Google Wallet endpoints and the 16 Database Validation request fields added after generation. Use the documented REST calls for those cases. The REST API is the full server surface.
The Node package supports Node.js 18, Bun, Deno and edge runtimes that expose fetch.
Prerequisites: plan, client and permissions
| Requirement | Detail | Where |
|---|---|---|
| Plan | Free includes $10 of monthly credit for the first eligible organization created with an eligible work email for a company domain, and phone verification codes are excluded. Growth is $99 a month with $115 credit and 4% off Didit prices. Scale is $299 a month with $350 credit and 10% off Didit prices. Plan discounts apply to Didit prices; carrier and Meta charges pass through at cost. Enterprise is a custom annual contract from $15,000 a year. Sandbox is free and unlimited on every plan. | didit.me/pricing |
| Client | Node.js 18 or newer, Bun, Deno, or an edge runtime with fetch. | Your runtime |
| Package | @didit-protocol/sdk-node from npm, source at github.com/didit-protocol/sdk-node | npm install |
| API key | An Application key. Newly issued sandbox keys start with sk_test_ and live keys with sk_live_, each followed by 43 URL-safe characters. Older keys have no prefix and keep working, so use the key from your sandbox Application regardless of prefix. | Business Console, Developers then API keys |
| Workflow | The create call needs a stable workflow UUID. Copy the sandbox workflow from your sandbox Application. The API lists workflows at /v3/workflows/, and the create field is workflow_id. | Business Console workflow or /v3/workflows/ |
| Permissions | The decision endpoint requires the read:sessions privilege. A scoped key without access to a resource returns 403, and a key called from an address outside its IP list returns 403 too. | Console, API keys |
| Environment | DIDIT_API_KEY for every key call. DIDIT_ORGANIZATION_ID and DIDIT_APPLICATION_ID for organization-scoped routes such as cases, networks and regulatory reports. DIDIT_LOG=debug logs method, path, status, duration and request id, never bodies or headers. | Your process environment |
Didit Node setup: seven steps from install to decision
- Create or copy the API key. Sign in to the Didit Business Console, pick the Application from the dropdown at the top, open Developers then API keys, and copy the Primary key or create a scoped key for the service. Keep it server side. If you prefer to skip the console, a coding agent can register an organization programmatically:
POST https://apx.didit.me/auth/v2/programmatic/register/emails a 6-character code with a 10 minute TTL, andPOST https://apx.didit.me/auth/v2/programmatic/verify-email/returns both applications inline. Persistsandbox_application.api_keyfirst and build against it. - Install the package. In the service that holds the key:
npm install @didit-protocol/sdk-node - Set the environment. A client created with no options reads these variables and is ready to use.
The second line is optional. Edge runtimes have no process environment, so there you pass the API key to the Node client as an option. Share one client per process. It keeps a connection pool and supports concurrent use.export DIDIT_API_KEY='<SANDBOX_API_KEY>' export DIDIT_LOG=debug - Create the session. The workflow UUID decides whether this is a user verification or a business verification. There is no separate endpoint for KYB. Copy the sandbox workflow UUID from your sandbox Application and pass it as
workflow_id. Use the documented REST call for the create request.vendor_datais optional and strongly recommended. A stable value binds sessions to the same user or business and drives duplicate detection. Save thesession_idreturned by the create call.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/return"}' - Send the user to the hosted flow. The user completes the steps in our hosted UI, in the language you pass as an ISO 639-1 code or the one the browser reports. If an eligible callback is configured, we redirect when the flow finishes and append
?verificationSessionId={session_id}&status={status}. The workflow default can supply the URL when you omitcallback, and the defaultcallback_methodisinitiator. If the Application has allowed domains configured, an http or https callback must sit on one of those origins or creation fails with 400. Custom schemes such as app deep links are always accepted. If you need the hosted URL, callGET /v3/session/{session_id}/decision/with a key that hasread:sessionsand redirect the user to the returnedsession_url. Use a verified webhook or the decision endpoint to determine the verification outcome. - Verify the webhook. Point a POST endpoint at your service. Preserve the raw body. Require a valid
X-Timestampwithin 300 seconds of the current time. Compute HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON using the current destination secret. Compare the computed signature withX-Signature-V2in constant time. IfX-Signature-V2-Previousis present and you have the replaced secret, recompute with that secret and compare with the previous header in constant time. Accept either valid signature before processing the payload. Process the event only after successful verification, return 2xx fast and update state idempotently. AvoidX-Signature-Simple: it is deprecated and authenticates the envelope only, so if you rely on it, re-fetch the decision instead of trusting the payload. - Read the decision and branch. Read the result from
GET https://verification.didit.me/v3/session/{session_id}/decision/. Always branch onsession_kindand handle absent or null feature arrays:
See the full decision schema for every nested field.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); }
Node SDK methods and fields
Calls follow the API resources: client.<resource>.<method>(...), for example sessions.create, sessions.retrieve_decision or account.login, in each language's own case. Path ids are positional arguments and the body plus query are one set of named fields. The Node client uses the API's own field names, so workflow_id stays workflow_id.
| You want to | REST route | Notes |
|---|---|---|
| Start a verification | POST /v3/session/ | Workflow type decides KYC or KYB |
| Read the result | GET /v3/session/{session_id}/decision/ | Needs read:sessions |
| Sign in programmatically | POST https://apx.didit.me/auth/v2/programmatic/login/ | Never sends your API key; pass the returned token as the account token |
| Field | Type | What it does |
|---|---|---|
workflow_id | UUID, required | Stable workflow UUID from /v3/workflows/ |
vendor_data | string, optional | Your stable identifier for the user or business; strongly recommended because it binds sessions to the same entity and drives duplicate detection |
callback and callback_method | URL, string | Where to redirect; method is initiator, completer or both |
metadata | object | Echoed back in responses and webhooks, never shown to the user |
tags | array of strings | Up to 10 tags, 50 characters each, filterable in the Console |
session_expiration_time | integer | Seconds, 3600 to 2419200, overrides the workflow setting for this session |
expected_details | object | Person fields for KYC, or company_name, registry_country and registration_number for KYB |
sandbox_scenario | string | Sandbox applications only; rejected with 400 on live ones |
Webhook destinations subscribe by exact event type, and there is no wildcard, so list every family you need. For the verification flow, register status.updated for session status changes and data.updated when verification data is edited. Entity events such as business.status.updated and business.data.updated, transaction events such as transaction.created and transaction.status.updated, and travel_rule.status.updated are options for integrations that use those features. Session payloads carry session_id, status, webhook_type, application_id, environment, sandbox_scenario, workflow_id, vendor_data and, only when the status is Approved, Declined, In Review or Abandoned, the full decision object. KYB payloads add business_session_id and session_kind.
Status strings are case sensitive and include spaces. Treat this list as the enum: Not Started, In Progress, Approved, Declined, In Review, Awaiting User, Resubmitted, Expired, Abandoned and Kyc Expired, where the last one uses a single capital K. Compare with strict equality and never with a case-insensitive match.

Test with sandbox data: one reproducible case
Use your sandbox Application's API key. Sandbox testing is free and unlimited, and every check is mocked.
- List the available scenarios with
GET /v1/sandbox/scenarios/. Each entry has a slug. - Use the documented slug
decline_aml_hitfor this case. - Pass that slug as
sandbox_scenarioon create. The scenario expands its bundled magic values ontocontact_detailsandexpected_detailsso the session reproduces the outcome. - To change the outcome after create, call
POST /v3/session/{session_id}/sandbox/arm/while the session is stillNot Started.
Expected result for decline_aml_hit. The session should reach Declined. The webhook should show environment as sandbox and sandbox_scenario as decline_aml_hit. Check the webhook's top-level status, then inspect decision_trace inside the decision object, or retrieve the decision directly. Use the exact status expected by the armed scenario as your sandbox assertion, not a generic terminal status.
Use the request ID from
DIDIT_LOG=debugto trace API calls. In the decision response,status_overriderecords whether a reviewer overrode the automatic status, anddecision_traceshows how the current status was reached.

Error cases and fixes
| Symptom | Status and body | Fix |
|---|---|---|
| Key rejected | 401 on verification.didit.me | The x-api-key header is wrong, malformed, revoked or expired. Re-fetch the key, or issue a new one under Developers then API keys |
| No header or no scope | 403 | A missing x-api-key header, a scoped key without access to this resource, or a call from an address outside the key's IP list. Send the header, use a key with the required privilege, or call from an allowed address |
| Application was deleted | 403 with code application_deleted | Do not retry. After a few minutes the key is refused like any invalid key. Use a key of an existing application |
| Decision missing | 404 with detail Not found | A 404 can mean the session does not exist, belongs to a different application, or falls outside the key's allowed workflows or statuses. Use a key whose limits include that session |
| Callback rejected | 400 naming the allowed domains | Add the origin to allowed_domains with PATCH /v3/webhook/, or use a custom scheme deep link |
| Scenario refused | 400 on sandbox_scenario | You armed a scenario on a live application. Use the key from your sandbox Application |
| Too many requests | 429 with a wait field in seconds | Back off for that many seconds, then retry. Do not hot loop |
| Signature mismatch | Your own 4xx after HMAC check | Preserve the raw body. Require a valid X-Timestamp within 300 seconds of the current time. Compute HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON using the current destination secret. Compare the computed signature with X-Signature-V2 in constant time. If X-Signature-V2-Previous is present and you have the replaced secret, recompute with that secret and compare with the previous header in constant time. Accept either valid signature before processing the payload |
Disconnect and clean up
Stop making Didit API calls from the Node service and remove its DIDIT_API_KEY. Remove any organization and application IDs configured solely for this integration. Didit sends webhook events to a separately configured destination. Rotation guidance still applies while you change secrets: previous-signature headers are sent for 24 hours after a destination's signing secret is rotated, so deploy verification for both the current and replaced secrets together.
Cost of both ends
| Side | Item | Price |
|---|---|---|
| Didit | Node server SDK | Free |
| Didit | Workflow Orchestrator and MCP server | Free |
| Didit | Sandbox testing | Free and unlimited |
| Didit | Full ID check: ID document $0.15, passive liveness $0.10, face match $0.05, device and IP $0.03 | $0.33 per completed check |
| Didit | AML screening, added to a check | $0.20 per check |
| Didit | Business verification, priced by country and data tier | From $2.00 per company for registry retrieval, plus $0.20 company AML, $0.20 per person AML and $0.33 per linked KYC, each billed separately when run |
| You | Node runtime and hosting | Your existing infrastructure, no Didit fee |
Billing is per completed check from prepaid credit. Some no-match database lookups and retries are billable; the docs pricing page lists them. Plan credit is added every month and does not roll over. New top-ups are added at face value and last 12 months from the day you add them; balances bought before November 1, 2026 do not expire. Usage draws from the month's plan credit first, then from top-ups.

Worked cost example: 10,000 KYC checks a month
Assume a workflow that runs the full ID check at $0.33 per completed check, 10,000 completed checks in the month, and no other modules.
- List price: 10,000 x $0.33 = $3,300.00. On Free, assume an eligible organization with the full $10.00 monthly credit available. $10.00 of credit applies, so top-ups cover $3,300.00 - $10.00 = $3,290.00.
- Growth at 4% off: $0.33 x 0.96 = $0.3168 per check. 10,000 x $0.3168 = $3,168.00. Plan credit $115.00 leaves $3,053.00 of top-ups, plus the $99.00 monthly fee, for $3,152.00.
- Scale at 10% off: $0.33 x 0.90 = $0.2970 per check. 10,000 x $0.2970 = $2,970.00. Plan credit $350.00 leaves $2,620.00 of top-ups, plus the $299.00 monthly fee, for $2,919.00.
Add AML screening to the same 10,000 checks and the list-price line becomes 10,000 x ($0.33 + $0.20) = 10,000 x $0.53 = $5,300.00.
Sources
- Didit docs: Server SDKs, install matrix, runtime minimums and endpoint coverage
- Didit docs: Node.js and TypeScript SDK
- Didit docs: API authentication, hosts, key formats and failure modes
- Didit docs: Create Session API and request fields
- Didit docs: Retrieve Session decision and handler pattern
- Didit docs: Webhooks, HMAC signing, event types and envelope
- Didit docs: Verification statuses and session lifecycle
- Didit docs: API errors, status codes and fixes
- Didit docs: Sandbox testing and scenario catalog
- Didit docs: End-to-end integration prompt
- Didit docs: Data models and full decision schema
- Didit pricing page and pricing as JSON, read November 26, 2026
- Didit docs: Pricing and billing rules
- npm: @didit-protocol/sdk-node and source
- Didit MCP server setup
- Didit switch guide
Open the Didit Business Console, copy your sandbox Application key and run one scenario. The sandbox is free, and you can start without a 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
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What is the npm package name for the Didit Node SDK?
The package is @didit-protocol/sdk-node, installed with npm install @didit-protocol/sdk-node. The source lives at github.com/didit-protocol/sdk-node. It is one of seven official server SDKs, alongside Python, Go, Java, PHP, Ruby and .NET.
How much does the Didit Node SDK cost?
The SDK itself is free, and so are the Workflow Orchestrator and the MCP server. You pay per completed check: $0.33 for a full ID check, $0.20 for AML screening, from $2.00 per company for business verification. Sandbox testing costs nothing on any plan.
Which Node versions does the SDK support?
Node.js 18 and newer. It also runs on Bun, Deno and edge runtimes that expose fetch. On an edge runtime there is no process environment, so pass the API key to the client as an option rather than relying on DIDIT_API_KEY.
Can I use the Node SDK in a browser or a React Native app?
No. The server SDKs hold your API key, so they belong on the backend only. In the browser or a mobile app, use the web and native SDKs instead. They present the verification flow to your user and never hold your API key.
How do I verify a Didit webhook signature in Node?
Preserve the raw body. Require a valid X-Timestamp within 300 seconds of the current time. Compute HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON using the current destination secret. Compare the computed signature with X-Signature-V2 in constant time. If X-Signature-V2-Previous is present and you have the replaced secret, recompute with that secret and compare with the previous header in constant time. Accept either valid signature before processing the payload.
Why does my create session call return 400 on the callback field?
The Application has allowed domains configured and your callback origin is not on the list, so creation fails with an error naming the permitted domains. Add the origin with PATCH /v3/webhook/, or use a custom URL scheme such as an app deep link, which is always accepted.
Why do I get 403 from the decision endpoint with a working key?
A 403 means the request is understood but not allowed. It can be a missing x-api-key header, a key without the privilege for this resource, or a key called from an address outside its IP list. Fix the header, use a key with read:sessions, or call from an allowed address. A 404 can mean the session does not exist, belongs to a different application, or falls outside the key's allowed workflows or statuses.
How do I test identity verification in Node without paying?
Use the key from your sandbox Application regardless of prefix. Newly issued sandbox keys start with sk_test_, every check is mocked, and testing is free and unlimited. List slugs with GET /v1/sandbox/scenarios/ and pass one as sandbox_scenario on create, or re-arm it later with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started.
Where do I get the sandbox workflow UUID?
In the Business Console, open your sandbox Application and copy the workflow UUID. The API also lists workflows at /v3/workflows/. Pass the value as workflow_id on create.
Does the Node SDK handle KYB as well as KYC?
Yes. There is one session endpoint and the workflow type decides the outcome: a KYC workflow creates a user verification and a KYB workflow creates a business verification. The decision response tells you which one you got through session_kind, which is why you should always branch on that field.
What is the difference between the Node SDK and the native SDKs?
The Node SDK runs on your backend and calls the server APIs with your API key. The web and native SDKs run inside your user's app, present the capture flow and never hold the key. Use the web or native SDK for in-app capture, or send the user to the hosted flow.
Can I move an existing Node integration from another provider to Didit?
Yes. Review session creation, webhook verification and decision mapping against the integration prompt. The switch guide is another starting point. Do not assume field parity: Node SDK 1.0.1 lacks the two Google Wallet endpoints and the 16 Database Validation request fields, so use the documented REST calls for those cases.
Which status strings should my Node switch statement handle?
All ten: Not Started, In Progress, Approved, Declined, In Review, Awaiting User, Resubmitted, Expired, Abandoned and Kyc Expired. They are exact, case-sensitive strings including the spaces, and Kyc Expired uses a single capital K. For In Review, a reviewer can open the session in the Business Console and approve, decline, or request resubmission. Awaiting User in KYB means parties still owe steps, and Resubmitted means the user is redoing steps, so keep listening for later status updates.
Which privilege does the decision call require?
The decision endpoint requires read:sessions. A key without it gets 403. A 404 can mean the session does not exist, belongs to a different application, or falls outside the key's allowed workflows or statuses.
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


