The Stay Data API's Webhooks can be configured so that you are notified whenever there is a new booking or there has been an update to a booking. For a full list of our webhooks please check out this article.
In order to start receiving automatic notifications from our webhooks, you will need to provide a destination URL. You can do this by first going into Webhooks in the Impala management console.
The below screenshot shows the destination URL being provided to receive a notification whenever there is a new reservation:
If your website or application has not yet been configured to receive incoming notifications, one method to test the webhook is by using a testing site that will allow you to view incoming HTTP requests, such as https://webhook.site/.
In the Impala management console, add the automatically generated URL. You can find it underneath Your unique URL that is provided in https://webhook.site/.
The below gif shows a notification for a new reservation being received within the webhook testing site:
Disclaimer: As the above relies on third party technology we are unable to troubleshoot any issues that may arise from its use.
Each application has a unique webhook secret that is used to sign the JSON body of webhook requests. It can be viewed and regenerated in the Impala Management Console. As the secret value is per-application, you can use it to verify that a webhook request came from Impala and that it relates to your application.
- Retrieves the data from the database.
- Constructs the payload.
- Fetches the secret key.
- Combines the payload and the secret key to generate a verification hash.
- Sends the payload and verification hash to the client.
- Receive the webhook.
- Combine the payload (without the verification hash) and the secret key to generate a verification hash.
- Compare the hash received from Impala with the one the client has created.
- If the hashes match then the payload can be trusted.
Failed Webhooks can be reviewed in the Impala management console, by selecting the application, then Webhook Stats.
You are able to view the payload as well as the response of a Webhook by expanding the notification as shown below: