Guides · Updated November 29, 2026

Lovable Stripe webhook not working: how to fix it in Lovable

A customer pays in Stripe, or a subscription is canceled, and your Lovable app doesn't change. That is often described as a Stripe webhook not working. This page covers the Lovable-specific part: a stable production URL, a prompt you can paste into Lovable, and how to keep the webhook route off login and preview protection. For the Stripe Dashboard checks (Event deliveries, wrong mode, disabled endpoints, retries and resending), use Stripe webhook not firing or not receiving events.

What usually breaks in a Lovable app

Lovable generates the app and you iterate in its chat. Stripe still has to reach a public HTTPS POST route on the published site. These are the usual gaps:

Fix it in Lovable

  1. Publish a stable production URL and use that host in Stripe, in the same mode your app charges in (live or test).
  2. Paste the prompt below into Lovable's chat so it adds or repairs the webhook handler, environment variable and access updates, without rewriting unrelated features.
  3. Put STRIPE_WEBHOOK_SECRET (and your Stripe keys, if needed) in the app's environment. Use the whsec_ from the Stripe endpoint you just created or already have for that mode.
  4. In the Stripe Dashboard, add or edit the endpoint, point it at https://your-production-domain/api/stripe/webhook (or the path Lovable reports), and select the event types the handler uses. Send a test event and open Event deliveries (Stripe: Webhooks, Stripe: Manage endpoints).
  5. If deliveries fail, follow the status codes and retry steps in Stripe webhook not firing. If they succeed but access is still wrong, the handler needs more work — paste the prompt again with the Event deliveries error or the event type that was ignored.

Prompt to paste into Lovable

Copy the prompt as-is. After Lovable finishes, double-check the URL it gives you is the published production host, not a preview.

After the webhook works

People who already paid or canceled while the webhook was broken will not fix themselves. Compare Stripe with your users list — the methods are in customers who paid but don't have access and canceled or past due, but still has access. Resend missed events from Event deliveries once the handler is correct.

What PaidCheck's free report checks

With a read-only restricted key, the free report can flag undelivered webhook events from the last 30 days, disabled endpoints, endpoints that don't subscribe to subscription or checkout events, and a missing endpoint. With a user list it also finds paying users who are locked out and canceled or unpaid users who still have access. It can't see Lovable logs, auth middleware or which signing secret your server uses, it doesn't check whether you subscribe to invoice.payment_failed, and it doesn't check event order or idempotency. It never writes to Stripe or your app. Paid plans run these checks daily and send an alert email when a check finds a new issue.

FAQ

Why does a Stripe webhook fail in a Lovable app?

Usually the endpoint isn't on a stable public production URL, the route is behind the same login or protection as the rest of the app, the signing secret doesn't match the endpoint in the Stripe Dashboard (test vs live, or a stripe listen secret), or the handler only treats checkout.session.completed and ignores later subscription updates and cancellations.

Should I point Stripe at my Lovable preview URL?

No. Preview or draft URLs change and are often protected. Register a published production HTTPS URL in Stripe, in the same mode (live or test) your app charges in.

Stripe shows Delivered, but Lovable didn't update the user's plan. Is the webhook not working?

Delivery worked. The handler received the event and didn't update access: it ignored the event type, wrote the wrong field, or a cache still shows the old plan. Fix the handler (the prompt below), then correct anyone already affected by comparing Stripe with your users.

Can PaidCheck see why my Lovable webhook isn't working?

Partly. With a read-only restricted key it can flag undelivered events from the last 30 days, disabled endpoints, endpoints missing subscription or checkout events, and a missing endpoint. It can't see Lovable logs, auth middleware, or which signing secret your server uses, and it never writes to Stripe or your app.

Check your own Stripe account for these issues. Run a free leak report →