Build a Dev-Friendly Identity Sandbox with Didit & Docker Compose
Didit's sandbox is free on every plan: providers mocked, outcomes set by scenarios, with a 500-session-per-24-hour quota per sandbox application. Docker Compose makes your test wiring repeatable. Live KYC checks cost $0.33.

Contents
In this guide
Jump to the part you need.
This guide is for developers who want a repeatable sandbox for Didit without a sales call or a bill. Sandbox testing is free on every plan; each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota. Compose can call the real API safely, and live checks start at $0.33 for a full ID check. The caveat: every external provider is mocked, so outcomes come from scenarios, not from the images you upload.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
The sandbox at a glance
| Item | What to expect |
|---|---|
| Sandbox cost | $0.00 on every plan, including Free. Each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota. |
| Billing | Sandbox sessions are never billed and the balance check is bypassed. |
| What is mocked | OCR, AML, face match, the liveness result, NFC, phone, email, IP, proof of address, database validation, document AI. |
| What runs for real | The active liveness capture, in the hosted flow and through the SDKs' web handoff. |
| How outcomes are set | A scenario slug or magic value decides the result; the pixels you upload do not. |
| Webhook marker | environment is set to sandbox on every delivery. |
| Custom domains | Live applications only; sandbox sessions stay on the default hosted domain. |
| Key prefix | sk_test_ for a sandbox application, sk_live_ for a live one. |
| Example data | Every console section starts with Example-tagged records, never billed and never announced by webhook. |
| Live prices | Full ID check $0.33. The full live price table is further down. |
Start free in the sandbox at business.didit.me, with no sales call. The sandbox testing documentation lists every scenario and magic value, didit.me/pricing lists every unit price, and developers who want an AI assistant to write the integration can connect the Didit MCP server.
What you end up with
Your application code that calls the Didit API, a docker-compose.yml that starts it with one command, and a .env.example that documents the variables a teammate needs. The real .env stays out of git. From that you get a sandbox application with its own sk_test_ key, a workflow id the whole team can reuse, sessions that reproduce any outcome on demand, a webhook receiver that verifies signatures, and a decision fetch as a fallback.
Compose is here for one reason: it starts your app with the sandbox credentials already loaded, so anyone who clones the repo runs the same wiring you do. Didit itself is a hosted API, so there is no Didit service to run locally. The only requirements are outbound HTTPS and an env file.
The API you call in sandbox is the same API 4,000+ companies run in production. In sandbox the providers behind it are mocked, which is what makes the outcomes predictable.
Prerequisites
- Docker with Compose v2 installed on the machine running your app.
- A Didit organization. Sign up at business.didit.me or register through the API, as step 1 shows.
- A work email address. The register endpoint rejects reserved test domains such as example.com and returns
email_undeliverable. - A sandbox application inside that organization, and its
sk_test_API key. - A published workflow in that sandbox application, so you have a workflow id to call.
- An HTTPS address Didit can reach if you want webhooks. Session creation and the decision endpoint only need outbound HTTPS from your side.
Build the sandbox, step by step
Create the account and read both keys. Run the register call, then the verify call with the 6-character code Didit emails you. The response carries
sandbox_application.api_keyandapplication.api_key. Keep the first asDIDIT_API_KEYfor development and the second asDIDIT_LIVE_API_KEYfor launch day. On the console the same sandbox key lives under Developers, then API keys, after switching the application switcher to Sandbox.# 1) Register: emails a 6-character code with a 10 minute TTL curl -X POST https://apx.didit.me/auth/v2/programmatic/register/ \ -H "Content-Type: application/json" \ -d '{"email": "you@yourdomain.com", "password": "StrongP@ss1"}' # 2) Verify the email: the response carries both API keys curl -X POST https://apx.didit.me/auth/v2/programmatic/verify-email/ \ -H "Content-Type: application/json" \ -d '{"email": "you@yourdomain.com", "code": "A3K9F2"}'Create a workflow and save its id. A workflow decides which checks run and in what order. The sandbox application ships with every product on, so you can build a KYC flow first and add AML, phone or proof of address later without touching code.
curl -X POST https://verification.didit.me/v3/workflows/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_label": "Sandbox KYC", "workflow_type": "kyc", "features": [ {"feature": "OCR"}, {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}}, {"feature": "FACE_MATCH"}, {"feature": "AML"} ] }'Persist
workflow.id. That UUID is what every session creation needs.Put the credentials in an env file, not in the compose file. Two files, both small. The env file stays out of git.
# .env DIDIT_API_KEY=sk_test_your_sandbox_key DIDIT_WORKFLOW_ID=your_workflow_uuid DIDIT_WEBHOOK_SECRET=paste_the_secret_shared_key_here# docker-compose.yml services: app: build: . env_file: .env ports: - "8080:8080"Start it with
docker compose up -d. The container callshttps://verification.didit.meover outbound HTTPS, which is the whole of the Didit side of the setup. If you already ran a mock server to fake identity providers, drop it: the Didit sandbox answers every provider call itself.Read the scenario catalog. Scenarios are the test cards of this platform. The list is served from the verification service and is authenticated with the same header as every other call, so it never drifts from what your application can actually produce.
curl https://verification.didit.me/v1/sandbox/scenarios/ \ -H "x-api-key: $DIDIT_API_KEY"Create a session with a scenario armed. The scenario expands its bundled magic values onto the contact and expected details, so the outcome no longer depends on the pixels you upload. The
callbackmust sit on one of the application's allowed domains when those are configured, otherwise creation fails with a 400.curl -X POST https://verification.didit.me/v3/session/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_id": "'$DIDIT_WORKFLOW_ID'", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return", "sandbox_scenario": "decline_aml_hit" }'The response contains
session_id,urlandsession_token. Redirect the browser tourl, or open it in an SDK or iframe. If you need to change the outcome later, you can re-arm a scenario withPOST /v3/session/{session_id}/sandbox/arm/while the session is still Not Started.
The hosted flow your users see is the same in sandbox. Active liveness capture runs for real; only the result is simulated. Register a webhook destination and store its secret. Include every event family you want, because there is no wildcard. The response carries
secret_shared_key, which you can read again fromGET /v3/webhook/destinations/{destination_uuid}/.curl -X POST https://verification.didit.me/v3/webhook/destinations/ \ -H "x-api-key: $DIDIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Local sandbox", "url": "https://your-tunnel.example.com/api/webhooks/didit", "subscribed_events": ["status.updated", "data.updated"], "webhook_version": "v3" }'Verify the signature before you parse the body. Read the raw request body, then check
X-Signature-V2, an HMAC-SHA256 over the sorted canonical JSON computed with your destination secret. Reject anything whereX-Timestampis more than 300 seconds away from now. Accept the-Previousheader too, so a secret rotation does not break delivery. De-duplicate onevent_idand answer 2xx within 5 seconds.Fetch the decision as your fallback. When a webhook is lost, or when you want to reconcile after a restart, ask the API directly. The V3 decision returns plural arrays, so never assume single fields.
curl https://verification.didit.me/v3/session/$SESSION_ID/decision/ \ -H "x-api-key: $DIDIT_API_KEY"
Expected output
Session creation returns a session_id, a hosted url and a session_token. The webhook envelope that follows carries event_id, session_id, status, webhook_type, the environment field set to sandbox, the armed sandbox_scenario slug, your vendor_data and the decision object when the status is Approved, Declined, In Review or Abandoned. Status values are exact, case-sensitive strings, including the space in In Review and the single capital K in Kyc Expired.
Inside the decision you should see id_verifications[], liveness_checks[], face_matches[], aml_screenings[] and the other per-feature arrays, one item per step the workflow ran. A new sandbox application also arrives with example data in every console section, tagged Example: approved, declined and in-review verifications with their documents, selfies, liveness, face match, AML screening, IP analysis and warnings. Those examples are real sandbox records, they are never billed, and no webhook is sent for them.
A sandbox result is a deterministic scenario output, not an accuracy measurement. Because every provider is mocked, the outcome is fixed by the scenario or magic value you chose, so a green run proves your wiring and nothing about how a real provider performs. Treat the sandbox as an integration test suite, and validate provider accuracy with live checks against your own test users before you trust any number.


