Setting Up and Using Webhooks
What Can I Do With Webhooks?
Webhooks are a useful tool if you want to receive automatic notifications whenever a booking or conversation event occurs in your OnceHub account.
For example, you can use a webhook subscription to automatically send guest details to your server whenever a new booking is made.
You can register webhooks to send an HTTP POST request for specific types of booking or conversation events, or register a webhook to let you know when any booking or conversation lifecycle event takes place. See all available webhook events and their payloads.
🚧 POST messages may contain sensitive customer data. Always use HTTPS when providing the receiving POST URL.
Webhook Delivery Retries
If your endpoint does not return a successful 2xx status code, the delivery is treated as failed and OnceHub retries it automatically.
Retries use exponential backoff, so the time between attempts increases over time.
Retries continue for up to about 3 days. If delivery still does not succeed within that retry window, the webhook is automatically disabled.
To avoid missed events, make sure your endpoint:
- Returns a
2xxresponse as soon as the payload is accepted. - Handles temporary errors and downtime gracefully.
- Logs failed deliveries so you can investigate and recover quickly.
Check That Your Webhook is Configured Correctly
Once you have created your webhook subscription, you can check that it is configured correctly by using a service like Webhook Tester.
Simply configure your webhook subscription with a URL generated by one of these services, and create a sample booking in your account. The request testing tool lets you collect the HTTP requests you send to the specified URL, so that you can easily confirm, inspect, or debug the responses.
Setting Up Webhook Integration With a SaaS Application
Webhooks can be used to easily integrate OnceHub with a SaaS application. Once you have registered a OnceHub account, setting up webhook integration with a SaaS application is simple:
- Create a webhook subscription by sending a POST request to the /webhooks endpoint, configured with the relevant event triggers and the URL where you want to receive data.
- Receive booking or conversation data every time a booking or conversation lifecycle event is triggered.
- Integrate OnceHub booking or conversation data into your application.