Skip to main content
Every webhook request includes an NBI-Signature header. Check it before you trust the request, so you know it came from NowBookIt and wasn’t changed on the way.

How to check it

  1. Take t (the time the request was sent) and v1 (the signature) from the header.
  2. Join t, a dot, and the request body exactly as you received it, e.g. 1792675202.{"eventId":...}.
  3. Create an HMAC-SHA256 of that text using your signing secret (including whsec_).
  4. If it matches v1, the request is genuine. Also reject requests where t is more than 5 minutes old.
Use the body exactly as it arrived. If your framework parses the JSON first, the signature won’t match. See Reading the raw body.

Code examples

Reading the raw body