Workflow 003: Webhook Testing Workflow ​
FreshUse ngrok to receive webhooks from external services (Stripe, GitHub, Slack, etc.) during local development.
Decision Tree ​
Step-by-Step ​
1. Start Your Webhook Handler ​
bash
# Example: Express.js webhook endpoint
node webhook-server.js
# Listening on http://localhost:3000/webhooks2. Start ngrok ​
bash
ngrok http 3000Note the forwarding URL, e.g. https://abc123.ngrok-free.app
3. Configure the External Service ​
Set the webhook URL in your service's settings:
https://abc123.ngrok-free.app/webhooks4. Trigger and Inspect ​
- Trigger a test event from the external service
- Watch the ngrok console for incoming requests
- Check your local handler's logs for processing
5. Iterate ​
The ngrok console shows full request/response details. Use this to debug:
- Request headers
- Request body
- Response status code
- Response body
Common Webhook Services ​
| Service | Where to Configure |
|---|---|
| Stripe | Dashboard > Developers > Webhooks |
| GitHub | Repository > Settings > Webhooks |
| Slack | App Config > Event Subscriptions |
| Twilio | Console > Phone Numbers > Webhook |
| Discord | Server Settings > Integrations > Webhooks |
| Shopify | Settings > Notifications > Webhooks |
Tips ​
Stable URL for Development
Use a reserved domain so you don't have to reconfigure webhooks every time you restart ngrok:
bash
ngrok http 3000 --url https://webhooks-dev.ngrok.appReplay Requests
The ngrok web interface at http://localhost:4040 lets you inspect and replay webhook requests for debugging.