POST to your URL each time something happens in the
restaurant: a reservation is created or changes, a customer is created,
updated, merged or deleted, an activity is booked, changes or is deleted. Each request carries one event, signed with the
endpoint’s secret.
There are two ways to set up an endpoint:
- in Settings → Integrations → Webhooks, by the restaurant;
- through the API, with
POST /webhook-endpointsand a key holdingWEBHOOKS_WRITE.
Event
Event types
An endpoint receives only the types it subscribed to. Several events about the
same object can arrive out of order: compare
data.object.updated_at, or read
the object again through the API, before overwriting your copy.
customer.updated is only published when something the API shows changed.
Customer statistics (stats) never publish an event: read the customer when
you need fresh figures. On a merge, the surviving customer gets its own
customer.updated when the merge filled in its contact or opt-outs.
activity.updated is only published when something the API shows changed. A
changed list (payments) carries its whole previous value in
previous_attributes, not a diff of it. Renaming a product, a member of staff
or a customer publishes no activity.updated. Activities booked together share
data.object.cart_id: a cart paid at once gives one activity.updated per
activity. Nothing follows an activity.deleted for that id.
What an endpoint sees
An endpoint set up in the restaurant’s settings receives the full objects. An endpoint created through the API receives what its key may read, like the API itself:reservation.*requiresRESERVATIONS_READ; the reservation is masked (sensitive_data_included: false) unless the key holdsRESERVATIONS_READ_SENSITIVE;customer.*requiresCUSTOMERS_READ;activity.*requiresACTIVITIES_READ; the activity is masked (sensitive_data_included: false) unless the key holdsACTIVITIES_READ_SENSITIVE.
Coverage
Reservation events are published by the flows below. Changes made by the guest (on the booking portal or through the EatNow assistant) publish no reservation event yet, except a cancellation.
Customer events are published by every flow that creates or changes a
customer: the dashboard and the app (create, edit, blacklist, merge, delete),
every booking channel (portal, activities, Reserve with Google, waitlist, the
WhatsApp assistant, missed calls, partner API), the customers endpoints of the
partner API, and marketing opt-outs (unsubscribe link, email bounce or
complaint). The CSV import of customers publishes nothing: after an import,
resynchronize with
GET /customers?updated_since=….
Activity events are published by every flow that writes an activity, its cart
or its payment lines: booking (booking portal, dashboard, app), acceptance,
refusal, status and edits by the staff, the guest’s customer or room on the
cart, cancellation (staff and guest), payment (Payzone, CMI, Stripe), capture,
release, refunds and lines set by hand, the payment deadline, the assistant’s
staff assignment, the hotel PMS moving the stay to another room, customer and
prescriber merges, customer deletion, and deletion of an activity or a cart.
Flows without a transaction (most staff
edits, the payment callbacks) read the activity just before and just after
their write: a change made in between by someone else may be told twice.
Arrivals and visits
The arrival statuses areSHOWED_UP, SEATED, SEATED_FOR_DRINKS,
PARTIALLY_SEATED and DONE. One visit can produce several
reservation.updated events carrying an arrival status: SHOWED_UP then
SEATED then DONE, a table move while seated, the register and the dashboard
both reporting the same arrival, or a walk-in created directly as SEATED (a
reservation.created). A consumer that credits a visit, a loyalty point or a
reward must deduplicate on data.object.id plus its own intent (for
example “visit credited for reservation X”), not on the event or its id.
Compare data.previous_attributes.status with data.object.status to
detect the transition itself.
Headers
Custom headers from the settings are applied first; the headers above are
applied after them and always win (names compared case-insensitively). A custom
header named
EatNow-Signature or starting with X-EatNow- is dropped.
Verify the signature
EatNow-Signature is t=<timestamp>,v1=<signature>, where signature is the
hex HMAC-SHA256 of "<timestamp>.<raw body>" with the endpoint’s secret
(whsec_…, used as is). The timestamp is the attempt’s: retries are signed
again.
- Split the header on
,and=to readtandv1. - Compute the HMAC-SHA256 of
t + "." + raw body, over the exact bytes received; parsing and reserializing the JSON would break it. - Compare with
v1in constant time. - Reject the request when
tis more than 5 minutes away from your clock: a captured request cannot be replayed later.
- Node.js
- Python
- PHP
Express receiver example
Save the Node.js verifier asverify-signature.js. Register the raw-body route
before any express.json() middleware, and load the secret from secure
server-side storage.
Delivery and retries
-
The receiver should return
2xxwithin the configured timeout, after successful processing or durable acceptance. Default timeout is 5,000 ms, configurable from 1,000 to 30,000 ms. -
The response decides what happens next:
- Automatic retries: 6 attempts in total, waiting about 30 s, 2 min, 8 min, 32 min and 2 h between them (each wait is multiplied by a random factor between 1 and 2, capped at 2 h), so roughly 3 to 5 hours of coverage. After the last failure the delivery is marked as given up. These are the policy’s bounds, not a guaranteed schedule.
-
Every attempt sends the same body bytes and the same
id/X-EatNow-Delivery. The signature is computed at each attempt with the webhook’s current secret. -
Delivery order and exactly-once delivery are not guaranteed, and several
destinations receive the same
id. Deduplicate onX-EatNow-Delivery(equal to the bodyid), scoped torestaurant_idand to the integration when it handles multiple destinations independently. - A deactivated or deleted webhook stops its pending deliveries: they are not sent.
Delivery journal and resend
Settings → Integrations → Webhooks → Deliveries lists each delivery of a webhook, newest first: status (pending, delivered, refused, given up), last HTTP code, event, object (reservation or customer), date, attempts and last error. Resend sends that exact delivery again — same body, sameid, signed with the current
secret — with the full retry policy. Deliveries are kept 30 days, then
deleted (they contain guest data). There is no public replay API.
A lost response can cause a retry after your receiver already processed the
event. Avoid repeating a business action for an already handled ID. The
signature establishes body authenticity; it does not itself prevent replay.
Manage endpoints through the API
A key holdingWEBHOOKS_WRITE manages its own endpoints; it neither sees nor
changes the ones the restaurant set up in its settings, nor another key’s.
403 with the missing
scopes in error.details.missing_scopes. A key manages at most 5 endpoints.
Endpoints created through the API appear in the restaurant’s settings, marked
with the key’s name.
Test and troubleshoot
The settings Test button andPOST /webhook-endpoints/{id}/test send a
synchronous ping event ("type": "ping", data.object: null) with
X-EatNow-Test: true, signed like any delivery. They do not go through the
delivery journal or the retries.
For a signature failure, check the secret, that you sign t + "." + body over
the raw bytes, the middleware order and your clock (the 5-minute window).
After rotating or regenerating a secret, update the receiver: pending retries
and resends are signed with the new one.
For a missing event, open the webhook’s Deliveries first: a refused or
given-up delivery shows the HTTP code and error the receiver returned. Then
check that the endpoint is active, its subscribed types, the coverage above
and, for an endpoint created through the API, its key’s scopes. Give support
the restaurant, the endpoint, the event id or X-EatNow-Delivery-Log-Id,
the time and the HTTP status; never the secret.