Payments Preflight · Check 15 of 15
Test with the Stripe CLI, test cards and test clocks
Forward webhooks locally with stripe listen, trigger events with stripe trigger, use Stripe test cards for declines and 3D Secure, and use test clocks for renewals.
What it is
Stripe gives you tools to test without real money: the Stripe CLI, test card numbers and test clocks that move a subscription forward in time.
Why it matters
Renewals, declines and authentication only happen later or rarely. If you never test them, you find out from real customers.
How to check
- Can you run
stripe listen --forward-to localhost:3000/api/stripe/webhookand see events handled? - Have you paid with a decline card and an authentication card, not only
4242 4242 4242 4242? - Have you seen a subscription renew and fail to renew in a sandbox?
How to fix it
- Use
stripe trigger checkout.session.completedand other events to exercise your handler. - Test
4000 0000 0000 0002(generic decline) and4000 0027 6000 3184(always requires authentication). - Create a test clock, attach a customer and subscription, and advance time to a renewal.
stripe listen --forward-to localhost:3000/api/stripe/webhook
stripe trigger checkout.session.completed
stripe trigger invoice.payment_failedPrompt for your AI coding tool
Paste into Cursor, Claude Code, Lovable or similar. Review the diff before you accept it.
Write a short payments test plan for this app using the Stripe CLI (stripe listen and stripe trigger), Stripe test cards (4242 4242 4242 4242 success, 4000 0000 0000 0002 decline, 4000 0027 6000 3184 authentication) and test clocks for subscription renewals and failed renewals. For each case, list the expected database and UI state.
Sources
- Stripe CLI Stripe docs
- Testing: test cards Stripe docs
- Test clocks Stripe docs
Sponsor this page: get in touch.