Skip to main content

Didit + Supabase Identity Verification: KYC Webhook Guide

No native Supabase connector is documented. Use the Didit session API and a signed webhook. A full ID check costs $0.33.

Didit + Supabase Identity Verification: KYC Webhook Guide

Contents

In this guide

Jump to the part you need.

This guide is for teams that keep users and data in Supabase and need an identity check on top of auth.users. We show how to start a Didit session from an Edge Function, receive the result on a signed webhook, and store the status your app needs. A full ID check costs $0.33. The caveat: our documentation does not list a native Supabase connector, so the connection is our REST API plus a webhook you host.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Didit and Supabase at a glance
ItemDetail
Route from Didit to SupabasePOST /v3/session/ creates the verification, a signed webhook returns the status, and your Edge Function updates the application's stored status
Native Supabase connectorNone listed in our documentation. Our docs cover the REST API, SDKs, webhooks and an MCP server
Price per full ID check$0.33 (ID document $0.15 + passive liveness $0.10 + face match 1:1 $0.05 + device and IP $0.03)
Price per AML screening$0.20
SandboxFree and unlimited on every plan
Webhook signingX-Signature-V2 recommended (HMAC-SHA256 over canonical JSON). X-Signature over the exact received bytes. Previous-signature headers are accepted during secret rotation
Retry policyTwo retries, about 1 and 4 minutes after a failed delivery: a handler slower than 5 seconds, or a 404 or 5xx response

What the integration looks like

  1. Your server or Edge Function calls POST https://verification.didit.me/v3/session/ with a workflow_id and vendor_data set to the Supabase user id. Didit answers with session_id, url and session_token.
  2. You redirect the browser to url. The user completes document capture, liveness and face match on Didit's hosted flow.
  3. Didit posts a status.updated event to your Edge Function endpoint, signed with HMAC-SHA256.
  4. Your function verifies the signature, updates the application's stored status, and the app exposes only the signed-in user's own verification status.

Install route: MCP connector, native listing, or API recipe

MCP connector

Our MCP server is hosted at https://mcp.didit.me/mcp with OAuth sign-in, and it is free on every plan. Setup for each client is on the MCP setup page. For the REST and webhook recipe in this page, point your coding agent at the integration prompt.

Didit with MCP: connecting AI assistants to Didit
MCP setup for AI assistants that work alongside your build.

Native listing

Our documentation does not list a native Supabase connector. To connect the two, call our session API from the server and receive status updates at your webhook endpoint. The documented surfaces are the REST API, SDKs, webhooks and the MCP server.

API recipe

That is the route in this page: create a session over HTTPS, receive the status on a webhook, keep the decision endpoint as a fallback. One prompt that covers the same ground end to end is the integration prompt.

Prerequisites

What you need before the first session
RequirementDetail
Didit planFree is $0 a month. The cost section below lists the fees, monthly credit and discounts for Free, Growth and Scale. Sandbox testing is free and unlimited.
Didit clientAn Application in the Business Console. The key is server-side only, and the sandbox key starts with sk_test_.
Didit permissionsThe key needs read:sessions to read decisions. The webhook destination returns a secret_shared_key that you store as a function secret.
Supabase sideA project with Edge Functions enabled.
NetworkA public HTTPS URL for the webhook. The function must answer in under 5 seconds.

