Lovable payment gateway production errors
Last verified:
The fix
Lovable payment gateway production errors: preview takes the test card, the published app does not. Finish go-live, or use the live key and live price id.
- 1
See which payments this project uses
Open More, then Payments. A Self-managed Stripe badge means you connected a Stripe account you own. No badge means built-in Stripe or Paddle. Do not paste an
sk_orrk_key into the chat. - 2
Built-in: finish go-live, then publish
Stripe: claim the account from the Payments tab, finish onboarding, and pass the readiness check (privacy policy, terms, refund policy, real content). Paddle: Run check, then seller verification and domain review. Publish after that so products and prices sync. Discounts do not sync.
- 3
Self-managed: one live key, then live price ids
Ask Lovable to update the Stripe key. Submit
rk_live_orsk_live_only in the Update Stripe secret key form. In Stripe, turn test mode off and copy eachprice_the checkout sends. A live key sent a testprice_isNo such price. A live key also makes the next preview purchase a real charge.# Self-managed Stripe. One key for the preview and the published app. # rk_test_ or sk_test_ → price_ from test mode, card 4242 4242 4242 4242 # rk_live_ or sk_live_ → price_ copied with test mode off # Submit the key only in Update Stripe secret key. # Never VITE_STRIPE_SECRET_KEY. - 4
If the card succeeds and the app never unlocks
Built-in: keep both Lovable webhook endpoints for live (yours ends in
?env=live, and theapi.lovable.devmonitor). Delete an extra endpoint that repeats your app's URL.Invalid webhook signaturemeans ask Lovable to rotate that environment's webhook secret, then publish again. A webhook you wrote yourself needs the raw body and that endpoint'swhsec_.
Why it happens
Built-in payments have two environments. The preview is test mode and takes 4242 4242 4242 4242 as soon as setup finishes. The published app does not charge a real card until go-live is done and you publish. Publishing the site is not Stripe's claim and onboarding, and it is not Paddle's seller verification and domain review. Products and prices sync from test to live on publish. Discounts do not.
Self-managed Stripe stores one secret, STRIPE_SECRET_KEY, from the Connect Stripe or Update Stripe secret key form. rk_test_ or sk_test_ is why the test card works in the preview and a real card fails on the published URL. There is no second environment, so a live key charges a real card from the preview too. Price ids differ by mode. The browser never needs the secret.
The next error you'll probably hit
Once this is fixed, the usual follow-up is No such price: wrong Stripe mode. No such price: that price_ id is from the other Stripe mode, or the code sent a product id. Copy a price from the same mode as the secret key.
Prompt to paste back into your AI tool
Paste this above the error.
Lovable payment gateway production errors: checkout works in the preview and fails on the published URL. Payments is <built-in Stripe, built-in Paddle, or Self-managed Stripe>. The provider error, if any, is: <paste it or "none, the button just fails"> Do not paste sk_ or rk_ into the chat. Do not put a secret in a VITE_ variable. Do not disable webhook signature verification. Do not catch the Stripe error and render success. Do not edit built-in prices in the provider dashboard. Do not disconnect payments. 1. If this is built-in payments, say which go-live step is still open (claim, Stripe or Paddle onboarding, readiness check, domain review). Tell me to finish that step and publish so products and prices sync. Do not invent new price ids. 2. If this is Self-managed Stripe, say whether the stored key is still test mode. Tell me to submit a live key only in the Update Stripe secret key form, then switch the app to price_ ids that exist with test mode off. 3. If the error is No such price, stop and match the key mode to the price mode. Do not rewrite the UI. 4. If the charge succeeds and the app does not unlock, say whether the failure is Invalid webhook signature, a missing live endpoint, or an email that does not match the Stripe customer. Show only the checkout call or the webhook route.
Common questions
+Why does the Lovable payment gateway work in preview and fail in production?
The preview is test mode. On built-in payments the published app stays unable to charge a real card until go-live is finished and you publish. On your own Stripe account the project holds one key, and a test key is why the published site rejects a real card.
+The preview charges a card. Why does the published site fail?
On built-in payments those are different environments, and the live one waits on the Payments checklist. On self-managed Stripe they share one key, so the failure is a test key or a test price id. Checkout opens in a new tab, so a blocked popup looks like a failed button.
+Can I put the live secret key in the client if the publishable key is not enough?
No. Self-managed Stripe stores the secret as STRIPE_SECRET_KEY and calls Stripe from the server side. The Connect Stripe form rejects a pk_ key. A VITE_ variable would ship the secret in the JavaScript the browser downloads.
+The production error is No such price, or no signatures found matching the expected signature for payload.
No such price means the key and the price_ are in different Stripe modes. No signatures found matching the expected signature for payload is a webhook handler you wrote. Built-in Lovable payments say Invalid webhook signature instead. Those have their own pages. Do not put the secret in a VITE_ variable to get past either one.
Related errors
- No such price: wrong Stripe modeNo such price: that price_ id is from the other Stripe mode, or the code sent a product id. Copy a price from the same mode as the secret key.CursorLovableBoltStripeNext.jsOct 14, 2026
- No signatures found matching the expected signature for payloadNo signatures found matching the expected signature for payload. Pass the raw body and this endpoint's whsec_ to constructEvent.CursorLovableBoltStripeNext.jsNov 4, 2026
- Lovable app not deploying: read the bannerLovable app not deploying: the Publish dialog says Build errors need fixing or Publishing failed. Match that sentence, fix that cause, and publish again.LovableCursorViteSupabaseNov 2, 2026
- Lovable export code won't run: bun installLovable export code won't run until you install with the lockfile in the folder. bun.lock means bun install, then the dev script. Do not add Next.js.LovableCursorViteNodeNov 2, 2026
- Stripe webhook not firingStripe webhook not firing: Checkout can succeed while your server never gets the event. Point the endpoint at the deployed URL and return 200.CursorBoltReplitStripeNext.jsNov 11, 2026
- NEXT_PUBLIC_ secret in the bundleA NEXT_PUBLIC_ or VITE_ secret is in the browser bundle. Rotate the key, move the call to a server route, and keep real public keys in the client.CursorLovableBoltNext.jsViteNov 11, 2026