Webhooks
Webhooks push every change in a business to your server as it happens: an order completed, a payment taken, stock counted, a booking moved. No polling.
Two ways to subscribe
- Your own business: an owner or admin adds an endpoint on the dashboard's Developers page, under Webhooks, choosing which events to send.
- Your app: set a webhook URL on the app in the developer console. Every business that connects your app sends its events there, limited to what its scopes allow.
The delivery
Lumora sends a POST with a JSON body:
{
"id": "0193a4f2-77b0-7d1e-b6a2-1f9c0e4d8a33",
"type": "order.updated",
"createdAt": "2026-12-05T09:30:12Z",
"sequence": 48211,
"businessId": "0193a4f2-0a77-7c41-8e0b-3d2b9f6e1a55",
"locationId": "0193a4f2-0b10-7f62-a4c9-6d1e2b3c4f70",
"data": {
"id": "0193a4f2-6c1e-7b3a-9d2f-5e8a1c4b7d90",
"number": "1006",
"state": "ORDER_STATE_COMPLETED",
"totals": { "total": "2350000" }
}
}typeis<entity>.updatedfor every change, including creation and deletion;datais the whole record after the change. See event types.businessIdis the business the change happened in. On an app's webhook, use it to pick that business's tokens.idis the same for every endpoint and every retry of one change: use it to ignore duplicates.sequenceincreases within a business. Deliveries can arrive out of order under retries; when two events concern the same record, keep the higher sequence.
Headers: Holygrail-Event-Id, Holygrail-Event-Type and Holygrail-Signature.
Check the signature
Every delivery is signed with your endpoint's secret (whsec_…, shown once when you create it). The header looks liket=1764927012,v1=5257a869e7…: t is the Unix time it was sent, and v1 is the hex HMAC-SHA256 of t, a dot, and the raw body. Reject deliveries whose signature doesn't match, or whose t is more than five minutes old.
import { verifyWebhook, SIGNATURE_HEADER } from "@lumora/sdk";
const event = await verifyWebhook(process.env.LUMORA_WEBHOOK_SECRET!, req.headers.get(SIGNATURE_HEADER), rawBody);Without an SDK:
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret: string, header: string, rawBody: string) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=", 2)));
const expected = createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) <= 300;
return fresh && expected.length === parts.v1?.length && timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}Verify against the exact bytes you received. Parsing the JSON and serializing it again changes the bytes and breaks the signature.
Respond quickly, retry safely
Answer with any 2xx within 10 seconds, then do the work in the background. Anything else, or no answer, is a failure, and Lumora tries again after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3, 6 and 12 hours: nine tries over about a day. The dashboard and the developer console show every delivery with its response and payload.
Test it
Choose Send test event on an endpoint or app to send a signed ping event. While developing, point the webhook at a tunnel to your machine.