Skip to main content

Webhooks

Webhooks let another system receive signed order events from SpectaQR.

They are:

  • owned by the organization
  • managed from the staff Settings dialog
  • shown with a masked signing secret after creation
  • delivered asynchronously after the order changes

Permissions​

Only the venue owner can create, edit, or revoke webhook endpoints.

Create an endpoint​

The number of active endpoints depends on your plan; see plan limits. Creating an endpoint past the limit is refused, and to downgrade to a plan with fewer endpoints you must revoke the extras first.

  1. Open the staff sidebar.
  2. Open Settings.
  3. Go to Webhooks.
  4. Enter a name and a publicly reachable HTTPS URL.
  5. Create the endpoint and copy the signing secret immediately.

The signing secret is shown only once.

Event types​

SpectaQR v1 sends these order events:

  • order.created — a guest or staff member placed the order.
  • order.updated — items were added, an item changed status (including cancel and restore), or the order's discount or tip changed.
  • order.completed — the order has nothing pending for the first time, item by item or because staff closed it (closedAt is then set). It is sent once; later changes are order.updated.

Each event's order is the order exactly as that change left it, frozen when the event happened, even if the delivery arrives after a later change.

Delivery payload​

Each webhook delivery is a POST request with a JSON body like this:

{
"version": "v1",
"eventType": "order.updated",
"eventId": "webhook event id",
"createdAt": 1710000000000,
"locationSlug": "downtown",
"order": {
"slug": "K7M2Q9XA",
"orderNumber": 42,
"locationSlug": "downtown",
"locationTimezone": "America/New_York",
"currencyId": "USD",
"table": {
"alias": 12,
"slug": "table-12",
"name": "Patio 1"
},
"isOpen": true,
"items": [
{
"menuItemId": "j57j4...",
"name": "Burger",
"orderItem": {
"_id": "h72da...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 1495,
"discountMinor": 0,
"netMinor": 1495,
"taxMinor": 133,
"grossMinor": 1628,
"taxRateMilliPercent": 8875,
"taxIncluded": false
},
"paymentId": null
},
{
"menuItemId": "j58k1...",
"name": "Packaged Snack",
"orderItem": {
"_id": "h72db...",
"updatedAt": 1735689600000,
"deliveryStatus": "pending",
"deliveryFlow": "instant"
},
"prepStation": {
"id": "k17b2...",
"kind": "kitchen",
"name": "Kitchen"
},
"pricing": {
"listedPriceMinor": 300,
"discountMinor": 0,
"netMinor": 300,
"taxMinor": 0,
"grossMinor": 300,
"taxRateMilliPercent": 0,
"taxIncluded": false
},
"paymentId": null
}
],
"payments": [],
"totals": {
"discountMinor": 0,
"subtotalMinor": 1795,
"taxMinor": 133,
"totalMinor": 1928,
"tip": { "kind": "percent", "milliPercent": 10000, "setBy": "staff" },
"tipMinor": 180,
"totalWithTipMinor": 2108,
"taxBreakdown": [
{ "taxRateMilliPercent": 8875, "taxIncluded": false, "netMinor": 1495, "taxMinor": 133, "grossMinor": 1628, "lineCount": 1 },
{ "taxRateMilliPercent": 0, "taxIncluded": false, "netMinor": 300, "taxMinor": 0, "grossMinor": 300, "lineCount": 1 }
]
},
"orderedAt": 1735689600000,
"updatedAt": 1735689601000
}
}

order has the same shape as the public API: each item's prepStation, pricing and paymentId, totals with the per-rate taxBreakdown, and payments. totalMinor is the goods total and excludes the tip; tipMinor is outside the tax base, and totalWithTipMinor includes it. Amounts are integers in ISO 4217 minor units. payments stays empty, and paymentId null, until online payments are available; a refund or dispute on a payment will then send order.updated.

Delivery headers​

SpectaQR sends these headers with each delivery:

  • content-type: application/json
  • user-agent: SpectaQR-Webhooks/1.0
  • x-spectaqr-event: <event type>
  • x-spectaqr-event-id: <event id>
  • x-spectaqr-signature: v1=<hmac-sha256 hex>

The signature is an HMAC SHA-256 of the raw request body using the endpoint secret.

Verifying the signature​

Your receiver should:

  1. Read the raw request body.
  2. Recompute the HMAC SHA-256 using the signing secret.
  3. Compare it to the value in x-spectaqr-signature.

If the signatures do not match, reject the request.

Retries​

Your endpoint has 10 seconds to answer with a 2xx status. SpectaQR tries a delivery again when the request fails to connect, times out, or gets a 408, 429 or 5xx response. It retries up to five times, after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. Any other response, including a redirect, is final.

A retry sends the same body and the same x-spectaqr-event-id to that one endpoint. So your receiver can get an event more than once, and can get an older order.updated after a newer one. To handle both:

  1. Skip an event whose x-spectaqr-event-id you have already processed.
  2. Skip an event whose order.updatedAt is older than the last one you applied for that order.

A revoked endpoint gets no further retries.

Revoke an endpoint​

If a destination is no longer needed, revoke it from Settings. SpectaQR asks you to confirm first, because it can't be undone.

Revoked endpoints stop receiving future events.