Stripe · Decline codes
What does the Stripe testmode_decline decline code mean?
Checked
The Stripe decline code testmode_decline means a Stripe test card number was used, so the payment could not go through. Test cards only work in Stripe's test mode; a real payment needs a genuine card. Stripe declines it itself before any bank is involved. The fix is simple: pay with a real card, and make sure test card numbers are never used on a live store.
- Type
- Not a bank decline
- Who declined
- Stripe
- Retry
- Only with a genuine card
- Shopper action
- Use a real card
- Merchant action
- Check no test card numbers are used in live mode
What PlatformDTC does
PlatformDTC treats testmode_decline as never-retry at checkout and does not route it to the backup processor; the shopper is asked for a genuine card. On renewals it is never retried either: the subscription is held past due and the customer gets a one-click link to add a real card, which also exposes a test card saved on a live subscription.
Why it happens
Someone entered one of Stripe's published test card numbers in a live payment, often while testing a store that has already gone live, or a bot trying numbers it found online.
What the store can do
Test with Stripe's test mode only. If you see many testmode_decline attempts from unknown visitors, it can be a sign of automated card testing; review your fraud and bot protection.
For developers
decline_code = testmode_decline is set by Stripe on live-mode requests using test card numbers. Use test API keys with test cards, and live keys with real cards.
Frequently asked questions
- Did a bank decline testmode_decline?
- No. Stripe declined it because the card number is a test number.
- Can I accept test cards on my live store?
- No. Stripe test cards only work with test API keys. A live payment needs a genuine card.
Sources
- Stripe decline codes — Stripe
Related
- incorrect_number — The card number entered is wrong.
- invalid_number — The card number is incorrect.
- fraudulent — Stripe's fraud checks suspected the payment was fraudulent and blocked it.
- transaction_not_allowed — The bank declined; the card does not allow this type of transaction.
- try_again_later — Deprecated code: the bank declined for an unknown reason; try again later.
- withdrawal_count_limit_exceeded — The customer has gone over the balance or credit limit available on the card.
- mobile_device_authentication_required — The payment needs authentication; the customer should tap their phone again.
- card_declined — Stripe's error code for any declined card; the decline_code says why.