Skip to main content

Technical

Shopify Verification Results in Your Own Backend: Webhooks + API

Didit sends a signed status.updated webhook with the full decision object, matching GET /v3/session/{id}/decision/. Expired and Kyc Expired carry status only, so pull the decision.

Shopify Verification Results in Your Own Backend: Webhooks + API

Contents

In this guide

Jump to the part you need.

This guide is for merchants and developers who installed Didit Verify on Shopify and now want the verification result inside their own backend, not only in the app's Verifications tab. Didit bills per completed check, $0.33 for a full KYC, and the sandbox is free. The caveat to plan for: Expired and Kyc Expired events carry a status change only, so you pull the decision with the API.

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

How Didit Shopify verification results reach your backend
QuestionAnswer
Where the session is createdServer-side by the Shopify app, using your Didit API key. The key stays inside the embedded app and is never exposed to the storefront.
Default result surfaceThe Verifications tab inside Shopify admin. Shopify's app requirement 5.1.5 asks that data collected in a Shopify flow be readable in the Shopify admin or app context.
Delivery to your backendA signed status.updated webhook, plus the decision API on demand.
Events to subscribestatus.updated and data.updated. There is no wildcard, so subscribe to each family you want.
Decision payloadFull decision object, same schema as GET /v3/session/{id}/decision/, for Approved, Declined, In Review and Abandoned.
Payload gapsExpired and Kyc Expired deliver a status change only, with no decision object.
API pullGET https://verification.didit.me/v3/session/<SESSION_ID>/decision/ with an x-api-key header holding the read:sessions privilege.
SignatureHMAC-SHA256. X-Signature-V2 is the recommended header, and X-Timestamp must be within 300 seconds of now.
Where you configure itDidit Business Console, then API & Webhooks, then Webhooks.
Price$0.33 per full KYC check at list price, $10 of monthly credit on Free, unlimited free sandbox.

Start free in the sandbox at business.didit.me, no sales call. The documented setup for the app itself is in the Didit Shopify KYC App docs, and developers who want to drive the build from an assistant start at didit.me/developers/mcp. Current list prices are on didit.me/pricing.

What the Shopify app handles, and what it leaves to you

The Didit Verify app installs a theme block you place on any page: account, checkout, or a custom landing page. The app creates the verification session server-side with your API key, so the storefront never touches the key. The customer completes the flow in that block, modal or embedded.

Out of the box, every session collected through your store appears under Apps, then Didit Verify, then Verifications in your Shopify admin: status, customer, country, timestamp, and the session detail with decision overview, identity fields, individual checks and warnings. That tab is the documented no-backend result surface. You do not need a login to the Didit Business Console to read data that came through Shopify.

You need the webhook and API route when the verification result has to change something in your own systems, for example releasing an order, tagging a customer record, or writing the decision into a database you already query. The Business Console stays a setup surface: API keys, workflows, webhook destinations.

Prerequisites

What you need before the webhook setup starts
RequirementDetail
Shopify storeAny plan. The app requests one permission scope, read_customers, used for prefill and cross-check only when customer-approved prefill is enabled.
Didit Console accountAn account at business.didit.me with at least one workflow.
API keyFound under API & Webhooks in the Console. For the decision API the key must hold the read:sessions privilege.
Workflow IDA UUID from the Workflows page, pasted into the app settings.
HTTPS endpointA public URL that accepts POST and can read the raw request body before any JSON parsing.
Destination secretThe secret_shared_key shown for the webhook destination. Store it as a secret, not in the repo.
EnvironmentSandbox for the build, live when you are ready. The webhook envelope carries an environment field so one receiver can serve both.

