Prompt

receive shopify webhook event

Technology / API Platforms2 observationsLast seen Oct 16, 2026

Latest observation

Oct 16, 2026OpenAI APIWeb search: off

To receive a Shopify webhook event, you need:

  1. An HTTPS endpoint in your app/server
  2. A webhook subscription in Shopify pointing to that endpoint
  3. Verification of Shopify’s HMAC signature when the request arrives

Example flow

1) Create an endpoint

Your app should expose something like:

POST /webhooks/orders/create

Shopify will send the webhook as a POST with JSON body.


2) Verify the webhook

Shopify includes an X-Shopify-Hmac-Sha256 header.
You must compute the HMAC of the raw request body using your app’s Shopify API secret and compare it.


3) Respond quickly

Return 200 OK as soon as possible.
If Shopify doesn’t get a fast 2xx response, it may retry.


Example in Node.js / Express

import express from "express";
import crypto from "crypto";

const app = express();

// IMPORTANT: use raw body for webhook verification
app.post("/webhooks/orders-create", express.raw({ type: "application/json" }), (req, res) => {
  const hmacHeader = req.get("X-Shopify-Hmac-Sha256");
  const secret = process.env.SHOPIFY_API_SECRET;

  const generatedHmac = crypto
    .createHmac("sha256", secret)
    .update(req.body, "utf8")
    .digest("base64");

  if (generatedHmac !== hmacHeader) {
    return res.status(401).send("Unauthorized");
  }

  const payload = JSON.parse(req.body.toString("utf8"));
  console.log("Webhook received:", payload);

  return res.status(200).send("OK");
});

app.listen(3000, () => console.log("Listening on port 3000"));

Register the webhook in Shopify

REST Admin API example

POST /admin/api/2024-07/webhooks.json
{
  "webhook": {
    "topic": "orders/create",
    "address": "https://your-domain.com/webhooks/orders-create",
    "format": "json"
  }
}

GraphQL example

Use the webhookSubscriptionCreate mutation.


Required headers Shopify sends

  • X-Shopify-Topic
  • X-Shopify-Shop-Domain
  • X-Shopify-Hmac-Sha256
  • X-Shopify-Webhook-Id
  • X-Shopify-Api-Version

Important notes

  • Your endpoint must be publicly reachable over HTTPS
  • Use the raw body for HMAC validation
  • Don’t parse JSON before verification
  • Make webhook handling idempotent because retries can happen

If you want, I can also give you:

  • a Python Flask example
  • a Node.js with NestJS example
  • a Shopify App Remix example
  • a test webhook receiver you can run locally

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.