Error fixes / Stripe

Stripe

Stripe: No such price

The price id is from the other mode, from another account, or was deleted.

The error

No such price: 'price_123'

What it means

Stripe returns a resource_missing error, shown as No such price, when the id does not exist in the account and mode you called. Test and live mode each have their own prices. A price id copied from test mode will fail when the server uses a live secret key, and the reverse is also true. Generated apps often hard-code a price_ id from a tutorial.

Fix

  1. Look at the secret key prefix on the server. sk_test calls test mode. sk_live calls live mode. Do not print the rest of the key.
  2. In the Stripe Dashboard, switch to that same mode and open Products. Copy the price id from there.
  3. Put the price id in an environment variable per environment. Test deploys get the test price. Production gets the live price.
  4. Create the Checkout Session on the server with that id. Ignore any price id posted from the browser.
  5. Make one test payment in test mode before you switch the live key.

Prompt

Fix prompt
Paste into Cursor or Claude Code
Checkout fails with No such price and a price_ id.

Stop hard-coding the price id. Read it from an environment variable. Tell me to create a price in the same Stripe mode as the secret key, then set STRIPE_PRICE_ID. Ignore price ids sent from the browser. Do not print secret keys. Show me the server function that creates the Checkout Session.

Questions

The price exists. Why can the API not see it?

It exists in the other mode, or in another Stripe account. Test prices are invisible to live keys. Match the mode of the key and the price.

Can the frontend send the price id?

Only if the server checks it against an allow list you control. A safer pattern is the server choosing the price id from configuration.

Is No such price a card error?

No. Stripe did not try to charge a card. The Checkout Session was never created because the price id was unknown. See Stripe's error types for resource_missing.

Related fixes

Source: Stripe docs: Errors. Updated 14 October 2026.