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.

Webhook signature testing — request and response sequence Sequence diagram for Webhook signature testing: GET /webhooks/v1/subscriptions answers 200 OK. POST /webhooks/v1/subscriptions answers 201 Created. DELETE /webhooks/v1/subscriptions/{id} answers 401 Unauthorized. POST /webhooks/v1/deliveries/{id}/replay answers 409 Conflict. Your client Fun API Playground GET /webhooks/v1/subscriptions 200 OK Subscription list POST /webhooks/v1/subscriptions 201 Created Registered, includes a signingSecret DELETE /webhooks/v1/subscriptions/{id} 401 Unauthorized Missing or invalid token POST /webhooks/v1/deliveries/{id}/replay 409 Conflict Max attempts (3) already reached
Real endpoints from the catalog — every request above is served, and every status code shown is one that endpoint actually returns.

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 39 mock REST APIs

Last updated