KYC SDK for .NET: Identity Verification Integration (2026)
Install the Didit .NET package, create a KYC session from your backend, send the user to the hosted flow, verify the webhook and read the decision. A full KYC check costs $0.33.

Contents
In this guide
Jump to the part you need.
If you build on .NET 8 or .NET Standard 2.0 and want KYC inside your own application, the official Didit .NET package is a server-side SDK that calls the documented server endpoints with typed requests and verifies the webhooks Didit sends back. You pay per completed check, and a full KYC check is $0.33. The main caveat: the SDK holds your API key, so it belongs on your server, never in a browser or mobile bundle.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | Detail |
|---|---|
| Package | Didit on NuGet, installed with dotnet add package Didit |
| Minimum runtime | .NET 8 or .NET Standard 2.0 |
| Where it runs | Your backend only. It holds the API key. |
| Auth header | x-api-key against https://verification.didit.me |
| Create a session | POST /v3/session/ |
| Read the decision | GET /v3/session/{session_id}/decision/ |
| Price of a full KYC check | $0.33 per completed check |
| Sandbox | Free and unlimited on every plan |
Start free in the sandbox at business.didit.me, no sales call. If you work with a coding agent, connect Didit to an AI assistant through the Didit MCP server. Read the User Verification product page for the checks this flow runs. Every unit price is on the pricing page, and the server SDK docs list every package and its minimum runtime.
What the Didit .NET SDK covers
The server SDKs are the official Didit libraries for your backend. Each one calls the server endpoints of the API reference with typed requests and responses, verifies the webhooks Didit sends you, and checks the tokens of Didit Authentication. The .NET package ships from NuGet with the source on GitHub.
Calls follow the API's resources: client.<resource>.<method>(...), for example sessions.create or sessions.retrieve_decision, written in the language's own case. That means the package covers creating verification sessions, reading decisions, calling the standalone APIs, managing users, businesses, workflows and cases, screening transactions and wallets, and the Travel Rule. The SDKs themselves are free, like the Workflow Orchestrator and the MCP server.
One documented gap: no 1.0.1 release has the two Google Wallet endpoints, start a Google Wallet verification and submit a wallet response. The Python, Node.js, Java, PHP, Ruby and .NET SDKs have every other server endpoint, so the documented Google Wallet gap does not affect this standard KYC flow.
Configuration is by environment variable, so a client created with no options is ready to use. DIDIT_API_KEY signs every API key call. DIDIT_ORGANIZATION_ID and DIDIT_APPLICATION_ID are needed only for organization-scoped routes such as cases, networks and regulatory reports; without them those calls fail before any request is sent. DIDIT_LOG=debug logs method, path, status, duration and request id of every request, never bodies or headers. Create one client per process and share it: it keeps a connection pool and is safe across threads.
Prerequisites
- A Didit account and an Application in the Business Console, created at business.didit.me.
- A published KYC workflow, and its workflow id. Workflows run from a template, from a description, or empty, in the Workflows section of the console.
- An API key from Developers, then API keys. New keys start with
sk_live_for a live application orsk_test_for a sandbox application, followed by 43 URL-safe characters. Keys created before that format have no prefix and keep working, so never validate a key by its prefix. - A .NET project on .NET 8 or .NET Standard 2.0.
- Outbound HTTPS to
verification.didit.me. - For decisions by webhook: a webhook destination URL, given as
labelandurl, that answers within 5 seconds.
Steps to a working KYC flow
- Create the organization and application. Sign in to the console, create your Organization, then pick the Application you will use for this project. API keys, workflows and verifications are scoped to an Application.
- Copy the API key. Open Developers, then API keys. The Primary key is the Application's own secret. Create a separate key when a service needs narrower access. Treat the key as a password.
- Publish a KYC workflow and note its id. In the Workflows section, start from the KYC template or describe the checks you need. A simple KYC flow uses OCR, passive liveness, face match and optionally AML. Persist the workflow id your backend will send.
- Install the package. Run
dotnet add package Diditin the project directory. - Set the environment variables. Put
DIDIT_API_KEYin your secret store or host configuration. AddDIDIT_ORGANIZATION_IDandDIDIT_APPLICATION_IDonly if you call organization-scoped routes. - Create a session from your backend. Send
workflow_id,vendor_dataandcallbacktoPOST /v3/session/. The workflow's type decides whether a user or a business session is created; there is no separate KYB endpoint. - Send the user to the returned url. Redirect the browser, open it in the web or native SDK, or embed the flow. Didit appends
verificationSessionIdandstatusto your callback when the flow finishes. - Register a webhook destination. Send
label,url,subscribed_eventsandwebhook_versiontoPOST /v3/webhook/destinations/and store the returnedsecret_shared_key. Subscribe tostatus.updatedanddata.updatedfor sessions; there is no wildcard. - Read the decision as a fallback. If the webhook never arrives, call
GET /v3/session/{session_id}/decision/with the same key, then branch onsession_kindbefore reading any feature array.
Runnable example in C# (raw HTTP fallback)
The example below calls the REST API directly with HttpClient. It is not an SDK invocation: it shows exactly what goes over the wire, which helps when you debug a status code or a field your plan does not return yet. The same two calls exist as typed SDK methods, sessions.create and sessions.retrieve_decision, written in the language's own case, and a client created with no options reads DIDIT_API_KEY from the environment and is ready to use. The .NET SDK page documents the client, the typed models, the error types and the webhook verifier.
using System.Net.Http.Json;
using System.Text.Json.Nodes;
var apiKey = Environment.GetEnvironmentVariable("DIDIT_API_KEY");
using var http = new HttpClient { BaseAddress = new Uri("https://verification.didit.me") };
http.DefaultRequestHeaders.Add("x-api-key", apiKey);
// 1. Create the session
var create = await http.PostAsJsonAsync("/v3/session/", new
{
workflow_id = "YOUR_WORKFLOW_ID",
vendor_data = "user-42",
callback = "https://myapp.com/kyc/return"
});
create.EnsureSuccessStatusCode();
var session = JsonNode.Parse(await create.Content.ReadAsStringAsync())!;
var sessionId = session["session_id"]!.GetValue<string>();
var hostedUrl = session["url"]!.GetValue<string>();
// 2. Redirect the user to hostedUrl. The decision arrives by webhook.
// 3. Fallback: read the decision directly
var decision = await http.GetFromJsonAsync<JsonNode>($"/v3/session/{sessionId}/decision/");
Console.WriteLine(decision!["status"]); // Approved, Declined, In Review ...
Console.WriteLine(decision!["session_kind"]); // user or business
Only the fields the docs define are used here. If your stack is not .NET, the quick start shows the same recipe in cURL and the other SDK pages show it in Python, Node.js, Go, Java, PHP and Ruby.
Verify the webhook before you parse it
The SDK verifies webhooks for you. If you handle the endpoint yourself, follow this order. Deserializing the body first breaks the signature check, because re-serializing changes the bytes.
- Read the raw request body and keep the bytes. Do not parse JSON yet.
- Read
X-Timestamp, Unix epoch seconds, and reject the request when the difference from now is more than 300 seconds. - Recompute HMAC-SHA256 with your destination's signing secret,
secret_shared_key. ForX-Signature-V2, hash the sorted, Unicode-preserved canonical JSON. ForX-Signature, hash the exact raw bytes. - Compare in constant time against the header. When
X-Signature-V2-PreviousorX-Signature-Previousis present, accept a match on either, so a rotated secret keeps working while you deploy. - Only now parse the JSON. De-duplicate on
event_id, branch onwebhook_typeandstatus, apply the change idempotently, and answer 2xx within 5 seconds.
One caution from the docs: X-Signature-Simple is deprecated and authenticates only the envelope, not the decision body. If you verify with it, re-fetch the decision from the decision endpoint instead of trusting the payload.