Step by step, from install to a result in your backend

  1. Install the app. Open the install link at https://admin.shopify.com/oauth/install?client_id=cafa0d15227fb59bd47470b23eae7469. Select your store if you run more than one. Click Install.

  2. Connect your Didit credentials. In the Didit Console, go to API & Webhooks and copy your API key. In Shopify, open the Didit Verify app, then Settings, and paste the key into the Didit API Key field. Back in the Console, open Workflows, select the workflow you want, and copy its Workflow ID (a UUID). Paste it into the Didit Workflow ID field. Choose a period under Data retention. The period applies to existing and future store verifications. Click Save Settings and confirm the success message.

    The Didit Business Console page where the API key is copied
    Where the API key sits in the Didit Business Console, under API & Webhooks.
    The Workflow ID shown on the Workflows page in the Didit Business Console
    Where the Workflow ID sits on the Workflows page in the Didit Business Console.
  3. Place the verify button. In Shopify admin go to Online Store, then Themes, and click Customize on your active theme. Navigate to the page that should host the button. Click Add section or Add block, open the Apps tab, and select Didit Verify. Drag the block to position it.

  4. Create the webhook destination. In the Didit Console go to API & Webhooks, then Webhooks. Create a destination with your HTTPS URL. Subscribe to status.updated and to data.updated. Copy the secret_shared_key for that destination and store it where your receiver can read it. You can create more than one destination to fan out to different URLs.

  5. Verify the signature on every delivery. Read the raw body first, never parse JSON before verification. Reject anything where X-Timestamp is more than 300 seconds from now. Recompute HMAC-SHA256 with the destination secret and compare in constant time against X-Signature-V2 and, when present, X-Signature-V2-Previous. Accept a match on either so a rotated secret keeps working through your deploy. Return 2xx quickly and apply the event once, keyed on event_id.

  6. Branch on the status, then decide whether you already have the decision. Approved, Declined, In Review and Abandoned arrive with the full decision object in decision. Expired and Kyc Expired arrive as a status change only, so call the decision API when you need the record.

  7. Test in sandbox, then flip the key. Build the receiver against a sandbox session, confirm the signature check passes and the decision lands in your store, then point the Shopify app and the destination at your live application.

Event and field mapping

Session webhook envelope fields you will read most
FieldWhat it gives youWhat to do with it
event_idUUID for this deliveryDedupe key. Deliveries can repeat, so apply the event once.
session_idThe verification session UUIDThe identifier you pass to the decision API.
statusExact, case-sensitive stringCompare with strict equality. Kyc Expired uses one capital K.
webhook_typestatus.updated or data.updatedRoute data edits separately from status changes.
timestamp, created_atUnix epoch secondsFreshness check alongside X-Timestamp.
application_id, environmentWhich application, live or sandboxReject events from an application you did not expect.
sandbox_scenarioArmed scenario slug, or nullNull on live sessions and on unarmed sandbox sessions.
workflow_id, workflow_versionWhich workflow produced the sessionUseful when several workflows feed one endpoint.
vendor_data, metadataYour own identifiers and JSONThe join key back to your customer or order record.
decisionThe full decision object, or absentPresent only for Approved, Declined, In Review and Abandoned.
Status values and whether the webhook carries the decision
StatusDecision in payloadTypical backend action
ApprovedYesGrant access or release the order, store the decision and its warnings.
DeclinedYesNotify the customer. A reviewer can move it to Resubmitted if the cause is fixable.
In ReviewYesHold. A reviewer approves, declines or requests resubmission in the Console.
AbandonedYesThe customer started and did not finish in time. Send a new invitation if you want one.
ExpiredNoThe link timed out before the customer opened it. Create a new session if you still want the verification.
Kyc ExpiredNoThe approved document passed its expiry date. Ask for a fresh verification.
In Progress, Not Started, Resubmitted, Awaiting UserNo. Under the documented envelope contract the decision field is absent for these statuses, so treat the delivery as a state change only.Update your own status field and wait for the terminal event.

status.updated versus data.updated

