Websites and web tools
Budget-Friendly Webhook Testing
A webhook is an HTTP request one service sends to another when something happens, such as a new booking, a paid deposit or a cancelled appointment. Testing them can feel like it needs paid tools. Most of the work can be done with free software already on your computer and the test modes that booking and payment providers offer.
What you are testing
- That your endpoint receives the request and returns a 2xx status code quickly.
- That it verifies the sender's signature before trusting the data.
- That it handles the same event arriving twice without double-booking.
- That it copes with events arriving in an unexpected order.
- That failures are logged so you can replay them.
Free and low-cost methods
| Method | Cost | Good for | Limits |
|---|---|---|---|
| Provider's test mode and event replay | Usually included | Realistic payloads with correct signatures | Only that provider's events |
Local server plus a saved sample payload sent with curl | Free | Fast repeat tests of your handler logic | You must craft or copy the payload |
| Tunnel from a public URL to your machine | Free tiers exist | Receiving real test events on your laptop | URL may change each session; never leave it open |
| Request inspector page that shows incoming requests | Free tiers exist | Seeing exactly what a provider sends | Do not send live customer data to a third party |
| Unit tests with recorded payloads | Free | Regression checks on every change | Need updating when the provider's format changes |
A step-by-step routine
- Read the provider's webhook documentation for headers, signature method and retry policy.
- Turn on test mode and register a test endpoint.
- Capture one example of each event type you use and save it as a file.
- Write your handler to verify the signature first, then process the event.
- Replay the saved files with
curl -X POST -H "Content-Type: application/json" --data @event.jsonagainst your local server. - Send the same event twice and confirm only one booking results.
- Send a deliberately wrong signature and confirm the handler rejects it with a 4xx code.
Signature checks
Most providers sign each request, often with an HMAC using SHA-256 and a shared secret. Your code recomputes the signature over the raw request body and compares the two. Use the raw bytes, not a re-serialised JSON object, because spacing differences change the signature. Use a constant-time comparison function from your language's library.
Retries and timing
If your endpoint fails or is slow, providers retry, often with growing gaps between attempts. Check your provider's documentation for its exact schedule.
Keep costs and risks low
- Respond with 200 as soon as the event is stored, then do slow work such as sending emails afterwards.
- Store the event ID and ignore duplicates.
- Keep test and live secrets separate and out of your code repository.
- Close tunnels when you finish a session.
- Delete test data from request inspectors when done.