
Test webhooks without writing a server — capture and inspect any HTTP request
Need to test a Stripe webhook? GitHub webhook? Any webhook? You usually need to spin up a server, write a handler, expose it with ngrok... it's a lot of setup for something that should be simple. I added webhook capture to SnapAPI — you get a URL that records every request sent to it. How it works 1. Create a mock API (this also creates a webhook URL) curl -X POST https://snapapi.akokoa1221.workers.dev/api/mock \ -H "Content-Type: application/json" \ -d '{"items": [{"id": 1}]}' Response: { "id" : "abc-123" , "url" : "https://snapapi.akokoa1221.workers.dev/api/mock/abc-123" , "webhookUrl" : "https://snapapi.akokoa1221.workers.dev/api/webhook/abc-123" } 2. Send a webhook to the URL Point your service (Stripe, GitHub, etc.) to the webhook URL. Or test manually: curl -X POST https://snapapi.akokoa1221.workers.dev/api/webhook/abc-123 \ -H "Content-Type: application/json" \ -H "X-Stripe-Signature: whsec_test123" \ -d '{"type": "payment_intent.succeeded", "data": {"amount": 2000}}' 3. Check t
Continue reading on Dev.to Tutorial
Opens in a new tab