These are two different deliveries and they answer different questions. status.updated fires when a session status changes, and on Approved, Declined, In Review and Abandoned the documented session envelope attaches the full decision object to it. data.updated fires when the verification data on a session was edited. It is not a status change, and when a decision is present the data.updated payload uses the same decision envelope shape as status.updated. When your backend needs the latest authoritative record after an edit, read it from GET /v3/session/{id}/decision/. Subscribe to both when your downstream systems need edits as well as decisions; there is no wildcard, so each family is listed explicitly on the destination.

What the decision object contains

The decision mirrors the decision API response, and it uses plural arrays so a workflow can run the same feature more than once. On a Shopify session session_kind is user, so you read id_verifications[], nfc_verifications[], liveness_checks[], face_matches[], aml_screenings[], poa_verifications[], phone_verifications[], email_verifications[], ip_analyses[], database_validations[], questionnaire_responses[] and signatures[]. The top level also carries status, session_number, vendor_data, metadata, created_at, expires_at, status_override and decision_trace, which records how the status was reached and whether a person or automation decided it.

Every warning object inside a feature array has feature, risk, log_type, short_description, long_description and node_id. Media fields such as portrait_image and document_file are presigned URLs with a limited validity window, so download them promptly instead of storing the URL.

Pulling the decision with the API

One endpoint serves both session kinds, so you do not need to know in advance whether a session came from a KYC or KYB workflow. The call needs the x-api-key header and a key with read:sessions.

curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
  -H "x-api-key: <API_KEY>"

Always branch on session_kind before you read feature arrays, because KYC and KYB sessions expose different objects.

const decision = await (await fetch(url, { headers: { "x-api-key": API_KEY } })).json();
switch (decision.session_kind) {
  case "user": return handleUserDecision(decision);
  case "business": return handleBusinessDecision(decision);
}

Call it after a webhook that has no decision, and any time you suspect your copy has drifted from ours. The status enum is the single source of truth for both the API response and every webhook, so the same switch handles both.

Signature verification in practice

Signing headers Didit sends
HeaderWhat it signsWhen to use it
X-Signature-V2HMAC-SHA256 over the sorted, Unicode-preserved canonical JSONDefault choice.
X-SignatureHMAC-SHA256 over the exact raw bytesOnly if your stack never re-encodes the body.
X-Signature-SimpleHMAC-SHA256 over timestamp, session id, status and webhook typeDeprecated fallback. It authenticates the envelope, not the decision body, so re-fetch the decision if you rely on it.
X-TimestampUnix epoch seconds at dispatchReject anything more than 300 seconds off.
X-Signature-V2-PreviousSame signature made with the replaced secretSent for 24 hours after a secret rotation. Accept a match on either header.
const raw = await readRawBody(req);
const ts = Number(req.headers["x-timestamp"]);
if (Math.abs(Date.now() / 1000 - ts) > 300) return res.status(400).end();
// Pseudocode: canonicalize builds the sorted, Unicode-preserved canonical JSON of raw, as the webhook docs describe
const canonical = canonicalize(raw); // your implementation of the documented canonicalization
const expected = crypto.createHmac("sha256", SECRET_SHARED_KEY).update(canonical).digest("hex");
// constant-time compare with X-Signature-V2, and with X-Signature-V2-Previous when present

Return a 2xx as fast as you can and do the work after that. Deliveries are retried on failure and can repeat, so apply writes once per event_id.

Test with sandbox data

The sandbox is free and unlimited on every plan, including Free. Create a sandbox session through POST https://verification.didit.me/v3/session/ and pass a sandbox_scenario slug from the sandbox catalog at GET /v1/sandbox/scenarios/. The scenario expands its bundled values so the session reproduces a known outcome. You can also arm or re-arm a scenario after create, while the session is still Not Started, with POST /v3/session/{session_id}/sandbox/arm/. Sandbox sessions carry environment: sandbox and put the armed slug in sandbox_scenario, which is null on live sessions.

