Stripe CLI webhooks, seen before your handler runs
Run stripe listen --forward-to http://127.0.0.1:8000/stripe. The Stripe CLI then sends every test webhook to Buggregator instead of your app. You see the JSON payload, every header including Stripe-Signature, and a cURL command to send the same request again. Your handler does not run until you point it there.
Steps
1. Start Buggregator
Port 8000 is the web UI and also takes HTTP requests.
docker run --pull always \
-p 127.0.0.1:8000:8000 \
ghcr.io/buggregator/server:latest2. Forward the Stripe CLI to Buggregator
Pick any path, for example /stripe. Buggregator stores any POST or PUT that is not Sentry or another known format as an HTTP dump, so no special URL is needed.
stripe listen --forward-to http://127.0.0.1:8000/stripeLeave it running. It prints the webhook signing secret (whsec_…) for this session.
3. Send a test event
In a second terminal, ask Stripe for an event.
stripe trigger payment_intent.succeeded4. Read the webhook
Open http://127.0.0.1:8000. Each webhook is one HTTP dump: the method, the path, the JSON body as POST data, and all headers, including Stripe-Signature. Buggregator answers 200, so the CLI shows each delivery as accepted.
5. Send it to your handler when you are ready
Copy the cURL command from the dump and change the URL to your app's webhook route. Or restart the CLI with --forward-to pointing at your app.
stripe listen --forward-to http://127.0.0.1:3000/stripe/webhookThe signature includes a timestamp. Stripe's libraries reject an old one by default, so a replayed copy can fail the signature check in your handler.
Why it works
Buggregator treats a POST it does not recognise as an HTTP dump and stores it whole. The Stripe CLI receives events from Stripe over its own connection and posts them to the local URL you give it, so Stripe never needs to reach your machine.
Related tips
- HTTP
See a webhook's payload before you write the handler
Point the webhook URL at Buggregator with http-dump in the URL. See the headers, body and files it sends, plus a cURL command to send it again.
- HTTP
Send a captured request again with one cURL
Every request Buggregator captures comes with a ready cURL command. Copy it, paste it in a terminal, and the same request arrives again.
- HTTP
See every API call your Laravel app sends
Set global proxy options for Laravel's HTTP client in AppServiceProvider. Every Http:: request and response shows up in Buggregator. Local only.
Checked on with Buggregator v2.13.0