Webhooks
BetaWe tell your server the moment something happens in a store: an order paid, a product changed, your app removed.
This is in private beta, for approved developers. It works today, and small details may still change.
What we send
A POST with a JSON body to your webhooks.url, for each event in webhooks.events in your app file, with these headers:
| Header | What it is |
|---|---|
X-QC-Event | The event, such as order.paid. |
X-QC-Delivery | A unique id for this delivery. A retry or a resend keeps the same id. |
X-QC-Store | The store’s slug. |
X-QC-Signature | A hex HMAC-SHA256 of the raw body, made with your app’s webhook secret. |
{
"id": "6f0d3c1e-8a4b-4f63-9b1e-2c7d5a0e9f12",
"event": "order.paid",
"created_at": "2026-11-28T09:15:00+01:00",
"store": { "slug": "ivie-studio", "name": "Ivie Studio" },
"test": false,
"data": {
"id": 9001,
"number": "QC-IV-000123",
"status": "paid",
"total": 1750000,
"…": "the same order fields as GET /orders/{id}"
}
}test is true for a test send from your dashboard, which uses made-up data and the store test-store.
Events
| Event | When | Needs | data |
|---|---|---|---|
order.created | An order is placed. | read_orders | The order. |
order.paid | An order is paid. | read_orders | The order. |
order.fulfilled | An order is first marked shipped or delivered. | read_orders | The order. |
order.cancelled | An order is cancelled. | read_orders | The order. |
product.created | A product is added. | read_products | The product. |
product.updated | A product’s name, text, price, status, categories or stock counting changes, or an option’s price. | read_products | The product. |
product.deleted | A product is deleted. | read_products | { "id", "slug" } |
customer.created | Someone new joins the store’s customer list. | read_customers | The customer. |
app.uninstalled | The merchant removed your app, or we did. | Nothing | { "app", "removed_at" } |
The order, product and customer in data have exactly the fields the Admin API returns for them.
Answering
- Answer with a 2xx within 10 seconds. Do the slow work afterwards.
- If you don’t, we try again up to 8 times over about 24 hours: after 1, 5, 15 and 30 minutes, then 1, 3, 6 and 12 hours.
- A retry carries the same
X-QC-Delivery, so ignore ids you’ve already handled. - Don’t rely on events arriving in order.
- Your dashboard shows every delivery: what we sent, what you answered, and how long it took. You can resend any of them, and send a test event.
Checking the signature
Every request is signed, so you know it came from us. Make your own HMAC-SHA256 of the raw body, exactly as it arrived and before you parse it, using your webhook secret. Compare it with X-QC-Signature in constant time. If they differ, answer 401 and do nothing else. Review checks this: we send one correctly signed test and one wrongly signed one.
// Node 18+, no packages needed.
const http = require("node:http");
const crypto = require("node:crypto");
const SECRET = process.env.QC_WEBHOOK_SECRET;
const seen = new Set(); // use your database in a real app
function validSignature(rawBody, signature, secret) {
const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const given = Buffer.from(String(signature || ""), "utf8");
const wanted = Buffer.from(expected, "utf8");
return given.length === wanted.length && crypto.timingSafeEqual(given, wanted);
}
http.createServer((req, res) => {
if (req.method !== "POST" || req.url !== "/qc/webhooks") {
res.writeHead(404).end();
return;
}
const chunks = [];
req.on("data", (chunk) => chunks.push(chunk));
req.on("end", () => {
// Sign-check the exact bytes we sent, before parsing them.
const raw = Buffer.concat(chunks);
if (!validSignature(raw, req.headers["x-qc-signature"], SECRET)) {
res.writeHead(401).end();
return;
}
res.writeHead(200).end(); // answer first, then do the slow work
const delivery = req.headers["x-qc-delivery"];
if (seen.has(delivery)) return; // a repeat
seen.add(delivery);
const event = req.headers["x-qc-event"];
const body = JSON.parse(raw.toString("utf8"));
console.log(event, req.headers["x-qc-store"], body);
});
}).listen(3000);<?php
// qc-webhooks.php
$secret = getenv('QC_WEBHOOK_SECRET');
$raw = file_get_contents('php://input');
$given = $_SERVER['HTTP_X_QC_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $raw, $secret);
if (! hash_equals($expected, $given)) {
http_response_code(401);
exit;
}
// Answer first, then do the slow work.
http_response_code(200);
if (function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
}
$event = $_SERVER['HTTP_X_QC_EVENT'] ?? '';
$delivery = $_SERVER['HTTP_X_QC_DELIVERY'] ?? '';
$store = $_SERVER['HTTP_X_QC_STORE'] ?? '';
$body = json_decode($raw, true);
// Skip $delivery if you've seen it before, then handle $event.
error_log("$event from $store");When your app is removed
- We send
app.uninstalled. - The store’s token stops working, and calls answer
401. Stop calling for that store. - Delete the store’s data within 30 days.
Something unclear or missing? Email owodunnitech@gmail.com. We usually reply within 48 hours, but it can take up to 7 days.