Fix · Paid users still locked out? Webhooks, paused hosting and AI bills

Stripe works in test mode but not in live mode

Checkout and your payment calls succeed with test keys, then fail once the app runs on live keys. Common causes are an account that has not been set up for live payments, test keys or test objects left in production, and a live webhook endpoint that is missing or using the wrong secret.

Likely causes, most common first

Cause 1 · in 1 of 1 matching case

The Stripe account is not yet set up for live payments

Stripe says that to accept real payments, you set up your Stripe account and use live API keys in your integration. Swapping the keys covers the second half; the account setup is separate.

How to tell: The same code succeeds with test keys, and the live-mode request logs show the error Stripe returned for the call.

Cause 2

Test keys or test objects are still in the live deployment

Each mode has its own API keys, and objects in one mode are not accessible to the other. Stripe also states that objects created in a sandbox, such as plans, coupons and products, are not usable in live mode.

How to tell: The key prefix in the live environment is pk_test_ or sk_test_.

Cause 3

The live webhook endpoint is missing or uses the test signing secret

Test and live webhook endpoints are defined separately, and each endpoint has its own signing secret. If no live endpoint exists, or the app still holds the test whsec_ value, payments can succeed in Stripe while your app does not grant access.

How to tell: Payments appear in the live Dashboard, but the live endpoint shows no deliveries or shows failed ones, and signature verification errors appear in your logs.

Check and fix it, step by step

  1. Check which key the live deployment uses

    Print just the prefix of the server key in the production environment. A live server key starts with sk_live_ or rk_live_, and the publishable key in the client starts with pk_live_.

    echo "$STRIPE_SECRET_KEY" | cut -c1-8

    Docs: docs.stripe.com →

  2. Read the live-mode request logs for the failing call

    In the Dashboard, switch to live mode and open Workbench request logs. Find the request that creates the Checkout session or payment and read the error Stripe returned. Don't rely on the error page your app shows.

    Docs: docs.stripe.com →

  3. Put live keys in the server environment

    Replace the test keys with the live publishable key in client code and the live secret or restricted key on the server. Store the server key in a secrets vault or an environment variable, then redeploy.

    STRIPE_SECRET_KEY=sk_live_...

    Docs: docs.stripe.com →

  4. Recreate sandbox objects in live mode

    Objects made in a sandbox are not usable in live mode. Recreate the plans, coupons and products your code uses in live mode, with the same ID values your code refers to.

    Docs: docs.stripe.com →

  5. Register a live webhook endpoint and use its own signing secret

    Create the endpoint in live mode, copy its signing secret into the production environment, and confirm it behaves like the test endpoint. Keep the request body unparsed until verification has run, because any change to the raw body makes verification fail.

    Docs: docs.stripe.com →

  6. Resend events that were missed

    Once the endpoint verifies correctly, resend the failed live events from the Dashboard or with the CLI, then check that access was granted. Stripe retries live deliveries for up to three days, so some events may arrive on their own.

    stripe events resend <event_id> --webhook-endpoint=<endpoint_id>

    Docs: docs.stripe.com →

Quick check: Confirm the live environment's key starts with sk_live_ or rk_live_, then read the live-mode Workbench request logs for the failing Checkout call.

With Gemmein

On Gemmein each environment holds its own Stripe restricted key: rk_test_… in Development and rk_live_… in Live, and a test-mode key in Live is refused. Going live never copies Development's Stripe objects, Payment Links or signing secret; Live makes its own once an rk_live_ key is connected there, and Gemmein registers the webhook endpoint itself, holds the endpoint's signing secret, and checks the webhook every 6 hours.

How often this shows up in our data

1 of the 853 verified cases from the last 12 months in our data match this symptom (0.1%). The most common cause was “The Stripe account is not yet set up for live payments” (1 of 1). How we collect and verify cases.

Questions

Why does Stripe work in test mode but not in live mode?

Each mode has its own API keys and its own objects, so anything created or configured in the sandbox has to be repeated for live mode. Stripe also says you set up your account to accept real payments.


Does switching the Dashboard to live mode change what my code does?

Stripe states that being in a sandbox in the Dashboard does not affect your integration code, and that your test and live mode API keys affect how your code behaves.


Can I reuse my test products in live mode?

Stripe says objects created in a sandbox, such as plans, coupons and products, are not usable in live mode. Recreate them in live mode with the same ID values.


Do I need a different webhook signing secret for live mode?

Stripe generates a unique secret for each endpoint. If you use one endpoint for both test and live API keys, the secret is different for each.


Sources

Every cause and step above was checked against these pages on 24 Nov 2026.

The broader pattern

This is one symptom of a wider failure pattern: Paid users still locked out? Webhooks, paused hosting and AI bills. The guide covers every cause we see for it, on any stack.

Get a heads-up when Stripe breaks something

Stripe

Leave your email and we'll let you know when something big changes for Stripe. Unsubscribe any time by replying. Gemmein Limited. Research terms · Privacy

← All fixes