Guide

Stripe test mode to live: the switch-over checklist for Lovable, Bolt and Cursor apps

Last checked 16 Nov 2026 · 5 min read · by Ship Weekend

Short answer: switching Stripe from test mode to live is "mostly a matter of swapping your API keys", in Stripe's own words.¹ The catch is the word mostly. Test (sandbox) and live are separate worlds: each has its own keys, and products, prices, coupons and webhook endpoints made in a sandbox don't exist in live mode.¹ ² So you swap the keys, recreate the products and prices, register a live webhook endpoint with its own signing secret, then check the deployed site really changed.

Why apps get stuck in test mode

AI app builders usually wire Stripe up with test keys, which is the right way to build. The problems start when you launch:

The result is the worst kind of bug: everything looks fine to you, but real customers either can't pay or pay and get nothing.

How to tell which mode your live site is in

Stripe keys say their mode in the prefix:²

Key Sandbox (test) Live Safe in the browser?
Publishable pk_test_… pk_live_… Yes
Restricted rk_test_… rk_live_… No, server only
Secret sk_test_… sk_live_… No, server only

Open your live site (not the preview), view the page source or the JavaScript files, and search for pk_test_. If it's there, real cards won't work. If you find any sk_ or rk_ key in the browser at all, test or live, treat it as leaked: roll it in the Stripe Dashboard straight away.²

The switch-over checklist

1. Finish activating your Stripe account

Live mode needs your business and payout details filled in. Do this first, because it can take a while to review and you can't take real payments until it's done.

2. Recreate products and prices in live mode

Sandbox products, prices, plans and coupons aren't usable in live mode.¹ Recreate them in live mode. Stripe suggests keeping the same IDs where you can so your code keeps working.¹ If your app stores price_… IDs in code or in a database table, update them to the live IDs. If you used Stripe Payment Links, create new links in live mode too, because the sandbox ones only take test cards.

3. Swap the keys, in the right places

4. Register the live webhook endpoint

Your account can have separate test and live webhook endpoints, so add the endpoint again in live mode and subscribe it to the same events (for example checkout.session.completed).¹ Register the final URL. Stripe treats a redirect (http to https, or root to www) as a failed delivery.³

5. Use the live signing secret

Each endpoint has its own signing secret, and webhook secrets are separate from API keys.² Copy the live endpoint's whsec_… into your server secrets. A sandbox or Stripe CLI secret in production is the classic cause of "No signatures found matching the expected signature".³ Our Stripe webhooks with Supabase guide covers the full setup.

6. Make the webhook handler production-proof

Stripe's go-live checklist asks that your live endpoint handles delayed events, duplicate events, and events arriving in any order.¹ In practice: store each event.id and skip ones you've seen, and don't assume invoice.paid arrives after customer.subscription.created.

7. Test one real payment, then refund it

Make one low-value live payment with a real card, confirm your app unlocked whatever it should, check the webhook delivery shows 2xx in the Dashboard, then refund it. Stripe also suggests getting someone who isn't a developer to try it.¹

Quick checklist

FAQ

Is switching Stripe to live mode just changing the keys? Mostly, but not only. Stripe says it's "mostly a matter of swapping your API keys", but sandbox products, prices, coupons and webhook endpoints don't carry over, so you also recreate those in live mode and use the live webhook signing secret.¹ ²

How do I know if my live site is still in Stripe test mode? Search the live site's page source and JavaScript for pk_test_. Live publishable keys start with pk_live_.² The free Quick Check flags a Stripe test key on your live site automatically.

Why do payments work but my app doesn't update after going live? Usually the webhook was only registered in the sandbox, or the server still has the sandbox signing secret. Add a live endpoint and use its own whsec_… secret.¹ ³

Is it safe to have my Stripe publishable key in front-end code? Yes. Publishable keys are designed for the browser. Secret (sk_) and restricted (rk_) keys are not, and should only live on your server.²


Not sure yours switched over? The free Quick Check looks for Stripe test keys and leaked secret keys on your live site in about a minute. The $49 Launch Check goes further, including whether your webhook accepts unsigned events (with your permission), and tells you what to fix in plain English with copy-paste prompts for Lovable, Bolt or Cursor. We never ask for your keys or account access.

Sources

  1. Stripe docs, Go-live checklist: https://docs.stripe.com/get-started/checklist/go-live
  2. Stripe docs, API keys (sandbox vs live, key prefixes, restricted keys, webhook signing secrets): https://docs.stripe.com/keys
  3. Stripe docs, Receive Stripe events in your webhook endpoint: https://docs.stripe.com/webhooks