Step by step: connect Didit to Supabase

  1. Create the Application and copy a key. Go to business.didit.me and sign in. Pick the Application from the dropdown at the top, open Developers then API keys in the sidebar, and copy the Primary key or create a new key with only the access your function needs. New keys start with sk_test_ for a sandbox application or sk_live_ for a live one, followed by 43 URL-safe characters. Older keys have no prefix and keep working, so never validate a key by its prefix.

  2. Build the workflow. In the console open Workflows, click New workflow, choose Verifying users and Start from a template, then the KYC template. This API example configures four features: ID verification, passive liveness, face match and AML.

    curl -X POST https://verification.didit.me/v3/workflows/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"workflow_label": "Standard KYC", "workflow_type": "kyc", "features": [{"feature": "OCR"}, {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}}, {"feature": "FACE_MATCH"}, {"feature": "AML"}]}'

    Persist workflow.id. Treat the workflow UUID as server-side configuration. Keep the API key and the webhook signing secret in Edge Function secrets.

  3. Create a session per user. Call it from an Edge Function with vendor_data derived from the authenticated Supabase user, and retain the returned session_id with that user and environment. Replace WORKFLOW_UUID with the workflow UUID before running the command.

    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_UUID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'

    The response contains session_id, url and session_token. Send the browser to url. The optional browser callback returns users to your app; use a verified status event or the decision API to update verification state. If your application has allowed domains set on PATCH /v3/webhook/, an HTTP or HTTPS callback must sit on one of those origins or creation fails with 400. Didit skips a workflow-default callback outside the allowed origins. Custom deep-link schemes are always accepted. See the create session documentation.

    The hosted Didit verification flow a user sees after the redirect
    What your user sees after the redirect. Nothing about the flow runs on your domain.
  4. Set up a Supabase KYC webhook. The URL is your deployed function endpoint:

    curl -X POST https://verification.didit.me/v3/webhook/destinations/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"label": "Supabase", "url": "https://PROJECT_REF.supabase.co/functions/v1/didit-webhook", "subscribed_events": ["status.updated"], "webhook_version": "v3"}'

    Save the returned secret_shared_key as DIDIT_WEBHOOK_SECRET. GET /v3/webhook/destinations/{destination_uuid}/ returns it again if you lose it. This recipe subscribes to status.updated. There is no wildcard, so include every event family you want, and fan out to a second destination if you need another URL. The envelope carries status even when decision is absent, for example Kyc Expired and Resubmitted. See the webhook documentation.

  5. Receive and verify the webhook in an Edge Function. The Edge Function receives the POST body, reads the raw bytes before parsing, and updates the application's stored verification status. The recommended header is X-Signature-V2, an HMAC-SHA256 over Didit's canonical JSON. If you use X-Signature, verify the exact received bytes and do not re-encode them. Reject a missing or invalid X-Timestamp, and reject a timestamp more than 300 seconds from server time. Compare in constant time. When a X-Signature-V2-Previous, X-Signature-Previous or X-Signature-Simple-Previous header is present during secret rotation, check the corresponding previous signature too and accept a match on either. With X-Signature-Simple, retrieve the decision through the API before using it.

    Process a repeated event_id idempotently. Return a timely 2xx after successful handling, and return a failure response if required processing fails. Apply an authenticated status change to the matched session. The envelope carries status even when decision is absent, so do not gate status updates on a decision object. Keep sandbox events out of live access decisions. Retrieve the current decision when reconciling conflicting updates.

    Store the identifiers and status your application needs for access decisions. The documented fields are session_id, vendor_data, status, environment, webhook_type and event_id. Expose only the signed-in user's own verification status. If your organization needs decision details for audit, keep them in restricted server-side storage and apply its retention and deletion policy.

  6. Keep the decision endpoint as a fallback. If a delivery is missed, fetch the decision by session_id and update the application's stored status from that response. Keep webhook delivery identifiers separate.

    curl https://verification.didit.me/v3/session/SESSION_ID/decision/ \
    -H "x-api-key: $DIDIT_API_KEY"

    Branch on session_kind, which is "user" or "business". In V3, feature results use plural array fields such as id_verifications and aml_screenings. A field can be absent or null when its step did not run. Never assume the older singular fields. See the retrieve session documentation.

Map Didit events and fields to Supabase

Field and event mapping
Didit valueComes fromWhat your application tracksNote
event_idwebhook envelopeevent identifierprocess repeated IDs idempotently
session_idwebhook and decisionsession identifier and match keyUUID
vendor_datayou send it on createyour user or business identifierpass auth.users.id; keep the value as text so business ids fit too
statuswebhook and decisioncurrent verification statusexact, case-sensitive strings; present even when decision is absent
webhook_typewebhookevent typestatus.updated for this recipe
environmentwebhooklive or sandboxkeep sandbox events out of live access decisions
decision.id_verifications[]decision objectaudit details if neededarray, even with one item
decision.liveness_checks[], face_matches[]decision objectaudit details if neededabsent or null when the step did not run
decision.aml_screenings[]decision objectaudit details if neededAML screening results, when the AML step ran
decision_trace.statusdecision objectdecision statusthe status the decision trace records
decision_trace.decided_bydecision objectwho decidedautomatic, manual or investigator
sandbox_scenariowebhook envelopesandbox test labelScenario slug on armed sandbox sessions. Null on unarmed sandbox sessions and live sessions.

