Error codes
Soft decline
Stripe
testmode_decline
A Stripe test card number was used.
What does testmode_decline mean?
The testmode_decline code is returned when a test-mode card is used against Stripe's live API, or when a live card is sent through a test-mode integration. It is not a real payment failure — it's a configuration or environment mismatch between your integration and the card being charged.
Is it a soft or hard decline?
testmode_decline is technically classified as a soft decline, but it should never appear on a real production transaction. If you're seeing it in production, your integration is using the wrong API keys or something similar.
Common root causes
Stripe test API keys being used in a production environment
A customer entered a Stripe test card number (e.g.,
4242 4242 4242 4242) in your live checkoutA staging environment pointing at live keys by mistake, or vice versa
Developer tools or automation using test cards against the live API
Recommended recovery steps
Verify your API keys. Check that your production servers use
sk_live_...keys and your staging/test environments usesk_test_...keys.Inspect the card number. If it starts with common test BIN ranges (like
4242), it's a test card being submitted to live mode.Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.
Ask the customer to re-enter a real card. If it was a genuine mistake on their side, they'll enter a valid production card.
How FlyCode handles testmode_decline
FlyCode operates exclusively against your live processing environment, so testmode_decline codes are a signal that something upstream is misconfigured — not a recovery opportunity. FlyCode surfaces these declines clearly in its dashboard so merchants can quickly identify and fix the underlying integration issue, and excludes them from recovery attempts since they don't represent real customer payment failures.
What does testmode_decline mean?
The testmode_decline code is returned when a test-mode card is used against Stripe's live API, or when a live card is sent through a test-mode integration. It is not a real payment failure — it's a configuration or environment mismatch between your integration and the card being charged.
Is it a soft or hard decline?
testmode_decline is technically classified as a soft decline, but it should never appear on a real production transaction. If you're seeing it in production, your integration is using the wrong API keys or something similar.
Common root causes
Stripe test API keys being used in a production environment
A customer entered a Stripe test card number (e.g.,
4242 4242 4242 4242) in your live checkoutA staging environment pointing at live keys by mistake, or vice versa
Developer tools or automation using test cards against the live API
Recommended recovery steps
Verify your API keys. Check that your production servers use
sk_live_...keys and your staging/test environments usesk_test_...keys.Inspect the card number. If it starts with common test BIN ranges (like
4242), it's a test card being submitted to live mode.Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.
Ask the customer to re-enter a real card. If it was a genuine mistake on their side, they'll enter a valid production card.
How FlyCode handles testmode_decline
FlyCode operates exclusively against your live processing environment, so testmode_decline codes are a signal that something upstream is misconfigured — not a recovery opportunity. FlyCode surfaces these declines clearly in its dashboard so merchants can quickly identify and fix the underlying integration issue, and excludes them from recovery attempts since they don't represent real customer payment failures.
What does testmode_decline mean?
The testmode_decline code is returned when a test-mode card is used against Stripe's live API, or when a live card is sent through a test-mode integration. It is not a real payment failure — it's a configuration or environment mismatch between your integration and the card being charged.
Is it a soft or hard decline?
testmode_decline is technically classified as a soft decline, but it should never appear on a real production transaction. If you're seeing it in production, your integration is using the wrong API keys or something similar.
Common root causes
Stripe test API keys being used in a production environment
A customer entered a Stripe test card number (e.g.,
4242 4242 4242 4242) in your live checkoutA staging environment pointing at live keys by mistake, or vice versa
Developer tools or automation using test cards against the live API
Recommended recovery steps
Verify your API keys. Check that your production servers use
sk_live_...keys and your staging/test environments usesk_test_...keys.Inspect the card number. If it starts with common test BIN ranges (like
4242), it's a test card being submitted to live mode.Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.
Ask the customer to re-enter a real card. If it was a genuine mistake on their side, they'll enter a valid production card.
How FlyCode handles testmode_decline
FlyCode operates exclusively against your live processing environment, so testmode_decline codes are a signal that something upstream is misconfigured — not a recovery opportunity. FlyCode surfaces these declines clearly in its dashboard so merchants can quickly identify and fix the underlying integration issue, and excludes them from recovery attempts since they don't represent real customer payment failures.
Understanding This Decline Code
Extended content body
Frequently Asked Questions
Is testmode_decline a soft or hard decline?
How do I identify a test card?
Stripe's documented test cards include numbers like 4242 4242 4242 4242. Any card number from Stripe's test BIN ranges will trigger testmode_decline when sent through live mode.
Does FlyCode encounter testmode_decline?
FlyCode operates in live mode only and never encounters testmode_decline in production. If you see it on a real customer charge, your Stripe keys are misconfigured — switch to live API keys to resolve it.

