Loading...
Loading...
Testing webhooks during development can be frustrating. Your local server isn't accessible from the internet, so services like Stripe or GitHub can't reach it. Here's how to solve that without deploying anything.
When you're building a feature that relies on webhooks, you face a chicken-and-egg problem: the webhook provider needs a publicly accessible URL to send events to, but your development server is running on localhost.
Traditional solutions involve deploying to a staging server every time you want to test, or setting up complex tunneling software. Both approaches slow down your development cycle significantly.
Instead of making your local server accessible, use a webhook capture service like Webhook.it. You get a public URL instantly that captures all incoming requests. You can then inspect the payloads and use them to develop your webhook handler.
Visit the Webhook.it homepage. A unique URL is automatically generated for you. No signup required.
Go to your webhook provider's dashboard (Stripe, GitHub, Shopify, etc.) and paste your Webhook.it URL as the endpoint. Enable the events you want to test.
Most providers have a "Send test webhook" button. Or trigger a real event in test mode (create a test payment, push a commit, etc.).
Return to Webhook.it and see the captured request. Inspect the headers and JSON body. Use this information to build your webhook handler locally.
Here's what a captured Stripe checkout webhook looks like:
{
"id": "evt_1234567890",
"type": "checkout.session.completed",
"data": {
"object": {
"id": "cs_test_abc123",
"amount_total": 2000,
"currency": "usd",
"customer_email": "customer@example.com",
"payment_status": "paid"
}
}
}With this payload, you can write your handler code knowing exactly what fields are available, without deploying anything.
Want to test your endpoint immediately? Use curl to send a sample payload:
curl -X POST https://webhook.it/api/{your-endpoint-id} \
-H "Content-Type: application/json" \
-d '{"event": "test", "data": {"message": "Hello!"}}'