Relay Rules
Forward webhooks to localhost or other URLs automatically
What are relay rules?
A relay rule automatically forwards captured webhooks to another URL. When a request hits your ThunderHooks endpoint, the relay sends a copy to your target — your local dev server, a staging environment, or another service.
This replaces the need for tools like ngrok when testing webhooks locally.
Setting up a relay
- Go to your endpoint and click Relays
- Click New Relay Rule
- Enter a name and the target URL (e.g.
http://localhost:3000/webhooks/stripe) - Enable the rule
Now every webhook that hits your ThunderHooks endpoint also gets forwarded to your local server.
Target URL
The relay sends the original request body and headers to your target URL using the same HTTP method. Your target receives essentially the same request the webhook provider sent.
For local development, you'll need your machine to be reachable. The relay forwards from ThunderHooks servers, so localhost URLs won't work directly — use your machine's public IP or a tunnel.
Retries
Relay rules support automatic retries if the target returns an error or is unreachable:
- Max retries — how many times to retry (default: 3)
- Backoff — delay between retries in milliseconds
Filtering
You can add filter conditions to only relay certain requests. Filters match against request headers, method, or body content.
Execution history
Each relay rule tracks its forwarding history. Click into a rule to see:
- Target URL and status (success/failure)
- Response status code from your server
- Duration and retry attempts
- Error messages if something went wrong
Credits
Each relay execution consumes 1 credit from your account balance.