Testing webhooks and HMAC signature verification

Webhook receivers are public endpoints that act on data from outside, which makes signature verification the only thing between you and anyone who knows your URL. The Webhooks API signs every delivery with an HMAC and keeps a delivery log you can inspect and replay, so you can test the verifier rather than trusting it.

How to practise it

  1. Register a subscription, trigger an event, and verify the signature against the shared secret before doing anything with the body.
  2. Change one byte of the payload and confirm verification fails.
  3. Replay a stored delivery and check your receiver is idempotent instead of processing it twice.
  4. Check that your comparison is constant-time — a naive string equality leaks the signature a byte at a time.
  5. Inspect the delivery log to see exactly which headers arrived, rather than the ones you assumed would.

APIs to try it on

Status codes involved

Other techniques

Getting started guide · All 37 mock REST APIs