How to Verify Didit Webhooks With X-Signature-V2 (2026)
Verify X-Signature-V2 over sorted canonical JSON, reject timestamps older than 300 seconds, answer within 5 seconds, dedupe by event_id, and handle up to two retries after failed delivery.

Contents
In this guide
Jump to the part you need.
For this integration, we recommend verifying X-Signature-V2, an HMAC-SHA256 over sorted, Unicode-preserved canonical JSON. Your endpoint has five seconds to answer. This guide is for the developer who owns that endpoint and the person who audits its deliveries. It shows the documented verification sequence, the 300 second timestamp window, idempotent handling on event_id, and the two retries at about 1 and about 4 minutes. The public price list does not publish a standalone webhook-delivery rate. Live verification checks are priced separately, and sandbox sessions are free.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | Value |
|---|---|
| Header to verify | X-Signature-V2, HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON |
| Timestamp header | X-Timestamp, Unix epoch seconds, reject when more than 300 seconds from now |
| Secrets and rotation | Verify X-Signature-V2 with the current destination secret and X-Signature-V2-Previous with the replaced secret if it is still configured |
| Response deadline | HTTP 2xx within 5 seconds |
| Idempotency key | event_id |
| Retries | Twice, at about 1 minute and about 4 minutes, then the delivery is dropped |
| Manual recovery | Resend from the delivery log in the console |
| Published delivery price | The public price feed lists no standalone webhook-delivery price. Live verification checks are priced separately: full KYC $0.33, AML screening $0.20, KYB from $2.00 |
Start free in the sandbox at business.didit.me, with no sales call, and point a test destination at your endpoint in minutes. For developers, connect Didit to an AI assistant through didit.me/developers/mcp. The checks behind these events come from our User Verification product; unit prices are on didit.me/pricing.
Choose the signature header to verify
We recommend X-Signature-V2. It is an HMAC-SHA256 over the sorted, Unicode-preserved canonical JSON. Changes to whitespace or JSON key order are handled by canonicalization when the parsed values are preserved. X-Signature is an HMAC over the exact raw bytes and only works while nothing in your stack touches the payload. X-Signature-Simple is deprecated: it authenticates the envelope only, not the decision body, so re-fetch the decision from GET /v3/session/{session_id}/decision/ if you rely on it.

