Stripe·Fixpaymentsintermediate

Stripe Payment Form Shows an Error or the Card Keeps Failing

Quick Answer

How do I fix Stripe Payment Form Shows an Error or the Card Keeps Failing?

Common causes: using test cards in live mode, wrong currency units, or missing return_url for 3D Secure. Start with "Check common causes" before making broader code changes.

Fix signals

What this answers
Why stripe payment form shows an error or the card keeps failing happens and what to change first.
Fastest move
Check common causes
Use this page if
Payment form shows error

If this keeps happening

Open the next decision, not just the patch

Use these when the current fix is helpful, but the real answer is a better tool choice, a cleaner workflow layer, or a more trustworthy launch path.

Quick Fix Summary

Most likely causeCommon causes: using test cards in live mode, wrong currency units, or missing return_url for 3D Secure.
Fastest fixCheck common causes
Use this page ifPayment form shows error

Exact errors people search for

If one of these matches what you are seeing, you are likely on the right fix page.

Stripe payment form shows an error or the card keeps failing
Card is declined in test mode even though the setup looks correct
Payment intent returns an error status before the payment completes

You're in the right place if...

  • !Payment form shows error
  • !Card declined in test mode
  • !Payment intent returns error status

Why this happens

Common causes: using test cards in live mode, wrong currency units, or missing return_url for 3D Secure.

Fix

1

Check common causes

Match your error:

// 1. Using test card in live mode
// Fix: Use 4242 4242 4242 4242 in TEST mode only

// 2. Currency mismatch — amounts in smallest unit
amount: 2000, // = $20.00 (cents for USD)
currency: 'usd',

// 3. Missing return_url for 3D Secure cards
return_url: `${process.env.NEXT_PUBLIC_URL}/payment-complete`

Prevent this next time

Always test with Stripe's test card numbers. Amount is always in the smallest currency unit (cents for USD, pence for GBP).

Frequently Asked Questions

Stripe uses the smallest currency unit. $20.00 USD = 2000 cents. €15.50 EUR = 1550 cents.

4242 4242 4242 4242 for success. 4000 0000 0000 9995 for decline. Any future expiry and 3-digit CVC.

Related fixes