Build a webhook reliability layer for Shopify at scale: HMAC verification, dedupe, and reconciliation backfill jobs

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. On every inbound request, extract the raw body before any JSON parsing and compute HMAC-SHA256 using your app's client secret as the key; compare the base64-encoded result to the `X-Shopify-Hmac-SHA256` header value using a constant-time comparison.
  2. Immediately return HTTP 200 to Shopify before processing; Shopify retries deliveries that do not receive a 2xx within its timeout window, which can cause duplicates.
  3. Deduplicate by storing the `X-Shopify-Webhook-Id` header value in a cache or database; skip processing if the ID already exists, and use `X-Shopify-Event-Id` to correlate events from the same merchant action.
  4. Enqueue verified, deduplicated payloads to an internal queue (e.g., SQS, Pub/Sub) for asynchronous processing so your endpoint stays fast.
  5. Implement a reconciliation job that periodically polls Shopify REST/GraphQL APIs for the relevant resource (orders, products, inventory) to fill gaps caused by missed or dropped webhooks.
  6. Monitor webhook delivery health via the `webhookSubscription` query's `endpoint.callbackUrl` and the Partner Dashboard event logs; set up alerts for sustained non-2xx response rates.

Known gotchas

Related routes

Register and verify a Shopify webhook subscription
shopify.com · 4 steps · 100% success
Implement a reliable webhook processing pipeline with verification, deduplication, fast ack, and polling fallback
payments-general · 6 steps · unrated
Subscribe to Lodgify webhooks and verify inbound event payloads using HMAC signature validation
docs.lodgify.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans