Webhooks
Get told when something happens on a brand, also when the call came from another system of yours. Add up to 3 HTTPS endpoints per brand in the console; each gets its own signing secret.
Events
| type | When | data |
|---|---|---|
purchase.created | A purchase was recorded (also when it added 0) | The purchase, as POST /v1/purchases returned it |
purchase.reversed | A purchase was reversed | The reversal |
redemption.created | A reward or points were redeemed | The redemption |
ping | You pressed Send test event in the console | { message } |
A retried call with the same reference sends nothing new. Deleting a customer sends no event.
What we send
POST /your/webhook/url
Content-Type: application/json
User-Agent: TavoloPlus-Webhooks/1.0
Tavolo-Signature: t=1761748325,v1=5f0c3a…
{
"id": "evt_3b8f0c2a9d1e4f5a6b7c8d9e",
"type": "purchase.created",
"created": "2026-10-29T14:32:05.311Z",
"livemode": false,
"data": {
"id": "pur_7a1c9e2b4d6f8a0b1c2d3e4f",
"customerRef": "user_8841",
"programme": "stamps",
"stamps": { "added": 1, "count": 6, "required": 10, "rewardReady": false },
"createdAt": "2026-10-29T14:32:05.120Z"
}
}Delivery
- Answer any 2xx within 5 seconds. Anything else (3xx included: redirects are not followed) is a failure. Do the work after answering.
- At least once and unordered: the same event can arrive twice (and a replay keeps its
id). Dedupe onid. - A failed delivery is retried, waiting 1 min, 5 min, 30 min, 2 h, 5 h, then 10 h between attempts, with a last attempt 24 h after the event. Then it is marked failed.
- An endpoint that fails every delivery for 24 hours is disabled and we email you. Fix it, enable it in the console, and replay what you need from the delivery log (kept 30 days).
- Only public HTTPS addresses are accepted: no localhost, private ranges or plain HTTP.
Verify the signature
Tavolo-Signature is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of t + "." + the raw body with the endpoint's secret. Accept the event when any v1 matches and t is within 5 minutes. Compute it over the raw bytes: parsing and re-encoding the JSON changes them.
Rotating the secret
Rotate in the console: the new secret signs at once and the old one keeps signing too (a second v1) for 24 hours. Deploy the new secret within that day.