One prompt. End-to-end Didit integration.
The fastest way to integrate Didit into any application is to hand this prompt to an AI coding agent. It walks the agent through programmatic account creation, SDK install, workflow setup, session creation, webhooks with HMAC-SHA256 signature verification, and decision handling — every endpoint, header, package name, and price has been cross-checked against the canonical docs on this site. How to use:- Open Claude Code, Codex, Cursor, GitHub Copilot, Devin, or any AI coding agent that can run shell commands.
- Click Copy Prompt below.
- Paste into your agent’s chat.
- Fill in the
<my_stack>block with your framework / language / use case. - Hit enter.
What the prompt covers
| Step | What the agent does |
|---|---|
| 1. Register | Two API calls to https://apx.didit.me/auth/v2/programmatic/{register,verify-email}/ — returns the api_key (used as x-api-key for every verification API call) |
| 2. Choose approach | Sessions API + SDK (recommended for any user-facing flow) or Standalone APIs (server-to-server, custom UI) |
| 3. Create workflow | POST /v3/workflows/ with the canonical body shape: {workflow_label, features: [{feature: "OCR"}, ...]} using UPPERCASE feature enums (face_liveness_method for LIVENESS: PASSIVE / ACTIVE_3D / FLASHING) |
| 4. Install SDK | Picks the right package for your stack: @didit-protocol/sdk-web, the iOS SDK via Swift Package Manager (github.com/didit-protocol/sdk-ios), me.didit:didit-sdk (Maven Central), @didit-protocol/sdk-react-native, or didit_sdk (Flutter) |
| 5. Create session | POST /v3/session/ with workflow_id, vendor_data, callback — frontend opens the returned url via SDK / iframe / redirect. Auth failures are uniformly HTTP 403 {"detail": "..."} |
| 6. Set up webhook | Registers a webhook_version: "v3" destination, builds the receiver with the canonical X-Signature-V2 pipeline (shortenFloats → sortKeys → JSON.stringify → HMAC-SHA256 → constant-time compare) and 5-second response budget |
| 7. Apply decision | Database-update logic for all 10 session statuses (Not Started, In Progress, Awaiting User, In Review, Approved, Declined, Resubmitted, Abandoned, Expired, Kyc Expired) + idempotent dedupe on event_id + V3 plural-array decision parsing |
.cursor/mcp.json / claude_desktop_config.json.
Why this works as a one-prompt integration
- Self-sufficient. Every step has a runnable cURL or code snippet — the agent never has to leave the prompt to look up a body shape, header, or endpoint.
- Canonical. Each endpoint, header, status literal, and feature-array name is verified against
openapi-25.json,openapi-auth.json, and the live.mdxreference pages on this site (linked at the bottom of the prompt). - V3 plural-array contract. The prompt names every
decision.*array explicitly (id_verifications[],nfc_verifications[],liveness_checks[],face_matches[],aml_screenings[], …) and warns agents off the legacy V2 singular fields, so the integration handles multi-instance workflows (e.g. two ID checks in a step-up flow) from day one. - Bounded. A few thousand tokens — fits in any modern agent context with room left for your stack description and the agent’s planning notes.
- Idempotent. Tells the agent to dedupe on
event_id— Didit reuses the sameevent_idacross retries and fan-out destinations, which is exactly what makes it a stable idempotency key — withsession_id + status + webhook_typeas a fallback compound key. - Status-machine complete. The agent’s database-update logic handles every status the production fleet emits — including the KYB-only
Awaiting Userstate, theResubmittedflow withresubmit_info, and the post-onboardingKyc Expiredstate most integrators miss.
See also
- Programmatic Registration — the 2-call register / verify-email flow used at the top of the prompt
- AI Agent Integration (MCP) — full MCP tool catalogue (40+ tools) referenced at the bottom of the prompt
- SDKs Overview — pick the right SDK for your stack
- Webhooks — canonical X-Signature-V2 implementation + retry policy
- Create Session — the request shape the agent uses in step 5
- Retrieve Session Decision — the V3 plural-array decision shape returned to the agent
- Verification Statuses — the literal status strings the agent compares against
- Data Models — canonical per-feature schema for every
decision.*array - Pricing — the public per-module prices the prompt references