id_verifications array in the decision is what this console panel renders for one session.Expected output
The create call returns the session handle and the hosted flow address:
{
"session_id": "uuid",
"url": "hosted flow address to redirect the user to",
"session_token": "token for the client-side flow"
}
The decision call returns single-value fields plus one plural array per feature that ran. On an approved KYC session, status is Approved and session_kind is user, and you should see populated id_verifications, liveness_checks and face_matches arrays, plus aml_screenings when the workflow includes AML. Scalars such as status stay single values; only the per-feature data is an array. A feature that did not run is absent or null, never a placeholder. Status values are exact and case sensitive: Approved, Declined, In Review, In Progress, Not Started, Expired, Abandoned, Kyc Expired, Resubmitted, Awaiting User.

liveness_checks array maps to this panel. Read the status, not the score alone.Failure cases and recovery
| Symptom | Cause | Recovery |
|---|---|---|
401 on verification.didit.me | x-api-key header wrong, malformed, revoked or expired | Re-fetch the key, confirm the environment variable actually loaded at runtime |
403 on verification.didit.me | No x-api-key, a scoped key without access to that resource, or a call from outside the key's IP list | Use a key with that access, created under Developers, then API keys |
403 with code application_deleted | The key's application was deleted | Do not retry. Use a key of an application that exists |
400 on session create | Invalid workflow_id, or a callback outside the application's allowed domains | Check the workflow uuid, or add the origin to the allowed domains |
404 on a session route | The session sits outside the scoped key's workflows or statuses | Use a key whose limits include that session |
429 | Rate limit | The response carries a wait field in seconds. Back off, then retry |
| Organization-scoped call fails before any request | DIDIT_ORGANIZATION_ID or DIDIT_APPLICATION_ID missing | Set both variables on the client or the environment |
| Webhook never arrives | Handler slower than 5 seconds, or it answered 5xx or 404 | Didit retries twice, after about 1 and 4 minutes, then drops the delivery. Resend from the destination's delivery log, and poll the decision endpoint meanwhile |
Inputs and outputs
| Direction | Field | Notes |
|---|---|---|
| Send | workflow_id | Required. UUID of the published workflow. |
| Send | vendor_data | Your stable identifier for the person. Binds the session to a User entity and feeds duplicate detection. |
| Send | callback | Where the hosted flow returns. Must sit on one of the application's allowed origins when those are configured; custom app schemes are always accepted. |
| Send | language | ISO 639-1 code for the verification UI. |
| Send | expected_details | First name, last name, date of birth, nationality, ID country. Mismatches surface as decision warnings. |
| Send | metadata, tags | JSON echoed back in responses and webhooks, and up to 10 labels for filtering in the console. |
| Send | session_expiration_time | Seconds, between 3600 and 2419200. Overrides the workflow setting for this session only. |
| Return | session_id | Use it for the decision call and for reconciling webhooks. |
| Return | status | The decision string, a single value. Case sensitive. |
| Return | session_kind | user or business. Branch on it before reading feature data. |
| Return | Feature arrays | id_verifications, liveness_checks, face_matches, aml_screenings, poa_verifications, phone_verifications, nfc_verifications and the rest. The per-feature data is always a plural array; the fields around it are not. |
Paid steps and review boundaries
Sandbox checks are free and unlimited, so build and test the whole flow with a sk_test_ key before you spend anything. In live mode you pay per completed check from prepaid credit, drawn from the month's plan credit first and then from top-ups.
- Full KYC check, $0.33: ID document $0.15, passive liveness $0.10, face match 1:1 $0.05, device and IP analysis $0.03.
- AML screening, $0.20 per check. Ongoing monitoring, $0.07 per user per year.
- Proof of address $0.20, NFC chip reading $0.15 as an add-on, age estimation $0.10, and phone verification codes billed at the carrier price for the country and channel plus Didit's $0.02 fee per code.
- Free line items: the SDKs, the Workflow Orchestrator, reusable KYC and the MCP server.
The review boundary is the status In Review. That is a session a person has to look at, either in the console or through the Investigator. An In Review status tells you review activity is happening; consult the pricing docs and the pricing page for any charge that applies before you budget for review volume. Read decision_trace to see whether the status came from automatic rules, a manual reviewer or the Investigator, and status_override when a reviewer changed it by hand. Do not treat an In Review session as a pass, and do not retry the create call to force a new outcome.
Worked cost example
A fintech onboarding 1,000 users a month on the full KYC check plus AML screening, at list price:
- KYC: 1,000 x $0.33 = $330.00
- AML screening: 1,000 x $0.20 = $200.00
- Total: $330.00 + $200.00 = $530.00, which is the $0.53 per person compliance bundle (KYC plus AML) x 1,000
- Ongoing monitoring for those 1,000 users over a year: 1,000 x $0.07 = $70.00
On the Scale plan the same 1,000 people cost $0.297 + $0.18 = $0.477 each, so $477.00 of usage, plus the $299.00 monthly fee. On the Free plan the $10.00 monthly credit covers 30 full KYC checks ($10.00 / $0.33 = 30.3).

