Stripe decline code · By Hanzalah Seikhai, Stripe developer
Stripe testmode_decline: a test card used in live mode
testmode_decline means: A Stripe test card was used for a real payment.
Retry? No, use a real card.
Why it happens
- Someone entered a Stripe test card number, such as 4242 4242 4242 4242, on a live checkout.
- If your own team sees this, the frontend may still use a live publishable key while you meant to test.
What to do
- Tell the customer to use a real card.
- Check that each environment has the matching publishable and secret keys, pk_test with sk_test and pk_live with sk_live.
Where to find the code
In the Stripe Dashboard, open the failed payment and read the decline reason. In code, the error from the API has decline_code next to code: card_declined. Some errors also carry an advice_code that says whether a retry can work.
If declines like this are hurting your conversions, I find the cause in your integration and fix it as a fixed-price job. Hire me on Upwork or send the error. All codes are on the Stripe decline codes page.