One-hotel path
Send messages on new bookings(by webhook)
This page is for software that does something when a comes: a WhatsApp to the guest, an email, or an alert to the staff. ZimmerStack tells your server about the booking. Your own code sends the message.
How it works
A guest books
On an OTA, or on the hotel's own website.
the bookingZimmerStack
Saves the booking. Tells your server within seconds.
a webhookYour server
Checks the webhook. Then your own code sends the message.
A is a message ZimmerStack sends to your when something happens. What is a webhook? explains it with a picture.
ZimmerStack does not send your message for you. No request of this API sends a WhatsApp or an email.
Which bookings send a webhook
- A booking on an OTA
- Yes. An is a website that sells hotel rooms, like Booking.com. The is named
channel.booking.created. - A booking on the hotel's own website
- Yes, when the website uses the ZimmerStack . The event is named
direct.booking.created. - A booking made by the hotel's staff
- No. The staff type it into the at the . No webhook is sent for it.
- A booking your own key created
- No. Your software made it, so it already knows.
A cancellation sends an event too. Its name ends in .cancelled. An OTA booking that changes sends channel.booking.modified.
What you need
- A server with a public address that starts with
https://. Your own computer is not public. Webhooks shows how to test from it. - The hotel's owner, for five minutes. Only the owner can add your address.
- No key. To receive a webhook, you need no key and no .
Step 1: the owner adds your address
Your server's address is called a . Send these steps to the owner.
- 1
Open Admin, then Developers, then Webhooks
In Admin's menu, find Developers and choose Webhooks. The screen is named Booking webhooks. The Channels app has the same under Integrations. - 2
Choose the hotel
The list at the top shows the hotels that use ZimmerStack as their , and the . For a test, choose the sandbox. - 3
Press Add endpoint
A panel opens. Paste your address in the box Endpoint URL. - 4
Check the events
They are under Events to send. All are ticked at first. For new bookings you need Booking created and Website booking created. - 5
Decide on phone and email
The switch is named Include guest contact details (phone, email). Leave it on only if your message needs the guest's phone or email. - 6
Tick the box about guest data, then press Create endpoint
The panel now says Endpoint created. It shows the . The owner copies it and sends it to you in a safe way.
- How many
- A hotel can have up to 5 endpoints.
- The secret is lost
- The owner opens the menu of the endpoint and chooses Signing secret. There the owner can show it again, or make a new one.
- To change something later
- The same menu has Edit, Pause, Send test and Deliveries.
Step 2: receive the event
ZimmerStack sends one request to your address, with the method POST. Its body is . One webhook carries one event. This one is a new booking from MakeMyTrip:
{
"id": "evt_5d3f0c4a-6b1e-4a7e-9c1b-2f0e8d1a9b77",
"type": "channel.booking.created",
"apiVersion": "2026-09-01",
"occurredAt": "2026-12-10T12:00:00.000Z",
"mode": "live",
"sequence": 41,
"property": {
"id": 61,
"name": "The Lantern House",
"currency": "INR",
"timezone": "Asia/Kolkata"
},
"data": {
"booking": {
"id": 100001,
"reference": "TEST-ZS-8K3Q2M",
"version": 1,
"status": "CONFIRMED",
"stayStatus": "UPCOMING",
"channel": {
"otaName": "MakeMyTrip",
"otaReservationCode": "TEST-ZS-8K3Q2M",
"source": "CHANNEL_MANAGER",
"sourceGroup": "INDIRECT"
},
"stay": {
"checkIn": "2026-12-24",
"checkOut": "2026-12-26",
"nights": 2,
"dayUse": false
},
"guest": {
"fullName": "Asha Verma",
"firstName": "Asha",
"lastName": "Verma",
"phone": "+919876500000",
"email": "asha.verma@example.com",
"country": "IN",
"language": "en"
},
"guestNotes": "Late arrival around 22:00. Non-smoking room please. (test event)",
"occupancy": {
"adults": 2,
"children": 0
},
"rooms": [
{
"roomTypeId": 412,
"ratePlanId": 901,
"roomTypeName": "Deluxe Garden Room",
"mealPlan": "CP",
"mealPlanSource": "ota",
"mealPlanText": "CP · Breakfast included",
"mealPrice": null,
"adults": 2,
"children": 0,
"checkIn": "2026-12-24",
"checkOut": "2026-12-26",
"nights": 2,
"dayUse": false,
"ratePerNight": 2700,
"amount": 5400,
"nightlyRates": [
{
"date": "2026-12-24",
"amount": 2600
},
{
"date": "2026-12-25",
"amount": 2800
}
],
"commission": 1350,
"status": "UPCOMING"
}
],
"amounts": {
"currency": "INR",
"total": 5400,
"paid": 0,
"balanceDue": 5400,
"paymentCollect": "property"
},
"finance": {
"otaName": "MakeMyTrip",
"amountBasis": "GROSS_TOTAL",
"currency": "INR",
"grossAmount": 5400,
"commissionAmount": 1350,
"taxAmount": 648,
"netPayoutAmount": 4050,
"taxIncludedInAmount": false
},
"cancellation": null,
"createdAt": "2026-12-10T12:00:00.000Z",
"updatedAt": "2026-12-10T12:00:00.000Z"
}
},
"changes": null,
"previous": null
}- id
- The id of this event. Save it. You need it in the last section of this page.
- type
- What happened. channel.booking.created is a new OTA booking. direct.booking.created is a new website booking.
- mode
- live means the real hotel. test means the sandbox.
- sequence
- A number that counts the hotel's events in order. A helps you see if you missed one.
- property
- The hotel: its id, name, currency and time zone.
- data → booking
- The whole booking: the guest, the dates, the rooms and the money.
Step 3: check the signature
Your address is public. Anyone could send a false booking to it. So every webhook carries a . Your server checks it with the signing secret. Only ZimmerStack and you know that secret.
The signature is in three : webhook-id, webhook-timestamp and webhook-signature. This code checks them, in Node.js:
import { createHmac, timingSafeEqual } from "node:crypto";
// Standard Webhooks: webhook-id, webhook-timestamp, webhook-signature headers.
export function verify(headers, rawBody, secret) {
const id = headers["webhook-id"];
const ts = headers["webhook-timestamp"];
const given = String(headers["webhook-signature"] ?? "");
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // 5-minute window
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
const expected = createHmac("sha256", key).update(`${id}.${ts}.${rawBody}`).digest("base64");
return given.split(" ").some((sig) => {
const [, value] = sig.split(",");
return value && value.length === expected.length && timingSafeEqual(Buffer.from(value), Buffer.from(expected));
});
}- Use the body as it arrived
- Check the signature on the exact text of the body. Do it before your code turns the JSON into an object.
- Refuse an old webhook
- The code refuses a timestamp that is more than five minutes away from now.
- If the check fails
- Do not use the event. Answer with a status code that is not 200, for example 401.
- In another language
- Do the same steps. Join the id, the timestamp and the body with dots. Sign that text with HMAC-SHA256 and the secret. Compare.
- The small details
- The secret starts with whsec_. Take that start off and decode the rest from base64: this is the key. The signature is base64 text. The header can hold more than one, with a space between them. In each one, the signature is the part after the comma.
- Keep the secret safe
- Keep it on your server, like a key. Never put it in a web page.
Step 4: read the booking
Everything for your message is inside data.booking.
- guest → fullName
- The guest's name.
- stay → checkIn
- The day the guest arrives, on the hotel's own calendar.
- stay → checkOut
- The day. It is not a night of the stay.
- stay → nights
- How many nights the guest stays.
- rooms → roomTypeName
- The name of the room type the guest booked. There is one item for each room.
- channel → otaName
- Which OTA sold the booking. For a website booking it says Website.
- reference
- The booking's reference. For an OTA booking it is the OTA's own reservation code.
- guest → phone, email
- The guest's phone and email. They are not always there. The next section says when.
Step 5: send your message
Now your own code does its work. It sends the WhatsApp, the email or the alert with the service you already use. With the example above, a message could say:
The guest's phone and email
- Only when the owner switched it on
- An endpoint gets the phone and the email only while its switch for guest contact is on. With the switch off, the event has no phone and no email at all.
- The owner can change it at any time
- It is in the menu of the endpoint, under Edit. The change counts for every webhook sent after it.
- Only until 30 days after check-out
- An event about an older stay comes with phone and email null. guest.contactWithheld then says retention.
- Sometimes the OTA sends none
- Some OTAs give no phone. Some give an email address of their own that passes mail on to the guest. Then the field is null, or not the guest's own.
So your code must work when the phone or the email is missing. What you save about a guest is yours to protect. Guest contact has the full rules.
The same event can arrive twice
Sending one webhook to your server is called a . Sometimes your answer is lost on the way. ZimmerStack then tries the same delivery again, and your server gets the same event twice. Without care, the guest gets two messages.
- Save the
idof every event you handled. - When an event comes, look for its id in your list.
- If it is there, answer 200 and do nothing more.
- The order
- Events usually come in order, but not always. For one booking, the higher data.booking.version is the later one.
- Your server was down for a long time
- After about one day, ZimmerStack stops trying an event. Read what you missed with List events. It needs the scope
channel-bookings:read, ordirect-bookings:readfor website bookings. - What the owner sees
- In the menu of the endpoint, Deliveries lists every event that was sent, and what your server answered.
- After 72 hours of failures
- The endpoint is suspended. No event is sent to it until the owner starts it again. Then Recover… in the same menu sends the missed events again.
Test it on the sandbox
- 1
The owner adds your address on the sandbox
The steps are the same as above. The owner chooses the sandbox in the list at the top. - 2
The owner makes a test booking
In Admin, under Developers, on the tab API keys, the card Sandbox has a button Simulate a booking. - 3
Your server receives the real webhook
It is signed like a real one. Its mode says test.
With a that holds ari:write, you can make test bookings yourself: Make a test booking.
Words on this page
- Booking
- A guest has reserved a room for some nights. Also called a reservation.
- Webhook
- A message ZimmerStack sends to your server when something happens, like a new booking.
- Server
- A computer that runs your software all the time and can be reached over the internet.
- OTA
- Online travel agency: a website that sells hotel rooms, like Booking.com, MakeMyTrip or Agoda. Learn more
- Event
- One thing that happened, like a new booking. Each webhook carries one event.
- Booking engine
- The part of a hotel's own website where a guest books a room.
- PMS
- Property management system: the software a hotel uses at its front desk for bookings, guests and bills.
- Front desk
- The reception of a hotel, where guests arrive and leave.
- Scope
- One permission of a key. For example ari:write lets the key update availability, rates and restrictions.
- Webhook endpoint
- The address of your server where ZimmerStack sends webhooks.
- Channel manager
- Software that keeps a hotel's rooms and prices the same on every OTA. Learn more
- Sandbox
- Your test hotel. It works like a real hotel, but no OTA can see it and it costs nothing.
- Signing secret
- A secret code ZimmerStack shares with you once. With it your server can check that a webhook is really from ZimmerStack.
- JSON
- A simple text format for data, made of names and values inside { }.
- Sequence
- A number that counts a hotel's events in order: 1, 2, 3 and so on.
- Status code
- A number in every response. 200 to 299 means it worked. 400 and above means there is a problem.
- Signature
- A code sent with each webhook. Your server checks it with the signing secret.
- Header
- A small piece of extra information sent with a request, like your key.
- Check-out
- The day a guest leaves. It is not a night of the stay.
- Delivery
- One webhook sent to one of your webhook endpoints, with every try to send it.
- Test key
- A key that starts with zsk_test_. It works only on a sandbox, so it can never change a real hotel.
Routes, samples, limits and codes on this page come from the API's public contract, read live, Fri, 04 Dec 2026 22:25:03 UTC.