Plumslot

API and webhooks

Webhooks

An owner adds an address in Settings → Developers, and Plumslot sends it the booking events chosen for it.

Open this in Plumslot

Steps

  1. Go to Settings → Developers.
  2. Add a public https address.
  3. Choose which events to send and how much about the client they carry.
  4. Copy the signing secret: it is shown only once.
  5. Check the signature on every request you receive.

What a message holds

Ids, times, the status and the price. Nothing about the client unless you choose it: first name, or first name, email and phone. Those two need a passkey sign-in.

Checking the signature

The Plumslot-Signature header is t=[unix seconds],v1=[signature]. Compute the HMAC-SHA256 of [t].[body] over the raw bytes of the body as they arrived, before any JSON parsing. The key is the whole secret, including whsec_. Compare in constant time, and refuse a t more than 5 minutes old, so an old request cannot be played again.

In Node: const sent = Buffer.from(v1, 'hex'); const ok = sent.length === 32 && crypto.timingSafeEqual(sent, crypto.createHmac('sha256', secret).update(t + '.').update(rawBody).digest());

When your server does not answer

Answer with any 2xx within 5 seconds. Otherwise we try again: 6 attempts in all, the first and up to 5 retries over 8 hours 36 minutes. If it keeps failing we switch the address off and email the owners. Redirects are not followed.

API and webhooks

Questions

What address can I use?

A public https address on the standard port. Private and local addresses are refused, when you add it and on every send.

Do imports send events?

No. Only changes made in Plumslot after the address was added.

Didn't find your answer?

Write to us and the people who build Plumslot answer by email.

Contact us