Stripe in Lovable: find the step where payment breaks

Lovable runs Stripe two ways, and each breaks in different places. Name your setup, then the step where payment stops.

45 receipts: each claim links the line it quotes from Lovable’s, Stripe’s or Supabase’s docs. Check the receipts

Find my step

First: built-in payments or your own Stripe account?

Lovable has two Stripe setups, and a project can use only one of them at a timesource. Most fixes below depend on which you have, so check before you touch code.

What you see in LovableYour setup
Payments (in the More menu) shows a Self-managed Stripe badgesourceYour own Stripe account
You pasted an rk_ or sk_ key into a Connect Stripe formsourceYour own Stripe account
Payments has a test/live toggle, and the preview shows a test mode bannersourcesourceBuilt-in payments
Lovable set up the Stripe account for you and handles its keyssourceBuilt-in payments

Built-in payments need a paid Lovable plansource; connecting your own account doesn’tsource. On the Free plan, your own account is the route Lovable offerssource.

Step 1: checkout won’t open, or it charges the wrong thing

No money has moved yet. The buy button does nothing, shows an error, or opens a checkout in the wrong mode.

Nothing opens. With your own account, checkout usually opens in a new tab, and a popup blocker can stop itsource; allow popups for your app’s address. Built-in payments with Stripe put the form on the page insteadsource.

An error instead of a form. The message comes from the checkout function Lovable wrote, and its logs show what Stripe sent backsource. On the built-in backend they are under More → Settings → Logssource; on your own Supabase project, under Edge Functions in the Supabase dashboardsource.

“No such price” after the switch to live. On your own account, test and live prices carry different IDs, and Lovable has to move your app onto the live onessource. If a live key is still being sent a test price ID, match the price ID to the key’s mode.

Real money in the preview. Your own account runs on one key at a time, so once a live key is in, a purchase made in the preview is realsource. Built-in payments keep the preview in test mode, where only test cards go throughsource, and the published app takes no real payments until the go-live steps are donesource.

A secret key in the page. The Connect Stripe form saves the key as a backend secret, outside your app’s codesource, and Lovable warns against pasting it into the chat as a messagesource. If an sk_ or rk_ key turns up in your front-end bundle anyway, treat it as leaked: roll it and keep the new one server-side.

Step 2: the customer paid, but nothing unlocked

Stripe has the money. Your app didn’t notice, so the account still looks free.

Your own account. Out of the box there are no webhooks; your app asks Stripe directly whether a payment or subscription is activesource. Subscriptions are matched on email: the address someone signs in with has to be the one on their Stripe customer recordsource. When a buyer paid as one address and logs in as another, compare the two before anything else.

Built-in payments. Lovable registers the webhook endpoints in Stripe for yousource. Delete that endpoint and purchases still go through while subscriptions never activatesource, so look for it in Stripe before rewriting code.

On either setup, if access only unlocks when the buyer reaches your success page, move it: Stripe says there is no guarantee that page gets visitedsource. Upgrade the user from the payment event. If you added webhooks and Stripe lists failed deliveries, get the webhook delivering again.

Step 3: Stripe calls your edge function and gets turned away

Lovable writes the payment code as edge functionssource. On your own account, webhooks are an add-on: Lovable writes the function, you create the endpoint in Stripe, then hand over its signing secret when askedsource. If Stripe’s calls still fail, check these four in order.

The wrong signing secret. Stripe names this as the most common cause of its signature errorsource, and a CLI listener’s secret is not the dashboard endpoint’ssource. On built-in payments, a second endpoint on the same URL sends events your app can’t verify, and removing it can fix deliverysource. Fix “No signatures found matching”.

A body that was changed. Any change to the raw request body makes Stripe’s check failsource. In the function, read the body as text and verify that exact string before you parse it as JSON.

A 401 before your code runs. Supabase edge functions want a valid JWT by defaultsource, and Stripe has none of your users’ tokenssource. Switch JWT checking off for the webhook function alone and let the signature check guard it. Clear the verify_jwt 401.

A fix that never shipped. With your own Stripe account on your own Supabase project, Lovable syncs the key into that project’s edge function secretssource. When the connection between the two breaks, or publishing fails, a change you made in chat may never reach the running function. Check these first: Lovable lost its Supabase link (edge functions and secrets stop deploying), and Lovable publish fails on an edge function or secret.

Step 4: after the sale, the portal and plan changes

On your own account, one-off purchases work without user accounts, but subscriptions need login so Lovable can tie each one to a usersource. Add login before you add plans.

So customers can cancel or change plans themselves, ask Lovable for a Manage subscription button; it opens Stripe’s hosted portalsource. On your own account, switch the portal on once in Stripe before the button can worksource. It won’t run inside Lovable’s preview panel on either setupsourcesource, so test it in a normal tab or on the published app.

Disconnecting your own Stripe account from Lovable doesn’t cancel active subscriptions or refund paymentssource. On your own Supabase project, deployed payment functions keep charging while the stored secret is theresource; delete STRIPE_SECRET_KEY in Supabase if you mean to stop taking money.