The API defines ten exact status values: "Not Started", "In Progress", "Approved", "Declined", "In Review", "Awaiting User", "Resubmitted", "Expired", "Abandoned" and "Kyc Expired". Awaiting User is KYB only. For KYC, "Approved" means all checks passed and you can grant access, "In Review" means a reviewer must decide, "Declined" means one or more checks failed, and "Kyc Expired" means a previously approved document passed its expiry date, so do not keep treating the old approval as current. Use strict string comparison in your function and in row level security policies. The Kyc Expired value takes a single capital K. See the verification status documentation.

A verification session in the Didit Business Console with its status and warnings
The same session and the same status strings you will see in your application.
ID document results inside a Didit session detail
What lands in id_verifications[] on the decision object.

Test with sandbox data

Sandbox applications mock every check, so nothing is billed and no real document is needed. Add sandbox_scenario when you create the session, with a slug from GET /v1/sandbox/scenarios/, and Didit expands that scenario's bundled values onto the session. The field is rejected with 400 on live applications. You can also arm a scenario afterwards with POST /v3/session/{session_id}/sandbox/arm/ while the session is still Not Started.

Choose approval and decline scenarios from the documented sandbox catalog. Verify the sandbox environment and the expected status in the webhook and in the decision response. Confirm that processing the same event twice leaves application state unchanged. To confirm one run end to end, match the session_id from creation, the webhook and the decision lookup.

Error cases and fixes
SymptomCauseFix
401 from verification.didit.mekey wrong, malformed, revoked or expiredre-fetch it through the recover-key flow or use a key that has not expired
403 with "You do not have permission to perform this action."missing x-api-key, a scoped key without this resource, or a call from outside the key's IP listuse a key with that access, under Developers then API keys
400 on workflow_idinvalid workflow IDcopy the UUID of the workflow for the application you are using from the console
400 on callbackan explicit HTTP or HTTPS callback outside the application's allowed domainsadd the origin, use an allowed origin, or use a custom deep-link scheme. Didit skips a workflow-default callback outside the allowed origins
404 on the decision routesession does not exist or belongs to another applicationcheck the key and the session_id
Signature check failsbody parsed before verification, missing or invalid timestamp, or timestamp more than 300 seconds from server timeRead the raw body first. For X-Signature-V2, compute the HMAC over sorted, Unicode-preserved canonical JSON. For X-Signature, use the exact received bytes. Validate X-Timestamp and compare signatures in constant time. During rotation, check the current signature with the current secret and the corresponding previous signature with the replaced secret
Failed deliveryhandler slower than 5 seconds, or it answered 404 or 5xxDidit retries twice, about 1 and 4 minutes, then drops the delivery; resend from the destination's delivery log
429rate limitread the wait field in the response and back off

Disconnect

To disconnect, stop delivery to the webhook endpoint, revoke the Didit integration key, remove the stored API key and webhook secret from your Edge Function secrets, and retire the handler. Set retention and deletion for any stored decision details according to your policy. Do not keep full decision payloads unless your organization needs them for audit, and keep those in restricted server-side storage.

Didit charges for a Supabase build

Didit charges for a Supabase build
ItemPriceUnit
Full ID check (KYC)$0.33check
ID document only$0.15check
Passive liveness$0.10check
Face match 1:1$0.05check
Device and IP analysis$0.03check
AML screening$0.20check
Ongoing AML monitoring$0.07user per year
Business verification (KYB)From $2.00company
Workflow Orchestrator, Reusable KYC, SDKs, MCP serverFreeincluded
SandboxFreeunlimited

Plans: Free is $0.00 a month. The Free plan gives $10.00 in monthly credit to the first organization created with an eligible work email for a company domain. The credit excludes phone verification codes. Growth is $99.00 a month with $115.00 of credit and 4% off eligible Didit charges. Scale is $299.00 a month with $350.00 of credit and 10% off eligible Didit charges. Monthly credit does not roll over, top-ups last 12 months, and usage is paid from the month's credit first. Carrier and Meta charges pass through at cost.

This page quotes Didit charges only. Check Supabase's own pricing for its side of the connection.