status.updated webhook reports, and the decision object in the payload mirrors the session decision.Prerequisites
- A live or sandbox Didit application in the Business Console.
- An HTTPS endpoint that can read the raw request body before any JSON middleware parses it.
- Your destination signing secret in a secret store. The examples name it
DIDIT_WEBHOOK_SECRET. - Read access with the
read:webhooksscope if you want to audit destinations and failure alerts through the Management API.
Set up the destination and verify X-Signature-V2
- Open the Didit Business Console and go to Developers > API keys and Webhooks.
- Create a webhook destination and paste your HTTPS URL, for example
https://yourapp.com/api/webhooks/didit. You can create several destinations to fan out the same events to different systems. - Subscribe the destination to the exact event names you want. There is no wildcard, so include every family you need, such as
status.updated,data.updated,transaction.createdandinvestigator.report.ready. - Copy the destination signing secret and store it as
DIDIT_WEBHOOK_SECRET. Treat it like an API key. - Mount the webhook route so the raw body is available and nothing parses JSON ahead of it. For V2, read the raw body and parse it only to reconstruct the canonical JSON for the HMAC comparison. Do not trust or process any field yet.
- Require
X-Timestampto be a valid Unix epoch timestamp in seconds. Accept it only when its absolute difference from the current time is at most 300 seconds. Reject missing, malformed, and out-of-window values. - Rebuild the sorted canonical JSON and compute HMAC-SHA256 with the current destination secret. Compare in constant time against
X-Signature-V2. IfX-Signature-V2-Previousis present and the replaced secret is still configured, verify that header with the replaced secret. During the 24 hour rotation window, accept either valid header-and-secret pair. - Only after verification succeeds, process the event by
webhook_type. Useevent_idto make your state update idempotent, including when two deliveries arrive together. Return HTTP 2xx for an event your application has already handled. - Return HTTP 2xx once the event has been safely accepted. Keep verification and idempotent handling within five seconds.
- Send a test from the console and confirm the destination delivery log shows the answer. Resend the event and confirm your endpoint returns HTTP 2xx without applying the same state change again.
The sequence is the documented order: freshness, signature, then processing. Signature verification and rotation come from our webhooks guide. The five second deadline and the retry schedule come from the quick-start instructions.
Expected output
In the destination delivery log, confirm that Didit received HTTP 2xx for your test. Resend the event and confirm that your endpoint returns HTTP 2xx without applying the same state change again.
Debug destinations and failure alerts
Use the list call to audit every destination on the application. It returns a JSON array, never the signing secret. For the list-destinations call, send your Didit API key in x-api-key. The failure-activity endpoint accepts an application API key or an authorized member Bearer token with read:webhooks. Verify incoming webhook signatures with the destination signing secret.
curl -X GET 'https://verification.didit.me/v3/webhook/destinations/' -H 'x-api-key: YOUR_API_KEY'
For this list-destinations call, a 401 means the x-api-key header is missing or malformed. A 403 returns the standard permission envelope. A 429 means you are rate limited; back off and retry.
Each destination carries secret_last4, the last four characters of its secret, so you can tell two secrets apart in a back-office screen. Reading the full secret is a separate call to GET /v3/webhook/destinations/{destination_uuid}/. The list response also includes url, label, enabled, webhook_version, subscribed_events, health_status, failing_streak, failing_since, deliveries_count, failed_deliveries_count, average_response_time_ms, error_rate_percentage and last_delivery_at. The delivery metrics cover the last 30 days, and daily_points has 30 entries, one per UTC day, oldest first.
| Value | Meaning |
|---|---|
failing | Three or more consecutive events failed their first delivery attempt since the destination last answered successfully. failing_streak counts them and failing_since is when the first one failed. |
degraded | Not failing, but an attempt failed in the last 24 hours and no later attempt has delivered that event. A retry or a resend that delivers it clears this. |
healthy | Neither of the above. |
health_status is independent of enabled. Alert on failing rather than on a single failed attempt. These health rules come from our List webhook destinations API documentation.
For a timeline, call GET /v3/organization/{organization_id}/application/{application_id}/webhook/destinations/{destination_uuid}/activity/. It returns recorded failure alerts, newest first, each with id, type of failure_alert, occurred_at and failure_count, paginated with limit and offset. It needs the read:webhooks scope, and an unknown destination returns 404. These are failure alerts, not individual delivery attempts. For individual attempts, use the separate delivery list API in our delivery attempts documentation.
Inputs and outputs
| Name | Direction | How to use it |
|---|---|---|
X-Timestamp | In | Unix epoch seconds when Didit dispatched the event. Reject beyond 300 seconds from now. |
X-Signature-V2 | In | HMAC-SHA256 over the sorted canonical JSON. The header you should verify. |
X-Signature-V2-Previous | In | Same signature made with the replaced secret, sent only for 24 hours after a destination secret rotation. |
X-Signature | In | HMAC over the exact raw bytes. Works only if nothing re-encodes the body. |
X-Signature-Simple | In | Deprecated fallback over the envelope fields. If you rely on it, re-fetch the decision from GET /v3/session/{session_id}/decision/ instead of trusting the payload. |
| Session-event envelope | In | The JSON envelope: event_id, session_id, status, webhook_type, environment, workflow_id, vendor_data, metadata, and a decision object on Approved, Declined, In Review and Abandoned. |
| HTTP 2xx | Out | Accepted. No retry follows. |
| HTTP 400 or above, or no answer | Out | Counts as a failed attempt. Didit retries if either of the two automatic retries remains. |
Entity, investigator and transaction events use their own payload shapes. Do not assume this exact session-event envelope for them.
Retries, the five second deadline and idempotent handling
Your endpoint has five seconds. If it answers HTTP 2xx inside that window, the delivery is done. If it answers HTTP 400 or above, or does not answer at all, we retry twice: the second attempt at about 1 minute, the third at about 4 minutes. After that the delivery is dropped and stays visible in the delivery log, where you can resend it.
Every attempt carries the same event_id, and a resend does too. Use event_id to make your state update idempotent, including when two deliveries arrive together. Return HTTP 2xx for an event your application has already handled. Without an idempotent update, two simultaneous deliveries can both apply a duplicate approval, a duplicate email or a double credit.
Retries do not add to the destination failure streak, and any successful attempt, including a retry or a resend, ends it. A resend re-delivers an event that already happened; it does not run the check again.

