Bewtee

Developer docs

Webhooks

Get told the moment a booking changes.

On this page (5)
  1. Set one up
  2. What your server receives
  3. How to respond
  4. Retries
  5. Requirements

A webhook is an HTTPS address on your server that Bewtee calls when something happens to a booking. Use it to keep another system in sync without polling the API.

Set one up

1. Add your address

In the dashboard open Developers → Webhooks → Add webhook. Enter a public https:// address and choose the events you want.

2. Save the signing secret

The secret (it starts with whsec_) is shown once. Your server uses it to verify that requests really come from Bewtee.

3. Send a test

Press Send test. Bewtee sends a ping event and shows whether your server accepted it.

A business can have up to 5 webhook addresses.

What your server receives

A POST with a JSON body and these headers:

Header Value
Content-Type application/json
Bewtee-Event The event type, for example booking.accepted
Bewtee-Delivery A unique ID for this delivery, the same across retries
Bewtee-Signature t=<unix time>,v1=<signature>. See verify signatures
User-Agent Bewtee-Webhooks/1.0

How to respond

  • Reply with any 2xx status within 5 seconds. Do slow work after you have replied.
  • Redirects are not followed. A 3xx counts as a failure.
  • Treat the event id as a de-duplication key: the same event can arrive more than once.
  • Events can arrive out of order. Use the booking in the payload, or fetch the latest state from the API.

Retries

A delivery that fails is retried with growing delays: after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. That is 6 attempts over roughly 8.5 hours, after which the delivery is marked failed.

After 25 failed attempts in a row across deliveries, the webhook is paused and no further events are sent to it. Fix your server, then switch the webhook back on in the dashboard.

Events are usually delivered within a minute of the change. Recent activity in the dashboard shows the last 50 deliveries for each webhook, kept for 30 days.

Requirements

  • The address must use https:// and resolve to a public IP address.
  • Addresses that point to private or internal networks are rejected.

Ready to connect Bewtee?

Sign in to your Bewtee business dashboard and choose Developers. Everything there is free for Bewtee businesses.

New to Bewtee? See what the salon software does

Found something wrong? Report an error

Login

Use your mobile number to view and manage your bookings.

+91

Enter the code we sent to +91 on WhatsApp.