Hear about orders as they happen
Instead of asking every few seconds, let Taventi tell your server: a new order, an order accepted or ready, a new booking, a booking cancelled. Each event is a signed JSON POST.
Setting one up
In the restaurant's dashboard, Integrations → Webhooks → Add address: an https:// address on your server and the events it wants. The signing secret (whsec_…) is shown once; keep it with your server's other secrets. Send test posts a ping event to check your side.
Events
| Type | When | data |
|---|---|---|
order.created | A guest places an order (or one comes in through the API). | orderId, number, status, locationId, pickupAt |
order.status_changed | Accepted, rejected, preparing, ready, completed or cancelled. | the same, with the new status |
reservation.created | A booking online, by phone or a walk-in. | reservationId, status, locationId, startsAt, partySize |
reservation.status_changed | Confirmed, declined, seated, finished, no-show or cancelled (also by the guest). | the same, with the new status |
Taventi-Signature: t=1795003200,v1=5f3c…e91a
Taventi-Event: order.created
Taventi-Delivery: 2b6e…
{
"id": "0c1d6f0e-…",
"type": "order.created",
"createdAt": "2026-12-04T18:02:11.000Z",
"organizationId": "352c1431-…",
"data": {
"orderId": "18aacc5a-…",
"number": "1005",
"status": "pending",
"locationId": "798820b8-…",
"pickupAt": "2026-12-04T18:30:00.000Z"
}
}Checking the signature
Taventi-Signature holds a time t and v1, the HMAC-SHA256 (hex) of t, a dot and the raw body, with your secret as the key. Compare it before trusting the body, and refuse events older than a few minutes. The SDK does both:
import express from "express";
import { verifyWebhook } from "@taventi/sdk";
const app = express();
// The raw body: the signature covers the exact bytes Taventi sent.
app.post("/taventi/webhooks", express.text({ type: "application/json" }), async (req, res) => {
let event;
try {
event = await verifyWebhook({
body: req.body,
signature: req.header("Taventi-Signature"),
secret: process.env.TAVENTI_WEBHOOK_SECRET,
});
} catch {
return res.sendStatus(400);
}
res.sendStatus(200); // answer quickly, then do the work
if (event.type === "order.created") {
// e.g. print a ticket, or fetch the order with an API key
}
});signed = t + "." + raw_body
expected = hex(hmac_sha256(key = secret, message = signed))
valid = constant_time_equal(expected, v1) and abs(now - t) < 300Delivery and retries
- Answer with any
2xxwithin 10 seconds. Anything else, or no answer, is tried again: ten tries over about four hours (after 30 seconds, then doubling). Redirects aren't followed. - The same event can arrive twice (a retry after a slow answer): skip an event whose
idyou have already handled. - Events can arrive out of order; trust the status, not the order of arrival.
- The dashboard lists the latest events with their result and a Resend, and keeps them 30 days.