One test order before you share the link

  1. In test mode, pay with 4242 4242 4242 4242, any future date and any three-digit CVCsource.
  2. Sign in with the same email you paid with and open the paid feature.
  3. If you use webhooks, open the endpoint in Stripe and look for a 2xx on the test event; Stripe wants that answer fast, before slow worksource.
  4. Open Manage subscription in a normal tab, not the preview.
  5. Go live. Your own account: submit a live key and move to live price IDssource. Built-in: publishing copies products and prices from test to livesource, then finish the go-live steps.
  6. Own account only: make one real purchase on the published appsource, then refund it from Stripe.

When it isn’t Stripe at all

A checkout that works in the preview and fails once published can be a sign-in or domain problem rather than a payment one. Start with Works in the Lovable preview but breaks on the published app or Lovable custom domain not working. Every Stripe fix on this site sits on the Stripe hub, and Lovable’s other problems are on the Lovable hub.

Get payments right the first time

The Stripe Payments That Work Pack: webhooks, test versus live mode, signature checks, the customer portal, and prompts for Lovable, Bolt and Cursor.

One-time payment through Stripe, no subscription. Download after payment. See the full contents on the pack page; purchase questions go through the help form.

Secure checkout by Stripe

Sources

Lovable documents each setup on its own page: Connect your own Stripe account and built-in payments. Webhook rules come from Stripe’s webhooks guide, its signature troubleshooting and fulfillment guide; the JWT default from Supabase’s function configuration page.

Receipts

