StackMatch

Stripe payments not working in your Lovable or Bolt app? Fix webhooks, checkout and "paid but nothing happened" (2026)

Prices and facts checked on each tool's official site. Plans change often, so confirm before you pay.

Someone paid in your Lovable, Bolt or v0 app, the money is in Stripe, and nothing happened: no upgrade, no unlocked feature, no order. Or the Stripe Dashboard shows your webhook failing with 400, 401 or 500. Almost every case comes down to a handful of causes, and Stripe tells you which one if you know where to look. Here's how to find it, using Stripe's, Supabase's, Lovable's and Bolt's own docs.

The short answer

  • Look at the delivery, not the code. In Stripe, open Workbench, Webhooks, click your endpoint and open Event deliveries. Each event says Delivered, Pending or Failed, with the HTTP status your app returned.
  • 400 with a signature error: the whsec_ signing secret your app uses is from a different endpoint or mode, or the body was changed before it was checked.
  • 401 from a Supabase function: JWT verification is on. Turn it off for the webhook function only and keep the signature check.
  • Works in test, not live: live mode needs its own keys, prices, webhook endpoint and secret.
  • Don't unlock only on the success page. Stripe says buyers don't always reach it; the webhook has to do the job.

First: which setup do you have?

Who owns the webhook decides where you fix it. Check this before changing anything:

SetupWho sets up the webhookWhat to know
Lovable built-in payments (Pro plan or higher)Lovable registers it for youLovable adds two endpoints per environment: one for your app and one for its own monitoring. Don't delete or disable either. Deleting your app's endpoint means purchases succeed but subscriptions never activate
Lovable with your own Stripe accountYou, if you asked for oneBy default there's no webhook: the app asks Stripe directly whether a user has an active subscription, matched by email. If you asked Lovable for webhooks, you create the event destination in Stripe and give Lovable the signing secret
Bolt's built-in Stripe integrationBolt registers it for youBolt creates Supabase edge functions for checkout, webhooks and subscriptions, and says it handles endpoint registration and signature checks, so there's nothing to add in Stripe
Custom code (v0, or a webhook the AI wrote for you)YouYou create the endpoint in Stripe, choose the events and store its whsec_ secret in your server's secrets

Find your problem

What you seeLikely causeFix
Paid in Stripe, but the user isn't upgradedThe webhook failed or never fired, or the app only unlocks on the success pageCheck Event deliveries for that payment. Unlock from the webhook; Stripe says webhooks are required for subscriptions and delayed payment methods
Lovable (own Stripe): subscribed, but the app says they're notSubscriptions are matched by email, and the user signed in with a different oneSign in with the same email that's on the Stripe customer, or update one to match
400 "No signatures found matching the expected signature for payload"Wrong signing secret (another endpoint, the other mode, or the CLI's), or the body was parsed before checkingClick Reveal secret on that exact endpoint and mode and store it again. Verify the raw body text, not parsed JSON
Lovable built-in: "Invalid webhook signature"The handler was removed, or a duplicate endpoint points at the same URLRemove duplicates you made yourself; if every delivery still fails, ask Lovable to rotate the webhook secret for that environment, then publish again
401 "Invalid JWT" or "Missing authorization header"Supabase JWT verification blocks Stripe, which has no user tokenTurn off JWT verification for the webhook function only, and keep the Stripe signature check in the code
401 or 403 on a Vercel preview link (v0)Preview deployments are behind Vercel Deployment ProtectionPoint the webhook at your production domain, not a preview URL
404The URL is wrong, or the function was never deployed or got renamedCopy the exact function URL again and check it's deployed
302 or another 3xxThe URL redirects (for example to www or https)Stripe counts redirects as failures. Use the final URL it redirects to
500The handler crashed, often because a secret it reads isn't setRead the function's logs; set the missing secret in Edge Function Secrets
Timed outThe function does slow work before answeringReturn a 2xx right away, then do the work. Stripe asks endpoints to respond quickly
Works in test mode, fails liveLive mode has no endpoint yet, or uses test keys, test price IDs or the test secretCreate the endpoint in live mode, use sk_live_ or rk_live_ keys, live price IDs and the live whsec_
Nothing shows in Event deliveriesThe event type isn't selected on that endpointAdd the events your app needs (see the list below)
After paying, buyers land on localhost or a preview linkThe checkout's success_url was set from the development addressSet it to your live domain, for example https://yoursite.com/success?session_id={CHECKOUT_SESSION_ID}

Check in this order

  1. Pick the right mode. In the Stripe Dashboard, see whether the payment is in a sandbox (test) or live mode. Each mode has its own keys and data, so you have to look at the webhook for the same mode as the payment.
  2. Open the delivery. Go to Workbench, Webhooks, click your endpoint, then Event deliveries. Click the failed event to see the HTTP status and when the next retry is due.
  3. Match the status to the table above. No delivery at all? Check the endpoint's selected events, and that the endpoint exists in this mode.
  4. Check the URL. It must be a public HTTPS address of your published app or your Supabase function, not a preview link or localhost.
  5. Check the secret. Reveal the endpoint's signing secret and compare it with the one stored in your app's secrets (Lovable, Bolt or Supabase Edge Function Secrets). Both start with whsec_.
  6. Fix, then resend. Click Resend on the event in the Dashboard (works for up to 15 days after the event). In live mode Stripe also retries on its own for up to three days; in a sandbox it retries three times over a few hours.
  7. Test again in the sandbox with card 4242 4242 4242 4242, any future date and any CVC, and confirm the account upgrades on its own.

The events your webhook needs

Stripe recommends listening only to the events you use. An event that isn't selected is never sent.

  • One-time payments with Checkout: checkout.session.completed. Accept bank payments that clear later? Also checkout.session.async_payment_succeeded.
  • Subscriptions: customer.subscription.created, customer.subscription.updated (renewals and plan changes) and customer.subscription.deleted (the subscription ended).
  • Renewals and failed cards: invoice.paid and invoice.payment_failed.

Stripe webhooks on Supabase Edge Functions

Lovable and Bolt both run payment code as Supabase Edge Functions (Bolt calls them server functions). Three things trip up webhooks there:

  • JWT verification. Edge Functions require a valid JWT by default, and Stripe doesn't have your users' tokens. Supabase's docs use Stripe webhooks as the example of a function that should skip this: toggle off JWT verification on the function's page, set verify_jwt = false for it in supabase/config.toml, or deploy with --no-verify-jwt. Only do this for the webhook function, and only if it checks the Stripe signature, because otherwise anyone can call it.
  • The raw body. Supabase's Stripe example reads the body with req.text() and verifies it with constructEventAsync before using it. Reading it as JSON first breaks the signature check.
  • The signing secret. Store the endpoint's whsec_ value as an Edge Function secret (Supabase's example calls it STRIPE_WEBHOOK_SIGNING_SECRET; AI-written code often uses STRIPE_WEBHOOK_SECRET). The name in the code and the name of the secret must match exactly. A .env file in your project doesn't reach the deployed function.

