Test webhooks locally
Forward captured webhooks to your local development server. Debug payment, notification and integration webhooks.
The problem
Payment providers, messaging platforms and other services send webhooks to a public URL. During development, your local machine is not reachable from the internet, making webhook integration difficult to test.
How ammo.tools solves it
Configure the external service to send webhooks to your ammo.tools capture URL. The CLI client polls for new captures and forwards them to your local development server. No tunnels, no public exposure.
Setup
- Create a webhook endpoint in your ammo.tools project. Copy the capture URL shown on the endpoint page.
- Configure your external service (Stripe, Twilio, etc.) to send webhooks to this capture URL.
- Download the CLI client and run it locally:
curl -O https://app.ammo.tools/static/cli/ammo-listen.py export AMMO_TOOLS_API_KEY=your_api_key python3 ammo-listen.py --endpoint whe_xxx --to http://localhost:3000
- Trigger a webhook from the external service. It arrives at your local server within seconds.
How it works
The CLI client polls the ammo.tools API for new captures on your endpoint. When a webhook arrives, the client reconstructs the original request (method, headers, body) and sends it to your local target URL. The original path is appended to your target base URL.
Replay recent captures
python3 ammo-listen.py --endpoint whe_xxx --to http://localhost:3000 --replay-last 5
Replays the five most recent captures before starting the live poll.
Check delivery status
curl -H "Authorization: Bearer $AMMO_TOOLS_API_KEY" \ "https://app.ammo.tools/api/v1/requests/REQ_ID/deliveries"
Shows the HTTP status and timing of each local delivery attempt.
Things to know
- All plans include localhost forwarding. The number of saved forward targets varies by plan; see pricing.
- Forwarding happens client-side. The CLI runs on your machine and makes requests to localhost.
- The CLI requires Python 3.10 or later with no additional dependencies.
- Use
--intervalto adjust polling frequency (1-60 seconds, default 2). - Captured webhooks are stored in the EU. See the data processing agreement for details.