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:
- The webhook points at a preview or unpublished URL. That host may change, require a login, or be blocked by deployment protection. Stripe will fail to deliver (Stripe: Go-live checklist).
- The route is behind the same auth as the rest of the app. Stripe's request has no user session, so a 401 or 403 is common. Exclude the webhook path from login, middleware and bot protection.
- The signing secret is wrong. Live and test endpoints have different
whsec_values, and the secret printed bystripe listenis not the Dashboard endpoint's secret. See Rotated your Stripe keys? Check your webhook secret (Stripe: Verify signatures). - The handler only runs on checkout. If it only handles
checkout.session.completed, renewals, plan changes, failed payments and cancellations never update access (Stripe: Subscription webhooks).
Fix it in Lovable
- Publish a stable production URL and use that host in Stripe, in the same mode your app charges in (live or test).
- 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.
- Put
STRIPE_WEBHOOK_SECRET(and your Stripe keys, if needed) in the app's environment. Use thewhsec_from the Stripe endpoint you just created or already have for that mode. - 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). - 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.
See whether Stripe is reaching your Lovable app
Run the free leak report for failed deliveries, disabled endpoints and missing event types. Read-only restricted key, used once and not stored.
Run the free leak report →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.
Related guides
- Bolt Stripe subscription not updating: fix access in your Bolt app
When a Bolt app doesn't grant or revoke access after a Stripe subscription change: a prompt to paste into Bolt, and the Stripe checks that go with it.
- Stripe subscription past_due but the user still has access: what to do
A renewal failed and the customer still has the paid plan. What past_due means, the usual bugs, a policy, the code, and what happens after Stripe's last retry.
- Stripe webhook not firing or not receiving events: what to check
Why a Stripe webhook isn't firing or receiving events, how to tell whether Stripe never attempted delivery or your endpoint failed, and how to recover what you missed.
- Stripe subscription canceled or past due, but the user still has access
What canceled, unpaid and past_due mean for access, the events your app must handle, two cases that aren't bugs, and how to find who still has access.
Check your own Stripe account for these issues. Run a free leak report →
Check your own account
PaidCheck's free leak report runs these comparisons with a read-only Stripe restricted key. Upload a CSV of your users or skip that for Stripe-only checks. The key is used once and not stored.
Run a free leak report →