How to Set Custom Response Codes on Webhook.site (And a Better Alternative)
When you're building webhook integrations, testing isn't just about receiving data. You also need to control what your endpoint sends back. A custom response on Webhook.site lets you simulate real-world server behavior by returning specific HTTP status codes, headers, and body content to the service sending the webhook. This is essential for testing retry logic, error handling, and conditional flows in your integration.
In this guide, we'll walk through how to set custom response codes on Webhook.site, cover the limitations you'll run into, and show you why HookRay is a stronger choice for developers who test webhooks regularly.
What Are Custom Response Codes in Webhook Testing?
Every HTTP request expects a response. When Stripe sends a webhook to your endpoint, it looks at the status code your server returns to decide what to do next:
- 200 OK — Stripe considers the webhook delivered successfully.
- 4xx or 5xx — Stripe marks it as failed and retries according to its retry schedule.
During development, you often need to simulate these scenarios. What happens when your endpoint returns a 500? Does Stripe retry correctly? Does your queue processor handle the backoff? What if you return a 202 Accepted instead of a 200?
This is where custom response configuration matters. Instead of writing a throwaway server just to return a specific status code, you can use a webhook testing tool to set the response behavior directly in the UI.
How to Set Custom Response Codes on Webhook.site
Setting a custom response on Webhook.site is straightforward. Here's a step-by-step walkthrough:
Step 1: Create a New URL
Go to webhook.site. A unique URL is automatically generated for you. No signup required.
Step 2: Open the Response Settings
Near the top of the page, look for the Edit button next to your URL (or click on the response configuration section). This opens the custom response panel where you can modify what Webhook.site sends back to callers.
Step 3: Set the Status Code
In the custom response UI, you'll see fields for:
- Status code — Enter any valid HTTP status code (e.g., 200, 201, 400, 404, 500, 503).
- Content type — Set the response content type (e.g.,
application/json,text/plain). - Response body — Enter the response payload you want returned.
- Response headers — Add any custom headers the caller should receive.
For example, to test Stripe's retry behavior:
- Set status code to
503 - Set content type to
application/json - Set response body to
{"error": "service unavailable"}
Step 4: Save and Test
Click Save. Now every request sent to your Webhook.site URL will receive the custom response you configured. Send a test webhook from your service and verify the behavior.
Step 5: Change the Response as Needed
You can update the status code and response body at any time through the custom response UI. Each change takes effect immediately for the next incoming request.
Common Use Cases for Custom Response Codes
Setting a custom response with a specific status code isn't just for testing failures. Here are scenarios developers commonly test:
Retry Logic Testing
Set your response to 500 Internal Server Error or 503 Service Unavailable and observe how the sending service (Stripe, GitHub, Shopify) retries. Most services follow an exponential backoff strategy, and testing this behavior with a real failing endpoint is critical before going to production.
Conditional Processing
Some workflows branch based on the response. An API gateway might route differently based on whether your webhook returns 200, 202, or 204. Custom responses let you test each branch without deploying code.
Timeout Simulation
While not strictly a status code, combining a delayed response with a custom status code helps you test timeout handling on the caller side.
Integration Validation
Payment processors like Stripe require your endpoint to return 2xx within a specific timeframe. Testing that your real endpoint returns the correct status code — and that the processor accepts it — is something you can validate by first testing the flow with Webhook.site.
Limitations of Webhook.site's Custom Response Feature
Webhook.site's custom response feature works for basic testing, but there are real limitations that affect developer workflows:
1. No Conditional Responses
You set one response for all incoming requests. In real-world scenarios, you might want to return 200 for valid payloads and 400 for malformed ones. Webhook.site doesn't support conditional response logic based on the incoming request.
2. Manual Page Refresh
After configuring your custom response and sending a test webhook, you have to manually refresh the page to see the incoming request. There are no real-time updates, which slows down the test-debug cycle significantly.
3. Short-Lived Free URLs
Free Webhook.site URLs expire after a limited number of requests. If you're iterating on a webhook integration over several days, you'll need to reconfigure your URL (and your custom response settings) repeatedly.
4. No Search or Filter
When testing retry behavior with a 503 status code, you'll generate many requests. Webhook.site doesn't offer search or filtering, so finding a specific request in a long list means scrolling manually.
5. No Webhook Replay
Once you've changed your custom response from 503 back to 200, you can't replay earlier failed webhooks to test the recovery path. You have to re-trigger the webhook from the sending service.
6. No Smart Payload Parsing
Webhook.site shows raw JSON. When you're testing Stripe webhook responses, you have to manually dig through hundreds of lines to find the event type, payment amount, or customer ID.
HookRay: A Better Alternative for Custom Response Testing
HookRay is a modern webhook testing tool built for developers who test webhooks as part of their regular workflow. While custom response configuration is important, HookRay focuses on the entire testing experience.
Persistent URLs
HookRay Pro gives you 10 permanent webhook URLs. Configure your custom response once and use the same URL across testing sessions, staging environments, and team workflows. No more reconfiguring URLs every time they expire.
Real-Time Updates
When a webhook arrives, it appears in your dashboard instantly via WebSocket. No manual refresh. When you're testing custom response behavior with different status codes, this real-time feedback loop saves significant time.
Webhook Replay
Changed your response from 503 to 200? Replay the original webhook to test the recovery path without re-triggering from the sending service. This is especially valuable for testing retry and recovery flows.
Search and Filter
Testing retry logic generates many requests. HookRay lets you search and filter by headers, body content, timestamp, and more. Find the exact request you need in seconds.
Smart Payload Parsing
HookRay automatically detects 50+ services (Stripe, GitHub, Shopify, Slack, and more) and highlights the key fields. Instead of scrolling through raw JSON, you see the event type, amount, and status at a glance.
Team Collaboration
Share webhook URLs and test results with your team on the $19/month Team plan. No need for everyone to set up their own testing environment.
Comparison: Webhook.site vs HookRay for Custom Response Testing
| Feature | Webhook.site | HookRay |
|---|---|---|
| Custom response status code | Yes | Coming soon |
| Custom response body | Yes | Coming soon |
| Custom response headers | Yes | Coming soon |
| Conditional responses | No | Planned |
| Real-time request updates | No (manual refresh) | Yes (WebSocket) |
| Persistent URLs | 1 (paid, $9/mo) | 10 (paid, $9/mo) |
| Webhook replay | No | Yes |
| Search & filter | No | Yes |
| Smart payload parsing | No | Yes (50+ services) |
| Team sharing | $69/mo (Enterprise) | $19/mo (Team) |
| Dark theme | No | Yes |
| Free requests | 50 | 100 |
Webhook.site has the edge today for custom response configuration specifically. But for everything else in the webhook testing workflow — seeing requests in real-time, replaying webhooks, searching through history, and understanding payloads — HookRay delivers a significantly better experience.
When to Use Each Tool
Use Webhook.site when:
- You specifically need custom response codes for a quick, one-off test
- You need workflow automation (Custom Actions)
- You need very long history retention (365 days on paid plans)
Use HookRay when:
- You test webhooks regularly as part of your development workflow
- You need real-time updates without refreshing the page
- You want to replay webhooks to test retry and recovery logic
- You need to search and filter through request history
- You work with Stripe, GitHub, Shopify, or other popular services and want smart payload parsing
- You need team sharing without paying $69/month
Getting Started with HookRay
Getting a webhook URL takes less than 10 seconds:
- Go to hookray.com/app
- Your unique webhook URL is created instantly — no signup required
- Point your service's webhook settings to your HookRay URL
- Watch incoming webhooks appear in real-time
For persistent URLs, replay, and search, upgrade to HookRay Pro at $9/month — the same price as Webhook.site, with more features included.
Conclusion
Setting custom response codes on Webhook.site is a useful capability for testing how services handle different HTTP status codes. The process is simple: open the custom response UI, set your status code and body, and test.
But webhook testing is more than just configuring responses. The real productivity gains come from real-time updates, webhook replay, search, and smart parsing — features that make the entire test-debug cycle faster. If you test webhooks regularly, HookRay is the better tool for the job.
Try HookRay free — no signup, no credit card. Get your webhook URL in 5 seconds.
Ready to test your webhooks?
Get a free webhook URL in 5 seconds. No signup required.
Start Testing — Free