Webhooks
Subscribe HTTPS endpoints to shop events. Signing secrets are shown once at creation. Manage endpoints in Admin → Settings → General → API credentials (Webhooks tab).
Events
order.created, order.updated, order.paid, order.cancelled, order.refunded, product.created, product.updated, product.deleted, customer.created, customer.updated.
Example delivery
Each delivery is a POST with JSON body and signature header.
POST /your-webhook-endpoint HTTP/1.1
Host: example.com
Content-Type: application/json
X-Webhook-Event: order.created
X-Webhook-Idempotency-Key: wh_ep_…:order.created:a1b2c3d4
X-Webhook-Signature: sha256=3f1a…{
"event": "order.created",
"shopId": "shop_01HXYZ...",
"data": {
"id": "ord_01HXYZ...",
"orderNumber": "10042",
"total": 49.99,
"currency": "GBP",
"status": "CONFIRMED"
},
"ts": 1728388800000
}Verify signatures
Compute HMAC-SHA256 of the raw JSON body ({ event, shopId, data, ts }) with your endpoint secret and compare to X-Webhook-Signature (sha256=<hex>). Use X-Webhook-Idempotency-Key to dedupe retries.
import crypto from "node:crypto";
function verifyRetailLinkWebhook(rawBody, signatureHeader, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(rawBody)
.digest("hex");
const provided = String(signatureHeader || "")
.replace(/^sha256=/, "");
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(provided)
);
}
// Headers:
// X-Webhook-Signature: sha256=<hex>
// X-Webhook-Event: order.created
// X-Webhook-Idempotency-Key: <opaque>
// Sign the exact raw POST body ({ event, shopId, data, ts }).Delivery
Deliveries are queued and sent asynchronously. Your endpoint should respond quickly with 2xx; treat duplicate deliveries as idempotent using X-Webhook-Idempotency-Key.
Admin