Each quote is copied from the page linked under it. Checked 30 Oct 2026.

  1. Lovable: one setup per project

    A project can use one or the other, not both at the same time.

    https://docs.lovable.dev/integrations/stripe

  2. Lovable: how the Payments view marks your own account

    On a project using your own Stripe account, it shows a Self-managed Stripe badge and a read-only view of your payments data, including transactions, refunds, and products.

    https://docs.lovable.dev/integrations/stripe

  3. Lovable built-in: the test/live toggle

    The Payments tab has a toggle to switch between test and live data.

    https://docs.lovable.dev/features/payments

  4. Lovable built-in: the preview banner

    In your app, Lovable adds a test mode banner that only appears in the preview and is hidden on your published site.

    https://docs.lovable.dev/features/payments

  5. Lovable own account: the key you submit

    The form accepts a restricted key (rk_...) or a secret key (sk_...), in test or live mode.

    https://docs.lovable.dev/integrations/stripe

  6. Lovable built-in: Lovable runs the account

    Lovable provisions the Stripe or Paddle account and manages keys, webhooks, and test and live environments for you.

    https://docs.lovable.dev/integrations/stripe

  7. Lovable built-in: plan requirement

    Requires a paid plan and, on some apps, a backend.

    https://docs.lovable.dev/integrations/stripe

  8. Lovable own account: plan requirement

    The integration does not require a paid Lovable plan, and anyone with edit access to the project can set it up.

    https://docs.lovable.dev/integrations/stripe

  9. Lovable: the Free plan option

    On the Free plan, you can connect your own Stripe account instead.

    https://docs.lovable.dev/features/payments

  10. Lovable own account: checkout tab and popup blockers

    Checkout usually opens in a new tab, and a popup blocker can stop it.

    https://docs.lovable.dev/integrations/stripe

  11. Lovable built-in: Stripe checkout is embedded

    Stripe uses embedded checkout only. The checkout form is embedded directly on the page.

    https://docs.lovable.dev/features/payments

  12. Lovable: checkout errors come from your function

    The error comes from the checkout function, the backend code Lovable wrote for your app. Read its logs to see what Stripe returned.

    https://docs.lovable.dev/integrations/stripe

  13. Lovable: where the logs are (built-in backend)

    On a project using the built-in backend, open More → Settings → Logs and check the function logs.

    https://docs.lovable.dev/integrations/stripe

  14. Lovable: where the logs are (your own Supabase)

    On a project using your own Supabase, open the Supabase dashboard and check the logs under Edge Functions.

    https://docs.lovable.dev/integrations/stripe

  15. Lovable own account: test and live price IDs

    Price IDs differ between test and live mode, so ask Lovable to switch your app to the live price IDs.

    https://docs.lovable.dev/integrations/stripe

  16. Lovable own account: a live key makes the preview real

    Unlike built-in payments, the preview has no separate test environment: your project uses one key at a time, so with a live key, payments made from the preview are real.

    https://docs.lovable.dev/integrations/stripe

  17. Lovable built-in: the preview is test mode

    Test mode applies when you use your project in the preview. Checkout only accepts test card numbers.

    https://docs.lovable.dev/features/payments

  18. Lovable built-in: no real payments before go-live

    Checkout on your published app will not process real payments until you complete the go-live steps.

    https://docs.lovable.dev/features/payments

  19. Lovable own account: where the key goes

    The key is stored as a backend secret, never in your app’s code, and it does not pass through the chat.

    https://docs.lovable.dev/integrations/stripe

  20. Lovable own account: not in a chat message

    Never paste your Stripe key into the project chat as a message.

    https://docs.lovable.dev/integrations/stripe

  21. Lovable own account: no webhooks by default

    By default, the integration does not use webhooks: your app checks payment and subscription status directly with Stripe.

    https://docs.lovable.dev/integrations/stripe

  22. Lovable own account: subscriptions match by email

    A user’s subscription is recognized when the email they sign in with matches the email on their Stripe customer record.

    https://docs.lovable.dev/integrations/stripe

  23. Lovable built-in: Lovable registers the endpoints

    Lovable registers two webhook endpoints on your provider account for each environment (test and live).

    https://docs.lovable.dev/features/payments

  24. Lovable built-in: a deleted endpoint

    Deleting your app’s endpoint silently stops payment events from reaching your app: purchases still succeed, but subscriptions never activate and features never unlock.

    https://docs.lovable.dev/features/payments

  25. Stripe: the success page is not guaranteed

    You can’t rely on triggering fulfillment only from your checkout landing page, because it’s not guaranteed customers visit that page.

    https://docs.stripe.com/checkout/fulfillment

  26. Lovable: payment code runs as edge functions

    Lovable builds your payment flow with edge functions: small pieces of backend code that call Stripe using your stored key, so the key is never exposed in your app.

    https://docs.lovable.dev/integrations/stripe

  27. Lovable own account: you store the signing secret

    Copy the signing secret and add it as a secret when Lovable asks for it.

    https://docs.lovable.dev/integrations/stripe

  28. Stripe: the usual cause of a signature error

    The most common cause is using the wrong endpoint secret.

    https://docs.stripe.com/webhooks/signature

  29. Stripe: CLI and dashboard secrets differ

    The secret for a CLI-forwarded endpoint is different from the secret for a Dashboard-managed endpoint

    https://docs.stripe.com/webhooks/signature

  30. Lovable built-in: a duplicate endpoint

    A duplicate that points at the same URL as your app’s endpoint delivers events your app cannot verify, so removing it can fix webhook delivery issues.

    https://docs.lovable.dev/features/payments

  31. Stripe: the raw body

    Any manipulation to the raw body of the request causes the verification to fail.

    https://docs.stripe.com/webhooks

  32. Supabase: edge functions check a JWT by default

    By default, Edge Functions require a valid JWT in the authorization header.

    https://supabase.com/docs/guides/functions/function-configuration

  33. Supabase: Stripe has no user token

    Stripe webhooks need to be publicly accessible (Stripe doesn't have your user tokens)

    https://supabase.com/docs/guides/functions/function-configuration

  34. Lovable own account on your own Supabase: where the key lives

    On a project using your own Supabase, it is synced to your Supabase project’s edge function secrets, which you can see in the Supabase dashboard.

    https://docs.lovable.dev/integrations/stripe

  35. Lovable own account: subscriptions need sign-in

    One-time payments work without user accounts, but subscriptions require authentication in your app so Lovable can match subscriptions to your users.

    https://docs.lovable.dev/integrations/stripe

  36. Lovable own account: the Manage subscription button

    To let subscribers cancel or change their plan themselves, ask Lovable to add a Manage subscription button that opens Stripe’s hosted customer portal.

    https://docs.lovable.dev/integrations/stripe

  37. Lovable own account: activate the portal first

    The hosted customer portal must be activated once in your Stripe dashboard before your app can open it.

    https://docs.lovable.dev/integrations/stripe

  38. Lovable own account: not in the preview panel

    The portal does not work inside the Lovable preview panel, so test it in a standalone browser tab or on your published app.

    https://docs.lovable.dev/integrations/stripe

  39. Lovable built-in: not in the preview panel either

    It will not function inside the Lovable preview panel.

    https://docs.lovable.dev/features/payments

  40. Lovable own account: disconnecting leaves Stripe alone

    When you disconnect, Lovable does not cancel your customers’ active subscriptions and does not refund payments.

    https://docs.lovable.dev/integrations/stripe

  41. Lovable own account on your own Supabase: functions keep charging

    The deployed payment functions keep working, and keep charging customers, as long as that secret exists.

    https://docs.lovable.dev/integrations/stripe

  42. Lovable own account: the test card

    where the card number 4242 4242 4242 4242 with any future expiration date and any 3-digit security code (CVC) completes a payment without charging real money.

    https://docs.lovable.dev/integrations/stripe

  43. Stripe: answer quickly with 2xx

    Quickly returns a successful status code (2xx) before any complex logic that might cause a timeout.

    https://docs.stripe.com/webhooks

  44. Lovable built-in: publishing syncs products

    When you publish your project, products and prices sync from test to live automatically

    https://docs.lovable.dev/features/payments

  45. Lovable own account: verify with a real purchase

    Run a real purchase on your published app.

    https://docs.lovable.dev/integrations/stripe