Skip to content

Developer docs

How to connect StayParity to your own systems. Signed webhooks, the book-direct badge for a hotel's website, and the price check for chat bots.

StayParity has three things you can build on: webhooks that tell your server when an OTA undercuts a hotel, a badge that shows guests on the hotel's own website that booking direct pays, and a price check that gives a chat bot or your own widget the badge's answer.

Webhooks

StayParity posts each new rate disparity to your URL as signed JSON: a seller in hotel search results selling the same room as the hotel, both mapped to one of the hotel's room types, for less than its direct price. Use it to open a ticket, message a revenue manager or feed your own reporting.

Deliveries follow Standard Webhooks, so an off-the-shelf library verifies them in a few lines. Read Webhooks for the event, signatures, retries and testing.

Website badge

One <script> tag on the hotel's booking page shows guests the direct price next to what the OTAs charge, when the hotel is cheapest or level. When an OTA is cheaper, it shows the direct price alone. Read Website badge for the snippet, its options and what it shows, and Measure the badge in your analytics to count the bookings it sends in GA4.

Price check

One GET with the hotel's embed key gives the badge's answer for a night as JSON: the hotel's direct price and, when it is cheapest or level, the OTA prices beside it. Use it to quote the direct price in a WhatsApp bot, a chat assistant or a widget of your own. Read Price check API for the request, the answers and an example bot.

Keys

Webhooks and the badge each have their own key, and the price check uses the badge's. They work differently:

KeyLooks likeWhereSecret?
Signing keywhsec_…Settings → Webhooks, one per accountYes. Keep it on your server.
Embed keywk_…Settings → Website badge, one per hotel, for the badge and the price checkNo. It sits in the hotel's public HTML.

The signing key proves a webhook came from StayParity. It is shown once, and only account admins can create or replace it.

The embed key only shows that hotel's badge and answers its price check, and neither says more than any guest could see anyway. Anyone can copy it from the page source. If that matters, replace the snippet in the portal and the old key stops working. A guest's browser may keep showing a badge it loaded in the last five minutes.

There is no API for reading or changing account data. Webhooks post to your server, and the badge and the price check read the same public comparison. None of them needs an API token.

For tools and agents

On this page