Sandbox inputs and outputs
| Value | What it is | Where you see it |
|---|---|---|
DIDIT_API_KEY | Sandbox application key, prefixed sk_test_ | Verify response, or Developers then API keys in the console |
DIDIT_WORKFLOW_ID | UUID of the workflow the session runs | workflow.id from the workflow create call |
vendor_data | Your stable id for the person, which binds sessions to one entity | Echoed in the webhook envelope |
sandbox_scenario | Scenario slug that fixes the outcome | Echoed as sandbox_scenario in the envelope |
DIDIT_WEBHOOK_SECRET | Destination signing secret | secret_shared_key from the destination create call |
session_id | Identifier for one verification | Session create response and every webhook |
url | Hosted verification link for the user | Session create response |
status | Exact lifecycle string | Webhook envelope and decision endpoint |
environment | sandbox or live | Webhook envelope |
Failure cases and recovery
| Symptom | Cause | Recovery |
|---|---|---|
| 403 with "You do not have permission to perform this action." | No x-api-key header, or a key outside its allowed IP list | Send the header with a key that has access in Developers then API keys |
| 401 on verification.didit.me | Key wrong, malformed, revoked or expired | Log back in through /auth/v2/programmatic/login/ and re-read the application key, or copy the primary key from the console |
| 400 on session creation | Unknown or invalid workflow_id | Copy workflow.id again from the create response |
| 400 on callback | The http or https callback is not on the application's allowed domains | Add the origin, or use an app deep link, which is always accepted |
400 on sandbox_scenario | The key belongs to a live application | Switch to the sandbox application's sk_test_ key |
400 on session_expiration_time | Value outside 3600 to 2419200 seconds, or not a whole number | Keep the value inside the documented range, or omit it to use the workflow setting |
| 429 | Rate limit | The response carries a wait field in seconds: back off for that long, then retry |
| Webhook never arrives | Handler slower than 5 seconds, or answered 5xx or 404 | Didit retries twice, about 1 and 4 minutes later, then drops it. Resend from the destination's delivery log, or fetch the decision instead |
| Custom domain rejected | Sandbox applications cannot add custom domains | Test custom domains on a live application |
| No rule results on a sandbox transaction | A sandbox application stores the transaction but runs no rule evaluation, screening, notification or charge over it | Do not build rule tests on sandbox transactions; rule_runs stays empty there |
What costs money, and where review starts
Nothing inside a sandbox application is billed. The moment you swap DIDIT_API_KEY to a live key, every completed check is charged at list price from prepaid credit. These are the unit prices that matter most while you build.
| Check | Price (USD) |
|---|---|
| Full ID check (KYC): document, biometrics, device and IP | $0.33 |
| ID Verification alone | $0.15 |
| Passive Liveness | $0.10 |
| Active Liveness | $0.15 |
| Face Match 1:1 | $0.05 |
| NFC reading (add-on) | $0.15 |
| AML Screening | $0.20 |
| Proof of Address | $0.20 |
| Wallet Screening | $0.15 |
| Business verification (KYB), from | $2.00 |
Worked example. A team runs 1,200 sandbox sessions during a month, then ships 1,000 live KYC checks, adds AML screening to 200 of them, asks 50 users for proof of address and screens 300 wallet addresses. Sandbox first: 1,200 x $0.00 = $0.00, because sandbox testing is free on every plan. Each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota. Then live: 1,000 x $0.33 = $330.00, plus 200 x $0.20 = $40.00, plus 50 x $0.20 = $10.00, plus 300 x $0.15 = $45.00. Total is $330.00 + $40.00 + $10.00 + $45.00 = $425.00 for the month of live traffic.
On the Growth plan the same live usage gets the 4% plan discount: 1,000 x $0.3168 = $316.80, 200 x $0.192 = $38.40, 50 x $0.192 = $9.60, 300 x $0.144 = $43.20, so $316.80 + $38.40 + $9.60 + $43.20 = $408.00. Growth costs $99 a month and adds $115 of monthly credit, and usage is paid from that credit first: $115.00 of the $408.00 is covered by the credit, and the remaining $293.00 comes from top-ups, which you buy at face value and which last 12 months. The $99 monthly fee is charged on top of that. Unused plan credit does not roll over. The Free plan gives $10 of monthly credit to organizations that sign up with a work email, phone codes excluded.
Wallet screening is $0.15 per screening and runs inside Transaction Monitoring, documented at wallet screening. You can also bring your own screening provider and run it inside Didit.