Expected success looks like this: your endpoint reads the raw body, the freshness check passes, the HMAC matches X-Signature-V2, the handler logs status.updated with a decision present, and a repeated delivery with the same event_id writes nothing twice.

Error cases and fixes
SymptomCauseFix
Signature never matchesJSON parsed and re-encoded before verificationRead the raw bytes first, verify second, parse third.
Signature matches for a day, then failsDestination secret rotatedAlso compare against X-Signature-V2-Previous, then deploy the new secret.
Every delivery rejected as staleServer clock driftSync clocks. The window is 300 seconds.
Decision API returns 401Invalid API keyRe-copy the key from API & Webhooks in the Console.
Decision API returns 403Key lacks read:sessionsIssue a key with that privilege.
Decision API returns 404Session does not exist, or belongs to a different applicationCheck the application_id on the event against the key you are using.
No decision key in the payloadExpired or Kyc Expired, or a non-terminal transitionExpected. Call the decision API when you need the record.
Webhook arrives but the handler finds no customervendor_data not set on createSend a stable vendor_data at session creation and treat it as the join key.

Disconnect and data retention

Removing the Didit Verify block from a theme page stops new buttons appearing on that page. Uninstalling the app from your Shopify admin removes the block for the store. To stop deliveries to your backend, delete the webhook destination in the Didit Console under API & Webhooks, then Webhooks. Keep the data retention period in mind while you test: the setting you chose in the app applies to existing and future store verifications, not only to new ones.

Cost of both ends

On the Didit side you pay per completed check at published list prices, taken from prepaid credit. The published module price list has no webhook line item: what you pay is the checks inside the workflow.

Published Didit list prices most Shopify workflows use
ModuleList price (USD)Unit
Full KYC check (ID document, passive liveness, face match 1:1, device and IP)$0.33check
ID Verification alone$0.15check
Passive Liveness$0.10check
Face Match 1:1$0.05check
Device and IP Analysis$0.03check
AML Screening$0.20check
Proof of Address$0.20check
Age Estimation$0.10check
Email Verification$0.02check
NFC reading add-on$0.15check

Plans: Free at $0.00 with $10.00 of monthly credit for eligible organizations, Growth at $99.00 a month with $115.00 of credit and 4% off every Didit price, Scale at $299.00 a month with $350.00 of credit and 10% off every Didit price, Enterprise from $15,000 a year on an annual contract. Monthly credit does not roll over. Full terms are on didit.me/pricing.

On the Shopify side, your store subscription is billed by Shopify, so check Shopify for any subscription charges that apply to your store. The Didit prices above are the numbers I can give you for the verification side. Your own webhook endpoint runs on infrastructure you already pay for.

Worked example: 5,000 verifications in a month

Workflow: ID document, passive liveness, face match, device and IP, plus AML screening. That is the $0.33 full KYC plus $0.20 AML, so $0.53 per completed check.

On Free, at list price: 5,000 x $0.53 = $2,650.00 of usage in the month.

On Scale, with 10% off every Didit price: $0.53 x 0.90 = $0.477 per check, and 5,000 x $0.477 = $2,385.00 of usage. Billing uses the month's plan credit first, then top-ups, so the $350.00 of Scale credit is consumed before any top-up: 5,000 x $0.477 = $2,385.00, minus $350.00 of plan credit = $2,035.00 of top-up. The plan fee adds $299.00. Total cash for the month: $2,035.00 + $299.00 = $2,334.00.

Difference against the list-price run: $2,650.00 - $2,334.00 = $316.00 in the month. The arithmetic assumes every session completes; sessions that never start or expire before a check runs are not completed checks.

Using an AI assistant for the build

Didit provides an MCP server at https://mcp.didit.me/mcp with OAuth sign-in, and the MCP server is free on every plan. Setup for each client is documented on the Didit MCP page. Creating the webhook destination is done in the Didit Console under API & Webhooks, and the signed delivery plus the decision API remain the documented path for getting results into your backend.

Sources

