Stripe shows the payment succeeded but my app does not unlock the account. Why?
Short answer: Almost always, the money moved but the message that tells your app about it never arrived, or arrived and was rejected. Stripe, the payment company that handles the card, sends that message as a webhook: an automatic notice sent to a web address in your app. Check five things in this order: the wrong event type, a wrong signing secret, test and live mode mixed up, a handler that crashes or answers too slowly, and an endpoint that was down while Stripe was retrying. The first two take ten minutes and fix most cases.
A customer paid, Stripe shows the charge, and your Lovable, Bolt or Replit app still treats them as unpaid.
I'm Ranjit, and I run Blur Studio: 15+ years building software, 120 apps taken live, and clients who have gone on to raise $10M+. I build AI systems and processes that help businesses do a lot more with a lot less time. I also work differently from most of what else is out there, more on that further down this page. Say hello.
What a webhook is, and why your app depends on it
When a customer pays, two things happen in two places. Stripe takes the money. Your app has to find out and then unlock the account, mark the order paid or send the receipt. Stripe tells your app by sending an HTTPS message, called a webhook, to an address you registered. Stripe's own docs describe webhooks as the way to respond to things that happen later, such as a bank confirming a payment or a recurring payment succeeding.
AI app builders such as Lovable, Bolt and Replit (tools that write a working app from a plain-English chat) are good at the checkout page. The webhook is the invisible half, and it is where things go quiet. Nothing on screen shows it failed. The customer just sees nothing change. If you have been through this, my guide on why AI-built apps break explains the pattern: the demo path works, the background path does not.
First check: does your app even use webhooks?
Before debugging, find out whether a webhook should exist. Lovable's documentation for connecting your own Stripe account says that by default the integration does not use webhooks: the app checks payment and subscription status directly with Stripe. If you need webhooks, for example to trigger order fulfilment, you ask Lovable to set them up, and then you finish the setup in your Stripe dashboard yourself.
So the first question is simple. Open Stripe, go to Developers, then Webhooks, and look at the list. If it is empty and your app expects Stripe to push updates, you have found the problem. Nothing is registered, so nothing arrives. Ask your builder to write a webhook handler, then create the endpoint in Stripe and paste in the signing secret when asked.
The five causes, in the order I check them
Work down this list. Each step is a yes or no question you can answer from the Stripe dashboard without reading code.
1. Is your app listening for the right event?
Stripe sends many kinds of event. A one-time checkout, a subscription, an invoice and a bank debit each produce different ones. Lovable's docs give payment_intent.succeeded and customer.subscription.updated as examples of events you might select. If your handler waits for one event and the endpoint in Stripe only sends another, your handler never runs.
In Stripe, open your endpoint and look at the list of events it is set to receive. Then open one recent paid order and see which events Stripe actually created. Stripe's best-practice advice is to subscribe only to the event types your integration needs, so a short list is normal. Match the list to what your code reads.
Read your handler, note the exact event name it checks, and make sure that name is in the endpoint's list. Different payment types create different events, so a handler written for one type will sit idle for another.
2. Is the signing secret correct?
Every endpoint has a signing secret that starts with whsec_. Your app uses it to check the message really came from Stripe. If the secret in your app does not match, your app rejects every message and Stripe shows failures. Stripe's troubleshooting page says the most common cause of signature errors is using the wrong endpoint secret.
Two details catch people out. First, the secret for an endpoint registered in the Dashboard is different from the secret printed by the Stripe CLI when you test locally. Stripe says not to mix them up. Second, the secret must not have extra spaces around it. Stripe also notes that webhook signing secrets are separate from your API keys, so replacing an API key does not fix this.
The related error is a body problem. Stripe needs the exact raw body it sent. If your framework reads the message and changes it first, the check fails even with the right secret. Your builder should read the raw text. This is a one-line fix for a developer.
3. Are test mode and live mode mixed up?
Stripe keeps test and live as two separate worlds. Test keys start with sk_test_, live keys start with sk_live_. A webhook endpoint you made in test mode will never hear about a real payment. A live payment will never reach a test-only endpoint.
The common story: you built and tested with test keys, then swapped in a live key and went live. The checkout works, but the webhook endpoint and its secret are still the test ones. You need a second endpoint in live mode, with its own signing secret, saved in your app.
Lovable's docs add a related warning. Price IDs differ between test and live mode, so your products and prices must exist in live mode and your app must point at the live price IDs. Also, with your own Stripe account, the preview has no separate test environment: use a live key and payments made from the preview are real.
4. Is your handler crashing, or too slow?
Stripe expects a quick success reply (any 2xx status code) before your code does anything complicated. If your handler does heavy work first, such as sending emails and updating five tables, it can time out. Stripe counts that as a failure.
In Stripe, open the endpoint and look at recent deliveries. A red entry shows the status your app sent back. Stripe's troubleshooting page says a 4xx status means the receiving server cannot or will not process the request. A 400 is often your own handler rejecting a failed signature check (go back to step 2). A 401 or similar access error points to restrictions on the address, such as a login check on the host. A 5xx status means your code crashed or the server failed.
One case specific to apps built on Supabase, the hosted database and backend that Lovable and many other builders use: Supabase Edge Functions (small pieces of backend code that run on Supabase's servers) check for a signed-in user by default. Supabase's docs say the default is verify_jwt = true. Stripe does not send a user login. Supabase's own Stripe webhook example says to deploy with verify_jwt = false, because the function verifies Stripe's signature instead. If your webhook gets a 401, this is one possible cause. Do not turn that check off on any function that is not a signed webhook.
5. Did your endpoint miss events while it was down?
Stripe retries failed deliveries. According to its docs, in live mode it keeps trying for up to three days with an exponential back off (longer gaps each time). In a sandbox it retries three times over a few hours. So an outage of an hour or two usually heals by itself, once your endpoint is back.
Events that already ran out of retries can be resent by hand. In the Dashboard, the Resend button works up to 15 days after the event. With the Stripe CLI, the stripe events resend command works up to 30 days. Stripe also notes that resending by hand does not stop the automatic retries, so your handler must cope with the same event twice.
The quick diagnosis table
| What you see in Stripe | Likely cause | Fix |
|---|---|---|
| No endpoints listed | No webhook was ever set up | Ask the builder for a handler, create the endpoint, store the secret |
| Endpoint exists, no events sent to it | Wrong event types, or wrong mode | Match events to the handler, make a live-mode endpoint |
| Deliveries show 400 | Wrong secret or changed body | Re-copy the secret for this exact endpoint, read the raw body |
| Deliveries show 401 | Host or login check blocking Stripe | Allow unsigned requests on this one function, verify the signature in code |
| Deliveries show 500 or timeout | Handler crashes or is slow | Reply 2xx first, do the work after |
| Deliveries show 200 but the app is still wrong | Handler runs but updates the wrong record | Log the customer ID it matched |
That last row is the one nobody expects. A 200 only means your app said "got it". It does not mean your app did the right thing with it. One way this happens is a handler that finds the customer by email in one place and by ID in another, so the update lands on nobody.
How to test safely, without touching real money
- Switch Stripe to a sandbox or test mode and use test keys. Lovable's docs list the test card 4242 4242 4242 4242 with any future expiry and any 3-digit code, which completes a payment without charging anyone.
- Make one test purchase in your app. Then open the endpoint's recent deliveries in Stripe and read the status.
- If the app is only on your laptop, you can use the Stripe CLI, Stripe's command-line tool. The command
stripe listen --forward-to localhost:4242/webhooksends events to your local app, and it prints a signing secret just for that session. Use that secret locally, never in your live app. - Use Resend on the same event after each fix, so you do not need to buy again.
- Only after it works, repeat the whole thing once in live mode with a small real purchase you refund yourself.
If you use a tunnelling tool like ngrok (a service that gives your laptop a temporary public web address), remember the address changes between runs. A stale address is a classic reason a local webhook seems to do nothing.
Make it safe when Stripe sends the same event twice
Stripe says endpoints can occasionally receive the same event more than once, and recommends logging the event IDs you have processed. Without this, a retry can double-credit an account or send two receipts. Ask your builder for a simple table that stores each event ID, and to skip any ID it has seen. It is a small change.
While you are there, check the basics in my AI-built app security checklist. Webhook endpoints are public by design, so the signature check is the only thing stopping a stranger from sending a fake "payment succeeded" message. Stripe warns that without verification, an attacker could trigger actions such as fulfilling orders or granting access.
A five-minute monthly check
- Open the endpoint in live mode. Are recent deliveries mostly green?
- Pick one real paying customer. Does your app show them as paid?
- Look at your payment totals in Stripe and your app. Do the counts match?
- Did you change hosting, domain or keys this month? Any of these can break the address or the secret.
- Does a real person receive the alerts about your payments and endpoints? Make sure they go to someone who reads them.
The worst version of this bug is silent. Customers pay, nothing unlocks, and you find out from an angry email a week later. A monthly look costs five minutes.
When it signals a bigger problem
If you fixed the secret and the event list and it still fails, or your app handles money in several places, the webhook is rarely the only weak spot. Payment logic that was generated in pieces often has gaps: no record of which events were processed, no handling for failed renewals or refunds, and keys stored where they should not be. My guide on whether your app is production-ready lists what else to check, and how to move an AI-built app to production covers the wider move to a proper live setup. If you would rather hand it over, hiring a Lovable developer explains what to ask for.
How I'd approach this
I would not start by rewriting anything. I would open Stripe, read the delivery status on one failed order, and match it to the table above. Most of the time the answer is a secret that does not belong to that endpoint, or a live-mode endpoint that was never created.
I would also set a rule for any app that takes money: a real person checks one real purchase end to end after every change to billing, hosting or keys. AI builders can change code you did not ask them to touch, so billing is where a regular check pays off.
If you are stuck after the five checks, that is a good time to pay for a fix instead of burning more credits in the builder. Blur Studio fixes and finishes start around $1,500, agreed in writing before work starts. A fix of this kind usually means making the webhook safe, logging what it does, and writing down how to test it so you can check it yourself next month.
Questions people ask
Why does Stripe show the payment succeeded but my app does not update?
The payment and the notice to your app are two separate steps. The charge can succeed while the webhook message fails to arrive, is rejected for a wrong signing secret, or is sent to an endpoint that was set up in the wrong mode. Check the endpoint's recent deliveries in Stripe first.
Why does my Stripe webhook work in test mode but not live?
Test and live are separate in Stripe, and so are their webhook endpoints and signing secrets. Create a live-mode endpoint, copy its own whsec_ secret into your live app, and confirm your products and prices exist in live mode with live price IDs.
Why is my Stripe CLI webhook not working locally?
The usual causes are using the Dashboard secret instead of the secret that stripe listen prints, forwarding to the wrong port or path, or a framework that changes the raw body before the signature check. Stripe says the CLI secret and the Dashboard secret are different.
Does Stripe retry a failed webhook?
Yes. In live mode Stripe keeps retrying for up to three days with growing gaps. In a sandbox it retries three times over a few hours. You can also resend an event by hand from the Dashboard for up to 15 days, or with the CLI for up to 30 days. Your app must cope with getting the same event twice.
Does my Lovable app need webhooks at all?
Not always. Lovable's docs say its Stripe integration does not use webhooks by default and checks payment status directly with Stripe. You need one if something must happen the moment Stripe reports an event, such as fulfilling an order. For other background-task gaps, read why AI-built apps break.
Can I just ask the AI builder to fix it?
You can try, and it is worth one attempt if you give it the exact status code from the Stripe delivery log. If it loops without progress, stop and bring in a developer, because repeated rewrites can break the parts that work. Here is what to look for in a Lovable developer.
More in this topic: Problem solving: AI-built and no-code apps (26 guides) →
Sources
- Receive Stripe events in your webhook endpoint (Stripe documentation)
- Resolve webhook signature verification errors (Stripe documentation)
- API keys, sandbox and live mode, and webhook signing secrets (Stripe documentation)
- Connect your own Stripe account to Lovable (Lovable documentation)
- Securing Edge Functions (Supabase documentation)
- Handling Stripe webhooks in an Edge Function (Supabase documentation)