Stripe CLI Webhooks & Event Testing

Stripe CLI webhook forwarding, listen, trigger, fixtures, and local integration testing patterns.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Listen and Forward

Forward all events to localhost

bashANYlistenforwardwebhooks
bash
stripe listen --forward-to localhost:3000/api/webhooks/stripe

Filter forwarded events

bashANYlistenevents
bash
stripe listen --events checkout.session.completed,payment_intent.succeeded --forward-to localhost:3000/api/webhooks/stripe

Reuse event config from Dashboard endpoint

bashANYlistenwebhooks-api
bash
stripe listen --load-from-webhooks-api --forward-to localhost:3000

Listen for Connect account events

bashANYlistenconnectwebhooks
bash
stripe listen --forward-connect-to localhost:3000/api/webhooks/connect

Capture the webhook signing secret

Use the signing secret printed by listen to verify incoming events locally.

bashANYsigning-secretverification
bash
stripe listen --forward-to localhost:3000/webhooks

Forward to local HTTPS and skip cert verification

bashANYhttpstlslocal
bash
stripe listen --skip-verify --forward-to https://localhost:8443/webhooks/stripe

Trigger Fixtures and Test Events

Trigger checkout.session.completed

bashANYtriggercheckout
bash
stripe trigger checkout.session.completed

Trigger payment_intent.created

bashANYtriggerpayment-intent
bash
stripe trigger payment_intent.created

Trigger charge.failed

bashANYtriggercharge
bash
stripe trigger charge.failed

Trigger customer.subscription.created

bashANYtriggersubscriptions
bash
stripe trigger customer.subscription.created

Show available trigger fixtures

bashANYtriggerhelp
bash
stripe trigger --help

List checkout-specific trigger fixtures

bashANYtriggercheckouthelp
bash
stripe trigger checkout --help

Inspect Events and Deliveries

List recent events

bashANYeventslist
bash
stripe events list --limit 25

Retrieve one event payload

bashANYeventsretrieve
bash
stripe events retrieve evt_123

List only a specific event type via shell filter

bashANYeventsjqfilter
bash
stripe events list --limit 100 | jq ".data[] | select(.type=="payment_intent.succeeded")"

List webhook endpoints

bashANYwebhook-endpointslist
bash
stripe webhook_endpoints list

Create a webhook endpoint

bashANYwebhook-endpointscreate
bash
stripe webhook_endpoints create --url https://example.com/webhooks/stripe --enabled-events payment_intent.succeeded --enabled-events checkout.session.completed

Delete a webhook endpoint

bashANYwebhook-endpointsdelete
bash
stripe webhook_endpoints delete we_123

Recommended next

No recommendations yet.