How to Debug Stripe Webhooks
Capture Stripe events, inspect the raw payload, verify signatures, and replay deliveries against your handler.
Last updated: 2026-06-24
To debug Stripe webhooks, capture the real request, keep the raw body unchanged, verify the Stripe-Signature header, and replay the event into your staging handler.
Steps
- Create a WebhookPilot URL.
- Set it as a Stripe webhook endpoint.
- Trigger a test event from Stripe.
- Verify the signature and inspect the event type.
- Replay the captured request to your app.
Example
curl -X POST "https://your-domain.com/hook/stripe-test" \
-H "Content-Type: application/json" \
-H "Stripe-Signature: t=123,v1=test" \
-d '{"id":"evt_123","type":"payment_intent.succeeded"}'
Common mistakes
- Parsing JSON before signature verification
- Ignoring duplicate event delivery
- Testing only synthetic payloads instead of real Stripe events
FAQ
Why does Stripe verification fail so often?
Because frameworks often alter whitespace, encoding, or body parsing before the HMAC check.
Should I store Stripe event IDs?
Yes. Use them for idempotency and duplicate protection.
See also Stripe webhook signature verification.