Webhooks

Tably calls your server the moment something happens in the restaurant. Add an https address in Settings → Integrations → Webhooks and choose the events; you get the secret to check the signature.

Every call

A POST with JSON, the event name in Tably-Event and the signature in Tably-Signature:

{
  "id": "evt_4f1c9a2b7e01",
  "event": "order.paid",
  "createdAt": "2026-10-07T16:41:12Z",
  "data": {
    "order": {
      "id": "…",
      "number": 12,
      "status": "paid",
      "paid": 16
    }
  }
}
  • Answer with any 2xx within 10 seconds — do the work after answering.
  • No answer: tried again after 1 and 10 minutes. After 50 failures in a row the webhook turns off (on again in Settings).
  • Test in Settings sends a ping. The last answer of each webhook is shown there.
  • The same event can come twice (a retry): use its id to do the work once.

Check the signature

Tably-Signature: t=<unix time>,v1=<signature> — the HMAC-SHA256 (hex) of t + "." + the raw body with your webhook’s secret. Check it, and that t is recent:

import crypto from "node:crypto";

// Express: app.post("/tably", express.raw({ type: "application/json" }), handler)
export function fromTably(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map(p => p.split("=")));
  const expected = crypto.createHmac("sha256", secret)
    .update(parts.t + "." + rawBody).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1 || ""));
}

Events

{
  "order": {
    "id": "API-MFX2K91",
    "number": 12,
    "status": "paid",
    "service": "table",
    "table": "4",
    "guests": 2,
    "waiter": "Dara",
    "openedAt": "2026-10-07T12:00",
    "closedAt": "2026-10-07T12:41",
    "items": [
      {
        "id": "b3dc…",
        "dishId": "pad-thai",
        "name": "Pad Thai",
        "quantity": 2,
        "price": 6.5,
        "guest": 0,
        "note": "no peanuts",
        "sentAt": "2026-10-07T12:01",
        "readyQuantity": 0,
        "removed": false
      },
      {
        "id": "7a01…",
        "dishId": "iced-latte",
        "name": "Iced latte · Oat milk",
        "quantity": 1,
        "price": 3,
        "guest": 0,
        "sentAt": "2026-10-07T12:01",
        "readyQuantity": 1,
        "removed": false
      }
    ],
    "subtotal": 16,
    "discount": 0,
    "deliveryFee": 0,
    "payments": [
      {
        "method": "Cash",
        "amount": 16,
        "tip": 1
      }
    ],
    "paid": 16
  }
}