Bolt Stripe Checkout Session Returning 400
Quick Answer
How do I fix Bolt Stripe Checkout Session Returning 400?
Bolt is sending Stripe a malformed Checkout request. The most common causes are the wrong price ID, using subscription mode for a one-time price, or passing relative success and cancel URLs instead of absolute URLs. Start with "Verify the Stripe price ID and mode" before making broader code changes.
Fix signals
- What this answers
- Why bolt stripe checkout session returning 400 happens and what to change first.
- Fastest move
- Verify the Stripe price ID and mode
- Use this page if
- Stripe checkout creation fails with a 400 error
If this keeps happening
Open the next decision, not just the patch
Use these when the current fix is helpful, but the real answer is a better tool choice, a cleaner workflow layer, or a more trustworthy launch path.
Bolt reviews
Open this when the prototype came fast but the rebuild cost is starting to show up in auth, deploy, or state problems.
Open this next →
Bolt vs v0
Open this when the real decision is whether you still need a browser-first prototype tool or a stronger frontend base.
Open this next →
Fillout vs Typeform
Open this when forms, onboarding, intake, or checkout are the next workflow layer breaking after the app shell is already in place.
Open this next →
Tool picker
Open this when the payment problem is really making you question the app stack and workflow choice behind it.
Open this next →
Lovable reviews
Open this when repeated billing drift makes you question whether the current generated full-stack path is still worth the cleanup cost.
Open this next →
Quick Fix Summary
| Most likely cause | Bolt is sending Stripe a malformed Checkout request. The most common causes are the wrong price ID, using subscription mode for a one-time price, or passing relative success and cancel URLs instead of absolute URLs. |
| Fastest fix | Verify the Stripe price ID and mode |
| Use this page if | Stripe checkout creation fails with a 400 error |
You're in the right place if...
- !Stripe checkout creation fails with a 400 error
- !The buy button spins and never redirects
- !Stripe logs show an invalid price, mode, or URL
Why this happens
Bolt is sending Stripe a malformed Checkout request. The most common causes are the wrong price ID, using subscription mode for a one-time price, or passing relative success and cancel URLs instead of absolute URLs.
Fix
Verify the Stripe price ID and mode
Check that the price ID exists in the same Stripe mode you are testing and that the Checkout session mode matches the product type.
Make Bolt regenerate the server-side checkout function
Use a precise prompt instead of trying to patch the Stripe call manually.
Copy this prompt
Stripe checkout is returning a 400 error. Please rebuild the checkout session server function so it: 1. uses the correct Stripe price ID 2. uses mode 'payment' for one-time purchases or 'subscription' for recurring plans 3. sends absolute success and cancel URLs 4. returns the Stripe checkout URL cleanly to the frontend
Check the redirect URLs
Stripe requires absolute URLs in production. Do not send '/success' or '/pricing' by themselves.
success_url: `${process.env.NEXT_PUBLIC_APP_URL}/payment-success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}/pricing`Prevent this next time
Keep Stripe price IDs in one configuration file or table. Hardcoding different values in multiple places is the fastest way to create 400 errors.
Frequently Asked Questions
Checkout sessions require absolute return URLs so Stripe knows exactly where to send the user after payment.
No. Test and live mode objects are completely separate in Stripe.
Related fixes
Bolt Stripe Webhook Not Updating Access
Bolt Stripe Billing Portal Return URL Broken
npm Package Not Working in Bolt.new
Bolt.new App Not Deploying
Bolt.new Forgetting Previous Instructions
Bolt Preview Shows the Old Version or Won't Refresh