testmode_declineProcessingrare

Test Mode Decline

What This Means

A test mode card number was used in a live mode transaction, or vice versa. This is a development error, not a customer issue. SaaS businesses should ensure their environment configuration separates test and live API keys.

This decline is not retryable.

Retrying will likely fail again. The customer needs to update their payment method or contact their bank.

Common Causes

  • 1Test card number (e.g., 4242424242424242) used with live API keys
  • 2Environment configuration mixes test and live Stripe API keys
  • 3Developer accidentally deployed test configuration to production

Recovery Tactics

  1. 1Verify your environment is using the correct API keys (live vs test)
  2. 2Check your deployment pipeline for environment variable configuration
  3. 3Ensure test card numbers are not hardcoded anywhere in production code
Free Tool

How healthy is your Stripe account?

Get a free churn health report. Find pending cancellations, failed payments, and expiring cards putting your MRR at risk.

Run Free Audit

FAQ

How do I tell if I am in test or live mode?

Test mode API keys start with sk_test_ and pk_test_, while live mode keys start with sk_live_ and pk_live_. Check your environment variables to ensure the correct keys are being used.

Will customers see this error?

If your production environment is correctly configured, customers should never see this error. If they do, it means your deployment has a configuration issue that needs immediate attention.

Free Tool

How healthy is your Stripe account?

Get a free churn health report. Find pending cancellations, failed payments, and expiring cards putting your MRR at risk.

Run Free Audit