Worked example: Didit charges for 1,000 new signups a month

The example assumes 1,000 completed full ID checks at $0.33 each, which includes Device and IP Analysis, and 1,000 completed AML screenings at $0.20 each.

  • Per user: $0.33 + $0.20 = $0.53.
  • Monthly list price: 1,000 x $0.53 = $530.00.
  • On Free, an eligible organization applies its $10.00 monthly credit to $530.00 of usage. The remaining $530.00 - $10.00 = $520.00 comes from top-ups.
  • On Growth, each eligible Didit charge drops 4%: $0.53 x 0.96 = $0.5088, so 1,000 x $0.5088 = $508.80. The $115.00 of included credit covers part of it, leaving $508.80 - $115.00 = $393.80 from top-ups. Total outlay $99.00 + $393.80 = $492.80.
  • Ongoing AML monitoring for this one cohort of 1,000 people: 1,000 x $0.07 = $70.00 a year at list price.

Sources

Next step: open the Didit Business Console, create an application, and run a sandbox session against your Edge Function today. Sandbox testing is free and there is no sales call in the path.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

Does Didit have a native Supabase integration?

Our documentation does not list a native Supabase connector. To connect the two, call our session API from the server and receive status updates at your webhook endpoint. The integration in this page is the documented API plus a webhook you host in an Edge Function.

How do I get Didit KYC results into Supabase?

Create a session with vendor_data set to the Supabase user id, then receive the status.updated webhook in an Edge Function and update the application's stored status keyed on session_id. If a delivery is missed, fetch the decision by session_id and update the application's stored status from that response. Keep webhook delivery identifiers separate.

Is there a Supabase KYC webhook example I can copy?

This guide uses the signing procedure in our webhook docs. Use X-Signature-V2 over canonical JSON when you can, verify X-Timestamp within 300 seconds, compare in constant time, and check the previous-signature header during rotation. For X-Signature use the exact received bytes; with X-Signature-Simple, fetch the decision through the API before using it.

Do I need a server to receive the Didit webhook in Supabase?

An Edge Function is the server. It must be reachable over public HTTPS, must not require a Supabase JWT, and must answer within 5 seconds. Didit retries twice when the handler takes more than five seconds or answers 404 or 5xx.

Which Didit status strings should I store in Postgres?

The API defines ten exact status values: "Not Started", "In Progress", "Approved", "Declined", "In Review", "Awaiting User", "Resubmitted", "Expired", "Abandoned" and "Kyc Expired". Awaiting User is KYB only. For KYC, Approved means grant access, In Review means a reviewer must decide, Declined means one or more checks failed, and Kyc Expired means a previously approved document passed its expiry date. Use strict string comparison and never lowercase them for storage.

Should I trust the webhook payload or re-fetch the decision?

Check timestamp freshness first: reject a webhook whose X-Timestamp is more than 300 seconds from server time. Verify a full-payload signature, then match the event to the stored session_id and environment before you update access. For Kyc Expired and Resubmitted, decision is absent but status is present, so apply the status to the matched session. If only X-Signature-Simple verifies, fetch the decision from the API before applying it.

Can I put the Didit API key in the browser or in Supabase tables?

No. The key is a server-side secret and the primary key holds full access on behalf of the application. Keep it in Edge Function secrets, never in a client bundle, a public repository or a table the browser can read through row level security.

How much does a Didit KYC check cost with Supabase?

$0.33 per completed full ID check, or $0.53 with AML screening added. The sandbox is free and unlimited. The Free plan gives $10.00 in monthly credit to the first organization created with an eligible work email for a company domain, and the credit excludes phone verification codes. This page quotes Didit charges only; check Supabase's pricing for its side.

Can I test the whole thing without paying Didit?

Yes. Sandbox applications mock every check, accept sandbox_scenario slugs, and return webhooks with environment set to sandbox. You can exercise approved and declined paths from the documented sandbox catalog. To go live, use the live key, select the live application's workflow ID, and configure its webhook destination and signing secret.

Can an AI assistant write this Supabase connection for me?

Yes. Use the Didit MCP server for assistant access, and the integration prompt for the REST and webhook recipe. See the MCP setup page and the integration prompt, then check the webhook signature code against our webhook documentation before you ship.

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.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.