aml_screenings in the decision.Sources
- Didit docs: server SDKs overview
- Didit docs: .NET SDK
- Didit docs: quick start
- Didit docs: API authentication
- Didit docs: create session
- Didit docs: retrieve session decision
- Didit docs: webhooks and signatures
- Didit docs: sandbox scenarios and magic values
- Didit docs: pricing and billing
- Didit pricing page and pricing.json, read November 26, 2026
- NuGet: Didit package
- GitHub: sdk-dotnet
Next step: open the sandbox at business.didit.me, create a sandbox application, publish a KYC workflow and run the C# example against it. No sales call, and sandbox checks do not bill.
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
Is there an official Didit SDK for .NET?
Yes. The package is called Didit, published on NuGet, with source at github.com/didit-protocol/sdk-dotnet. It is one of the official server SDKs, alongside Python, Node.js, Go, Java, PHP and Ruby, and it is free.
Which .NET versions does the Didit SDK support?
The package targets .NET 8 or .NET Standard 2.0, which is the documented minimum runtime row for .NET. A project on an older framework can use the .NET Standard 2.0 build.
How do I install the Didit .NET SDK?
Run dotnet add package Didit in the project directory. Then set DIDIT_API_KEY in your environment or host configuration and create one client per process, shared across threads.
Can I call the Didit .NET SDK from Blazor WebAssembly or a mobile app?
No. The server SDK holds your API key, so it stays on the backend. In a browser or a mobile app use the web and native SDKs instead: they present the verification flow to your user and never hold the key.
How much does a KYC check cost through the .NET SDK?
The SDK adds nothing to the price. A full KYC check is $0.33 per completed check, made of ID document $0.15, passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03. AML screening is $0.20 and ongoing monitoring is $0.07 per user per year.
How do I get the verification result in C#?
Two ways. Subscribe to the status.updated webhook and read the decision object in the payload, or call GET /v3/session/{session_id}/decision/ with the same API key. The decision endpoint works as a fallback if a delivery is dropped.
What happens if my webhook endpoint fails or answers slowly?
Didit retries twice, after about 1 and 4 minutes, then drops the delivery. Answer 2xx within 5 seconds, de-duplicate on event_id, and resend manually from the destination's delivery log if a message is still missing.
How do I verify the webhook signature in .NET?
Read the raw body before parsing JSON. Check that X-Timestamp is within 300 seconds of now, recompute the HMAC-SHA256 of the sorted canonical JSON with your destination secret, and compare with a constant-time comparison against X-Signature-V2 and, when present, its -Previous header.
Do I need a workflow before I can create a session?
Yes. The session create call requires a workflow_id from a published workflow, and the workflow's type decides whether a user or a business session is created. Build it in the console under Workflows, from a template, from a description, or empty.
How do I test a decline without uploading real documents?
Use a sandbox application and a sandbox scenario. A scenario is a slug from the sandbox catalog that the create call accepts on sandbox applications and rejects with 400 on live ones, and it expands magic values so the session reproduces a specific outcome. Sandbox testing is free and unlimited.
What does a wrong API key return from the .NET SDK?
A missing x-api-key header returns 403 on verification.didit.me, and a wrong, revoked or expired key returns 401. A scoped key without access to the resource also returns 403, so check scope before you assume the key is invalid.
Does the Didit .NET SDK cover the Google Wallet endpoints?
Not yet. No 1.0.1 release of the .NET SDK has the two Google Wallet endpoints, start a Google Wallet verification and submit a wallet response. Every other server endpoint is included, so a standard KYC flow is unaffected; Google Wallet itself is published at $0.10 per completed verification on the pricing page.
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