event_id to avoid applying the same approval twice when Didit redelivers the event.Failure cases and recovery
| Timing | Value | What it controls |
|---|---|---|
| Response deadline | 5 seconds | Time from delivery to the HTTP 2xx response, including verification and safe acceptance. |
| Freshness window | 300 seconds | How far X-Timestamp may differ from the current time. |
| Retry intervals | About 1 minute and about 4 minutes | When Didit retries after a failed attempt, before the delivery is dropped. |
| Symptom | Likely cause | Recovery |
|---|---|---|
| Every signature fails on a destination that used to work | The signing secret was rotated, or the endpoint reads the secret of another destination | Verify X-Signature-V2 with the current secret and X-Signature-V2-Previous with the replaced secret if it is still configured. During the 24 hour rotation window, accept either valid header-and-secret pair, deploy the new secret inside that overlap, and confirm the current signature verifies before you retire the replaced secret. |
| Signature fails only after a framework upgrade | The body was re-encoded before the HMAC was computed | Verify X-Signature-V2 over the canonical JSON instead of X-Signature over raw bytes. |
| Signature fails with a fresh secret | Hash computed over the raw body text, or keys not sorted | Sort keys at every nesting level and preserve Unicode characters as they arrived. |
| 400 stale timestamp | Clock drift on the receiving server, or a replay of an old capture | Sync the host clock with NTP and reject anything outside 300 seconds. |
| Deliveries time out at 5 seconds | Slow work runs before the 2xx | Keep verification and idempotent handling within five seconds. Return HTTP 2xx once the event has been safely accepted. |
| Same approval processed twice | No idempotent state update, or it is keyed on session instead of event_id | Use event_id to make the state update idempotent, including when two deliveries arrive together. Return HTTP 2xx for an event your application has already handled. |
| A real event was missed while your service was down | The initial attempt and both retries failed | Resend it from the delivery log in the console. The delivery is dropped after those attempts. |
Testing with different data and statuses
Do not wait for a real user to test a branch. Send webhooks from the console with different data and statuses, and watch the delivery log for the answer. The activity.created event type is reserved for the activity timeline and is currently only sent by these test sends, so Try Webhook is the documented source of activity.created events. Keep repeated test sends on a sandbox destination, because side effects depend on your receiver.
Sandbox deliveries carry environment set to sandbox and live deliveries carry live, so one handler can branch on it. Sandbox sessions are never billed. Each sandbox application can create up to 500 sessions per 24 hours, with quota increases available on request for Enterprise. Preloaded example records do not emit webhooks. A test that produces nothing can mean you acted on an example record; use the console test send or a sandbox session you create.
Sandbox test checklist
| Check | What to send | Expected receiver behavior |
|---|---|---|
| Valid delivery | A console test send to the destination | Verify the signature and timestamp, accept the event idempotently, and return HTTP 2xx. |
| Modified payload | The same event with one field changed before it reaches your handler | Signature verification fails. Reject the request and apply no state change. |
| Invalid or stale timestamp | A missing timestamp, a nonnumeric value, or one outside 300 seconds | Reject the request before processing and apply no state change. |
| Manual resend | A resend of an event already handled | Return HTTP 2xx without applying the same state change again. |
What is billable, and what stays a human decision
- The public price list does not publish a standalone webhook-delivery rate. Live verification checks are priced separately, and sandbox sessions are free.
- The
List Webhook DestinationsAPI is documented as pay-per-call. The supplied sources do not give a unit price for that call. - Retries and resends re-deliver an event that already happened and do not run the check again.
- A webhook is a delivery, not the decision itself. A session in
In Reviewneeds a human reviewer, who can act in the Business Console or through the API. If you verified the envelope withX-Signature-Simple, re-fetchGET /v3/session/{session_id}/decision/before you act on the body. - Statuses are exact, case-sensitive strings. Match on
Approved,Declined,In Review,Kyc Expiredand the rest exactly as sent, including the single capital K inKyc Expired.
Worked cost example
Take 12,000 users per month, each completing one full KYC check and one AML screening.
Full KYC bundle $0.33 plus AML screening $0.20 is $0.53 per user. The monthly check-usage subtotal before fees and credits is 12,000 x $0.53 = $6,360.
On Growth, Didit prices are 4% off: $0.53 x 0.96 = $0.5088 per user, so usage is 12,000 x $0.5088 = $6,105.60. For a monthly spend comparison, add the $99 plan fee and subtract the $115 monthly credit from usage: $99 + ($6,105.60 - $115) = $6,089.60.
On Scale, 10% off: $0.53 x 0.90 = $0.477 per user, so usage is 12,000 x $0.477 = $5,724. Monthly spend comparison: $299 + ($5,724 - $350) = $5,673.
These are check-usage subtotals. The Growth and Scale monthly spend totals above include the plan fee and apply the monthly credit, so do not read them as usage alone. No standalone webhook-delivery price is included because the public price feed lists none. Monthly credit does not roll over. See didit.me/pricing for current list prices.

