🔧 Unbreak My AppAll fixesFix KitsSponsor

Fixes › Payments

No such price / No such customer (test vs live mode mix-up)

CursorBoltv0Lovable

The error

StripeInvalidRequestError: No such price: 'price_...'

Why it happens

Objects created in test mode don't exist in live mode and vice versa. Using a live secret key with test price IDs (or a key from a different account or sandbox) gives 'No such ...' errors.

How to fix it

  1. Check the key prefix: sk_test_ vs sk_live_.
  2. Recreate products and prices in live mode (or copy them) and use the live IDs in production env vars.
  3. Keep price IDs in env vars per environment, not hard-coded.
  4. Confirm the key and price belong to the same account/sandbox.

Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

Stripe says 'No such price'. Move all Stripe price IDs into env vars (STRIPE_PRICE_...), make sure production uses sk_live_ keys with live-mode price IDs and preview uses test keys with test IDs, and add a startup check that logs (without printing the key) whether the key is test or live.

FAQ

Can I copy test products to live?

Yes, the Dashboard has a 'Copy to live mode' option for products.

Is it a code bug?

Usually not; it's a key/ID mismatch.

Related fixes

Want the full checklist for this area? Get a Fix Kit ($29)

Get one new fix a week

Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.

We only use your email to send the newsletter. Unsubscribe any time. See privacy.