Review boundaries are worth knowing before you build the wrong test. A scenario can hand you In Review, and a sandbox application's own screens carry the features of every plan, so you can walk the case screens, transaction rules and authentication settings with example data. What you cannot test in sandbox is a person's judgement: the decision is scenario-driven, so treat the review queue as a UI walkthrough and a rehearsal of your own handling, not as a measure of reviewer behaviour. Organization-wide settings such as member roles, single sign-on, the audit log and white label follow your plan in sandbox too.
Sources
- Didit docs: Sandbox test data, scenarios, magic values and documents
- Didit docs: Quick start
- Didit docs: API authentication
- Didit docs: API keys
- Didit docs: Applications, live and sandbox
- Didit docs: Create Session API
- Didit docs: Webhooks and HMAC signing
- Didit docs: Verification statuses
- Didit docs: Wallet screening inside Transaction Monitoring
- Didit pricing page and pricing.json, read November 26, 2026
- Didit docs: Pricing and billing rules
- Didit MCP server and llms.txt
- Didit Business Console
Your next step: open business.didit.me, create a sandbox application, put its sk_test_ key into the env file and start your app. No sales call is needed, sandbox testing is free on every plan, and nothing you run in the sandbox is billed. Each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota.
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 the Didit sandbox free?
Yes. Sandbox testing is free on every plan, including Free; each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota. Sandbox sessions are never billed and the balance check is bypassed, so nothing you run there reaches your balance. The Free plan also gives $10 of monthly credit to organizations that sign up with a work email, which you only spend on live checks.
Is there a limit on sandbox sessions?
Yes, there is a limit. Each sandbox application can create 500 sessions per 24 hours, and Enterprise can request a higher quota. Sandbox sessions are never billed and the balance check is bypassed, which means a scenario you arm now will behave the same way on run 1 and run 1,000. Plan test volume around the quota and your own CI minutes.
Does the Didit sandbox call real providers?
No. In a sandbox application every external provider is mocked: OCR, AML, face match, the liveness result, NFC, phone, email, IP, proof of address, database validation and document AI. One exception matters for testing: active liveness runs the real capture in the hosted flow and through the SDKs' web handoff, so users get the real experience while only the result is simulated.
How do I force a Declined or In Review result?
Pass sandbox_scenario when you create the session, using a slug from GET /v1/sandbox/scenarios/. The scenario expands its bundled magic values onto the contact and expected details, so the outcome no longer depends on what you upload. You can also arm or re-arm a scenario after creation, while the session is still Not Started, with POST /v3/session/{session_id}/sandbox/arm/.
Do the documents I upload change the sandbox result?
No. Outcomes never depend on the pixels: extracted data and statuses come from the scenario or magic value, while the captured media is stored for real, exactly like a live session. That is why you should never upload real identity documents to a sandbox. Use the sample documents and the scenario catalog instead.
How do I tell a sandbox webhook from a live one?
Every delivery carries environment set to sandbox for sandbox sessions and to live for live ones, and sandbox deliveries echo the armed scenario in sandbox_scenario. Two more signals: sandbox API keys start with sk_test_, and the records a new sandbox starts with carry an Example tag in the console.
Can I use my live API key against the sandbox?
No. API keys belong to one application and one environment, so a live key creates billed live sessions. Keep the sandbox application's sk_test_ key as DIDIT_API_KEY and the live key in a separate variable you load only when you go live. A sandbox_scenario sent with a live key is rejected with a 400.
Do I still need a mock server such as WireMock in the Compose setup?
Usually not. The sandbox is the mock: every provider call is answered by Didit, and scenarios give you deterministic decisions. Keep a mock server only for services outside Didit that your application calls, or for replaying a captured webhook envelope against your handler.
What happens if my webhook handler is slow or errors?
Respond within 5 seconds. If your handler is slower, answers 5xx or answers 404, Didit retries twice, about 1 and 4 minutes later, then drops the delivery. Resend it from the destination's delivery log, and remember that GET /v3/session/{session_id}/decision/ always gives you the decision directly.
Why does the sandbox still ask for a real selfie?
Because active liveness runs as it does live, inside the hosted flow and the SDK web handoff, so you can test the capture experience your users will get. The result is simulated by the scenario or magic value, while the media you upload is stored for real, exactly like a live session. Never upload real identity documents to a sandbox.
Can I add a custom domain to a sandbox application?
No. Custom domains are live only, so sandbox sessions always run on the default hosted verification domain. Use a live application to test your own domain, and keep the sandbox for API and flow behaviour.
Do AML and transaction monitoring work in the sandbox?
AML screening is mocked like every other provider, so a scenario decides the hit or no-hit result and you get an aml_screenings[] array back. Transaction Monitoring behaves differently: a sandbox application stores the transaction and returns it, but no rule evaluation, screening, notification or charge runs over it, and rule_runs stays empty.
What does a sandbox run prove and what does it not prove?
A sandbox run proves your integration: session creation, hosted flow handoff, webhook signature verification, status handling and decision parsing. It does not prove provider accuracy, because no third party is called and every result is a deterministic scenario output. Check accuracy and fraud behaviour with live checks on your own test users before you trust the numbers.
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


