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

How to fix it

  1. Use stripe trigger checkout.session.completed and other events to exercise your handler.
  2. Test 4000 0000 0000 0002 (generic decline) and 4000 0027 6000 3184 (always requires authentication).
  3. 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_failed

Prompt 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

All payments checks

Sponsor this page: get in touch.

Get new checks by email

New checks and real leak post-mortems, about once a month. No spam.