Next step: open the sandbox at business.didit.me, install the app on a development store, and send your first signed webhook to a throwaway endpoint. No sales call, and the sandbox checks are free.

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

How do I get Shopify identity verification results into my own backend?

Install the Didit Verify app on Shopify, connect your Didit API key and workflow ID in the app settings, then create an HTTPS webhook destination in the Didit Console under API & Webhooks, then Webhooks, subscribing to status.updated and data.updated. Your endpoint verifies the HMAC-SHA256 signature and reads the decision object from the payload. When the payload has no decision, call GET /v3/session/{id}/decision/.

What does the Didit status.updated webhook contain for an Approved session?

The envelope fields, including event_id, session_id, status, webhook_type, vendor_data and metadata, plus a decision object with the same schema as the decision API response. For a Shopify session that object is a user session, so per-feature data arrives in plural arrays such as id_verifications[] and liveness_checks[].

What is the difference between status.updated and data.updated?

status.updated fires when a session status changes, and it is the delivery that attaches the full decision object for Approved, Declined, In Review and Abandoned. data.updated fires when the verification data on a session was edited, so it is not a status change. If you need the current decision after a data edit, read it from GET /v3/session/{id}/decision/.

Do Expired and Kyc Expired webhooks include the decision object?

No. Approved, Declined, In Review and Abandoned deliver the full decision object. Expired and Kyc Expired deliver a status change only. If your process needs the record for those two, call the decision API with the session_id from the event.

How do I verify that a Didit webhook really came from Didit?

Read the raw request body without parsing it, check that X-Timestamp is within 300 seconds of now, then recompute HMAC-SHA256 with the destination secret_shared_key over the sorted, Unicode-preserved canonical JSON described in the webhook docs. Compare in constant time against X-Signature-V2 and, when present, X-Signature-V2-Previous. Accept a match on either header so a rotated secret keeps working while you deploy.

Which webhook events should a Shopify merchant subscribe to?

Subscribe to status.updated for session status changes and data.updated for edits to verification data. Didit has no wildcard subscription, so you must list each event family you want, and you can create more than one destination to fan out to different URLs.

Why does the decision API return 403 or 404?

A 403 means the API key does not hold the read:sessions privilege. A 404 means the session does not exist or belongs to a different application, so compare the application_id in the webhook envelope against the key you are calling with. An invalid key returns 401.

How much does one Shopify verification cost?

A full KYC check is $0.33 at list price: ID document $0.15, passive liveness $0.10, face match 1:1 $0.05, device and IP analysis $0.03. Adding AML screening takes it to $0.53. Plans add monthly credit and a discount on Didit prices: 4% on Growth, 10% on Scale. Any Shopify subscription charge is billed by Shopify, separately from the Didit prices.

Can I test the webhook without charging real checks?

Yes. The sandbox is free and unlimited on every plan. Create a sandbox session with a sandbox_scenario slug from GET /v1/sandbox/scenarios/ to reproduce a known outcome, and the envelope will carry environment: sandbox with the armed slug in sandbox_scenario.

Do I still see results in Shopify admin if I use my own backend?

Yes. The Verifications tab, opened from Apps, then Didit Verify in your Shopify admin, keeps working, and it is the surface that satisfies Shopify's data-access requirement for data collected in a Shopify flow. The webhook and API route gives your backend a copy; it does not replace the tab.

How do I stop the webhooks later?

Delete the destination in the Didit Console under API & Webhooks, then Webhooks. Remove the Didit Verify block from your theme, or uninstall the app from Shopify admin, to stop new verifications being collected through your storefront.

Can an AI assistant help me build this over MCP?

Didit provides an MCP server at https://mcp.didit.me/mcp with OAuth sign-in, free on every plan, and the setup for each client is documented at didit.me/developers/mcp. The webhook destination itself is created in the Console under API & Webhooks. The signed delivery plus the decision API remain the documented path for getting results into your backend.

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.