Going from test to live without breaking it

  • Lovable built-in payments: finish the go-live checklist in the Payments tab (claim the Stripe account, Stripe onboarding, readiness check). Live checkout won't work until it's done, and Lovable creates the live webhook endpoints at that step.
  • Lovable with your own Stripe: submit a live key in the Update Stripe secret key form, ask Lovable to switch to live price IDs (they differ from test), and if you added webhooks, create the live endpoint and store its secret.
  • Bolt or custom code: Stripe says going live is swapping sandbox keys for live keys, and sandbox products and prices can't be used in live mode. Create a live webhook endpoint too, because its secret is different.
  • Never test with real cards. Make one small real purchase on the published app and watch it arrive in Event deliveries.

What to paste into Lovable or Bolt

Don't change any code yet. A customer paid with Stripe but [what didn't happen]. The Stripe webhook delivery shows [status code and message from Event deliveries], in [test or live] mode. Find the function that receives Stripe webhooks and tell me: its exact URL, which events it handles, which secret name it reads the signing secret from, whether it verifies the raw request body with the Stripe signature, whether JWT verification is off for it, and what success_url the checkout uses. Then propose the smallest fix. Don't put any secret key in browser code.

When it's time to get help

Payments are where a small bug costs real money and angry customers. Get a second pair of eyes when:

  • Real customers have paid and didn't get what they bought.
  • The AI keeps rewriting the webhook and the error comes back.
  • You turned off JWT verification and aren't sure the function still checks the signature.
  • You're about to switch to live mode.
OptionPriceWhat you get
App Audit$49 one-timeA plain-English written fix list for your Stripe setup and anything else that breaks, within 3 business days
Payments Live$199 one-timeStripe payments wired into your app and tested with test cards before going live
Launch Pack$499 one-timeAgreed bug fixes, Stripe payments, and your app published on your own domain with HTTPS

We confirm the scope by email before any work starts, and you can ask questions first without paying. Never send anyone your password, your Stripe secret key or your webhook signing secret.

Related guides

Sources

FAQ

Why did a customer pay but my app didn't upgrade them?

Stripe took the money, but the message that tells your app about it never arrived or failed. Open Workbench, Webhooks, pick your endpoint and check the Event deliveries tab: a Failed delivery shows the HTTP status your app sent back. Stripe also says you can't rely on the success page alone, because a buyer can pay and close the tab before it loads, so unlocking has to happen from the webhook. On Lovable's own-Stripe setup, which checks Stripe directly instead, make sure the user signs in with the same email they paid with.

What does "No signatures found matching the expected signature for payload" mean?

Your webhook code checked the Stripe-Signature header and it didn't match. Stripe says one of three things is wrong: the signing secret (the most common cause), the request body, or the header. Each endpoint has its own whsec_ secret, the test and live versions of an endpoint have different secrets, and the Stripe CLI uses another one again. The code also has to verify the raw, unchanged body, before anything parses it as JSON.

Why does my Supabase Edge Function return 401 to Stripe?

Edge Functions require a valid JWT by default, and Stripe doesn't have your users' login tokens, so Supabase blocks the call before your code runs. Turn off JWT verification for the webhook function only (the toggle on the function's page, verify_jwt = false in config.toml, or deploy with --no-verify-jwt) and keep the Stripe signature check in the code so fake requests are still rejected. In Bolt, ask Bolt to turn off JWT verification for that function and keep a signature check.

Why does my Stripe payment work in test mode but not live?

Test (sandbox) and live mode are separate. Each has its own API keys, products and prices from one can't be used in the other, and the same webhook endpoint gets a different signing secret in each mode. Going live means a live secret key, live price IDs, a webhook endpoint created in live mode and its live whsec_ secret. On Lovable built-in payments, finish the go-live steps in the Payments tab, because live checkout won't work until they're done.

Which Stripe events should my webhook listen for?

Only the ones your app uses. For one-time Checkout payments, checkout.session.completed, plus the matching async_payment_succeeded event if you accept bank payments that clear later. For subscriptions, customer.subscription.created, customer.subscription.updated and customer.subscription.deleted, and invoice.paid and invoice.payment_failed for renewals and failed cards. An event you didn't select is never sent to that endpoint.

Some links are referral links; we may earn a commission at no extra cost to you. It never changes our recommendations.

Newsletter

Get the monthly "which AI tool" email

One short, beginner-friendly email a month. No spam.

Form not showing? Subscribe here