---
title: "Stripe is still in test mode on the live site"
description: "The live site still runs on pk_test_ and sk_test_ keys, sandbox prices, and a sandbox webhook. How to check each piece and switch to live mode safely."
url: https://whocanfixmyapp.com/problems/stripe-still-in-test-mode-on-the-live-site
---

[Home](https://whocanfixmyapp.com/) / [Problems](https://whocanfixmyapp.com/problems) / [Payments](https://whocanfixmyapp.com/problems#payments)

# Stripe is still in test mode on the live site

VC-33 · Stripe · Updated October 2026 · By [Nathaniel Kelley](https://whocanfixmyapp.com/authors/nathaniel-kelley)

Quick verdict

Partly fixable yourself. Key swap plus live products and webhooks.

- **How serious**: High
- **Fix it yourself?**: Partly, some steps need a developer
- **Typical cost**: $49–$800 one-off check, or €99–$990 for a single fix ([prices](https://whocanfixmyapp.com/pricing))
- **Top rated**: [Afterbuild Labs](https://whocanfixmyapp.com/companies/afterbuild-labs) · **10.0**/10

**What you see.** Real customers' cards are declined or payments show only in Stripe's sandbox, and no real money arrives.

## Why it happens

Stripe has two worlds. Sandbox keys start with `pk_test_` and `sk_test_`, live keys with `pk_live_` and `sk_live_`. Stripe says objects in one mode are not accessible to the other, so a sandbox price cannot be part of a live payment and a sandbox customer does not exist in live mode. AI builders are set up with test keys, and the agent rarely moves them.

Going live is more than a key swap. Stripe's go-live checklist says sandbox objects such as products and prices are not usable in live mode and must be recreated, that your account can have both test and live webhook endpoints and you must define live ones, and that the webhook signing secret differs per mode. Real cards fail in a sandbox, and the test card `4242 4242 4242 4242` works only in a sandbox. Until the account is activated for live charges, the API answers with `testmode_charges_only`.

## Fix it yourself

1. Switch the Stripe dashboard from sandbox to live mode, then open **Developers → API keys**. Copy the `pk_live_` key and create or reveal an `sk_live_` key, or better a restricted `rk_live_` key.
2. In your host's environment settings, replace the secret key and publishable key values with the live ones. Never paste them into the code or the chat.
3. In live mode, recreate every product and price under **Product catalog**, then update the `price_` IDs your code sends.
4. In live mode, add a webhook endpoint for your live domain, select the same events as the sandbox endpoint, and copy its new `whsec_` secret into the environment settings.
5. Redeploy, buy the cheapest plan with a real card, confirm the account upgrades, then refund it from the dashboard.
6. If you see `testmode_charges_only`, finish account activation in the dashboard before trying again.

## When to get an engineer

Stop if price IDs are hardcoded across many files, if you cannot find where the keys are stored, or if the app mixes test and live anywhere. Tell the engineer which host runs the app and whether payments also pass through Supabase edge functions. A check is $49–$800, a single fix €99–$990, usually 1–2 days. Ask them to keep the sandbox setup working as well, so you can test safely later, which is our item OPS-02.

## Top-rated companies

Ranked by our score: published prices, scope of work, AI tools named, timing and a low-risk first step. [How we score](https://whocanfixmyapp.com/methodology#score).

- 1 · [Afterbuild Labs](https://whocanfixmyapp.com/companies/afterbuild-labs) · **10.0**/10 · Best for: A check before launch · Free first step · from $49
- 2 · [Redlab](https://whocanfixmyapp.com/companies/redlab) · **10.0**/10 · Best for: A full rescue by one team that keeps building · Free first step · from $490
- 3 · [Vibe Code Rescue (Lev Arakelyan)](https://whocanfixmyapp.com/companies/vibe-code-rescue-lev-arakelyan) · **9.0**/10 · Best for: A one-off check and a cleanup · From $299

[All 79 companies, ranked](https://whocanfixmyapp.com/directory#ranking)

## Check these

PAY-01 · Critical

Paid accounts are unlocked by a verified payment webhook

Access should change only when your server receives a signed webhook from Stripe or your provider, not when the browser reaches a success page.

PAY-02 · High

Prices and plans come from the server

If the price or plan ID is sent from the browser, someone can edit it. The server should look it up.

OPS-04 · Medium

Secrets live in the host's environment settings

Keys belong in environment variables on the server, not in the repository or in front-end code.

OPS-02 · High

Testing and real users use separate databases

Experiments and AI agents should never run against production data.

## Questions

### Why do my test cards fail now?

Test card numbers only work with sandbox keys. Once the live keys are in place, use a real card for a small purchase and refund it from the dashboard.

### Can I keep testing after going live?

Yes. Keep a sandbox with its own keys and its own webhook endpoint for a preview deployment. Stripe recommends a separate general sandbox for new integrations so settings stay isolated.

Sources: [Stripe: API keys](https://docs.stripe.com/keys); [Stripe: Go-live checklist](https://docs.stripe.com/get-started/checklist/go-live.md); [Stripe: Testing use cases](https://docs.stripe.com/test-mode); [Stripe: Error codes](https://docs.stripe.com/error-codes.md).

**Same category**

- [Bolt app broke after I added payments: Stripe, webhooks and what to check](https://whocanfixmyapp.com/problems/bolt-app-broke-after-adding-payments)
- [Customer paid but their account was not upgraded](https://whocanfixmyapp.com/problems/stripe-webhook-not-firing-paid-but-not-upgraded)
- [Stripe checkout opens and then errors](https://whocanfixmyapp.com/problems/stripe-checkout-opens-then-errors)
- [Cancelled subscriptions still have access](https://whocanfixmyapp.com/problems/cancelled-subscriptions-still-have-access)
- [Stripe secret key is in my frontend code](https://whocanfixmyapp.com/problems/stripe-secret-key-in-the-frontend)

[All payments problems](https://whocanfixmyapp.com/problems#payments)

**Run every check**

The [production checklist](https://whocanfixmyapp.com/checklist) has all 24 checks with a verdict.