Sources
- Didit docs: Webhooks, real-time events and HMAC signing
- Didit docs: List webhook destinations API
- Didit docs: Webhook destination failure activity API
- Didit docs: Delivery attempts API
- Didit docs: Verification statuses
- Didit docs: Sandbox test data and scenarios
- Didit docs: Three-product integration prompt
- Didit docs: Pricing and billing
- Didit pricing page and pricing.json, read November 26, 2026
- Didit User Verification product page
- Didit MCP server
Next step: create a sandbox application, add a destination, and send your first test webhook from the console. Start at business.didit.me. It takes minutes, and there is no 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
How do I verify a Didit webhook with X-Signature-V2?
Read the raw body, parse the JSON only to rebuild the canonical form with keys sorted at every level and Unicode preserved, then compute HMAC-SHA256 with your current destination signing secret. Compare the result in constant time against X-Signature-V2, and against X-Signature-V2-Previous with the replaced secret when that header is present and the old secret is still configured. Reject the request first if X-Timestamp is missing, malformed, or more than 300 seconds away from now.
What is the difference between X-Signature-V2, X-Signature and X-Signature-Simple?
X-Signature-V2 is an HMAC-SHA256 over the sorted canonical JSON and is the one we recommend. X-Signature is an HMAC over the exact raw bytes, which only works while nothing in your stack re-encodes the payload. X-Signature-Simple is a deprecated fallback that authenticates the envelope only, not the decision body, so if you use it you must re-fetch the decision from GET /v3/session/{session_id}/decision/.
How long does my endpoint have to answer a Didit webhook?
Five seconds. Anything that answers HTTP 2xx inside that window counts as delivered. A response of HTTP 400 or above, a timeout, a refused connection or a blocked address counts as a failed attempt and the delivery enters the retry path.
How many times does Didit retry a webhook and when?
Twice. The second attempt follows at about 1 minute after the first, the third at about 4 minutes, and after that the delivery is dropped. A dropped delivery stays in the destination delivery log, where you can resend it by hand.
Why did I receive the same Didit webhook twice?
Because a retry or a manual resend re-delivers an event that already happened, with the same event_id. Use event_id to make your state update idempotent, including when two deliveries arrive together, and return HTTP 2xx for an event your application has already handled. Without that idempotent update, a slow endpoint can write the same approval twice.
Why does the destinations API return secret_last4 instead of the signing secret?
The list call GET /v3/webhook/destinations/ never returns the signing secret. It returns secret_last4, the last four characters, so you can tell two destinations apart in a back-office view. Read the full secret from GET /v3/webhook/destinations/{destination_uuid}/, which is a deliberate single-destination call.
What happens if I rotate a Didit webhook signing secret?
For 24 hours Didit also sends X-Signature-V2-Previous, the same signature made with the replaced secret. Verify X-Signature-V2 with the current destination secret and X-Signature-V2-Previous with the replaced secret if it is still configured. During the 24 hour rotation window, accept either valid header-and-secret pair. The -Previous headers are not sent for the legacy application-level webhook URL.
How do I test a Didit webhook without a real user?
Use the test send in the Business Console with different data and different statuses, then read the delivery log for the response your endpoint returned. These test sends are the current source of activity.created events. Sandbox deliveries carry environment set to sandbox, and sandbox sessions are never billed.
What does health_status failing mean for a webhook destination?
It means three or more consecutive events failed their first delivery attempt since the destination last answered successfully. failing_streak counts them and failing_since is when the first one failed. Retries do not add to the streak, and any successful attempt, including a retry or a resend, ends it.
Is a Didit webhook a final compliance decision?
No. It is a delivery of a status and, where relevant, the decision object. The deprecated header authenticates only the envelope fields. A session in In Review needs a human reviewer, who can act in the Business Console or through the API. Use a valid X-Signature-V2 signature to verify the payload, then route the exact session status. Keep In Review pending human review.
Does Didit charge for webhook deliveries?
The public price list does not publish a standalone webhook-delivery rate. Live verification checks are priced separately, and sandbox sessions are free. Retries and resends do not run the check again.
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


