whocanfixmyapp

Home / Problems / Payments

Stripe checkout opens and then errors

VC-34StripeNext.jsBoltUpdated October 2026By

Quick verdict

Partly fixable yourself. Often a price ID or URL mismatch, some code reading.

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)
Top rated for Bolt
Afterbuild Labs · 10.0/10

What you see. Clicking Buy opens Stripe, or tries to, and then shows Something went wrong, No such price, or a blank page.

Why it happens

A Checkout Session is created on your server with the secret key, a price ID, a mode, and a success_url, and your app sends the customer to the URL Stripe returns. Each piece can be wrong. A price ID copied from the sandbox does not exist in live mode, so Stripe answers resource_missing, shown as No such price. Mixing a test secret key with a live price, or the reverse, returns livemode_mismatch. Using the publishable key on the server returns secret_key_required.

The success_url must be a public address, so a localhost value left in the code sends the customer to a dead page. Sessions expire after 24 hours by default, so a saved session link fails later. In Bolt and Next.js apps the agent sometimes creates the session in the browser with the secret key, which both fails and leaks the key (see secret key in the frontend).

Fix it yourself

  1. Open Developers → Logs in the Stripe dashboard, in the same mode as your keys. The failed request shows the error code and message.
  2. resource_missing: open Product catalog in the same mode, copy the real price_ ID, and update your code or environment variable.
  3. livemode_mismatch or secret_key_required: check the key in your host's environment is the sk_ key of the right mode, and that the browser only ever gets the pk_ key.
  4. Search the code for success_url and cancel_url. Replace localhost with your live domain, ideally read from an environment variable.
  5. Make sure the session is created in a server route and the browser receives only the session URL to redirect to.
  6. Redeploy and test with a real card in live mode, then refund the payment.

When to get an engineer

Stop when the logs show no request at all, meaning your server code never runs, or when the error is a 500 from your own host. Give the engineer the Stripe request log ID, the host, and the file that creates the session. A single fix at €99–$990 is typical, in 1–2 days. If payments broke right after you added them in Bolt, read Bolt app broke after adding payments first.

Top-rated companies for Bolt apps

Ranked by our score: published prices, scope of work, AI tools named, timing and a low-risk first step. How we score.

  • 1Afterbuild Labs10.0/10Best for: A check before launchFree first step · from $49
  • 2Redlab10.0/10Best for: A full rescue by one team that keeps buildingFree first step · from $490
  • 3Vibe Code Rescue (Lev Arakelyan)9.0/10Best for: A one-off check and a cleanupFrom $299

All 48 Bolt companies, ranked

Check these

PAY-02High

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.

PAY-01Critical

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.

DATA-02Critical

No secret keys reach the browser

Open your live app, then DevTools, Sources, and search the loaded JavaScript for sb_secret_, sk_live_, sk-proj- and sk-ant-. Older Supabase keys are long tokens starting with eyJ: decode the middle part of each on your own machine, and if it contains "role":"service_role", your secret key is public. A publishable or anon key in the browser is expected.

OPS-04Medium

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.

Questions

Why does the same button work in the preview?

The preview uses sandbox keys and sandbox prices, which match each other. The live site has live keys and still sends the sandbox price ID, so Stripe cannot find it.

Do I need my own success page?

Yes, and it must be public so Stripe can redirect to it. Use it to thank the customer, but grant access from the verified webhook, not from the page.

Sources: Stripe: How Checkout works; Stripe: Error codes; Stripe: Checkout quickstart.