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 checkout

  • A 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

  1. Verify your API keys. Check that your production servers use sk_live_... keys and your staging/test environments use sk_test_... keys.

  2. Inspect the card number. If it starts with common test BIN ranges (like 4242), it's a test card being submitted to live mode.

  3. Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.

  4. 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 checkout

  • A 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

  1. Verify your API keys. Check that your production servers use sk_live_... keys and your staging/test environments use sk_test_... keys.

  2. Inspect the card number. If it starts with common test BIN ranges (like 4242), it's a test card being submitted to live mode.

  3. Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.

  4. 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 checkout

  • A 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

  1. Verify your API keys. Check that your production servers use sk_live_... keys and your staging/test environments use sk_test_... keys.

  2. Inspect the card number. If it starts with common test BIN ranges (like 4242), it's a test card being submitted to live mode.

  3. Check environment variable configuration. Mixed keys across environments is the most common cause in multi-region or multi-tenant deployments.

  4. 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.

FlyCode partnered with Stripe, to turn failed payment intro revenue.

With our newest Stripe app, you can stop chasing your customers about their failed payments and recover more payments with zero development work.

With our newest Stripe app, you can stop chasing your customers about their failed payments and recover more payments with zero development work.

Backed and Recognized by

Visa Everything Award 2024
Logo for Stripe with the text "Find it on the Stripe App Marketplace" on a dark background.
NVIDIA Inception Program logo, featuring the NVIDIA logo and text in a clean, modern design.

© NVIDIA, the NVIDIA logo are registered trademarks of NVIDIA Corporation in the U.S. and other countries.

Ask AI For Info

2027 We're ahead ©FlyCode. All Right Reserved.

Backed and Recognized by

Visa Everything Award 2024
Logo for Stripe with the text "Find it on the Stripe App Marketplace" on a dark background.
NVIDIA Inception Program logo, featuring the NVIDIA logo and text in a clean, modern design.

© NVIDIA, the NVIDIA logo are registered trademarks of NVIDIA Corporation in the U.S. and other countries.

2027 We're ahead ©FlyCode. All Right Reserved.

Ask AI For Info