Last checked against the vendors' documentation on 28 November 2026. Stripe, Supabase and Lovable change their dashboards often, so if a menu name differs, search the page for the term in bold.
A customer pays. Stripe shows the payment as succeeded. Your Lovable app shows nothing: no order row, no access granted, no confirmation email. The money is in Stripe and your app does not know.
This is almost never a Stripe fault. It is a missing or broken link between Stripe and your app's database, and it is fixable in an afternoon once you know which link. This guide walks the links in order, the way you would debug them with the evidence Stripe, Supabase and Lovable already keep for you.
Why the order is missing
Lovable's Stripe integration works without webhooks by default. Its own documentation says "by default, the integration does not use webhooks": your app asks Stripe directly whether a signed-in customer has an active subscription, matching customers by email - Lovable docs. That is enough to unlock a subscription feature. It is not enough to create an order record in your own database, because nothing is listening for the moment a payment completes.
Stripe is blunt about this. Its fulfillment guide says you cannot rely on triggering fulfillment only from your checkout landing page, because a customer can pay successfully and lose their connection before the page loads, and it states that automatic fulfillment with webhooks is required for subscriptions and for payment methods with delayed success notification - Stripe, Fulfill orders.
So the real question is one of five:
- No webhook endpoint exists at all.
- An endpoint exists but Stripe cannot deliver events to it.
- Stripe delivers, but your function rejects the signature.
- Stripe delivers and your function answers 200, but the order is never written.
- The order is written, but twice, or in the wrong order.
You can tell which one in about five minutes.
Step 1: Read the evidence in three places
Stripe. Open the Webhooks tab in Workbench, select your endpoint, then open the Event deliveries tab. It lists each event as Delivered, Pending or Failed, and clicking one shows the HTTP status code of the attempt and the time of the next retry - Stripe webhooks. If the Webhooks tab lists no endpoint, you have failure 1 and can skip to that section.
Supabase (if your project uses it). Open Edge Functions, pick the function, and open its Logs tab. It shows one row per request with the status code and execution time, plus whatever your code printed with console.log, console.warn and console.error. Request and response bodies are not logged, so print the values you need from inside the function - Supabase logging.
Lovable. If your project uses Lovable's built-in backend, the logs are under More, then Settings, then Logs. With your own Supabase project, use the Edge Functions logs above, and Stripe's own Developers, then Logs shows the API requests Stripe received - Lovable docs.
Now match what you see:
| What you see | Failure | Go to |
|---|---|---|
| No endpoint in Stripe's Webhooks tab | 1 | Step 2 |
| Event deliveries show Failed with 3xx, 4xx, 5xx, TLS or timeout | 2 | Step 3 |
| Failed with 400 and your logs mention a signature | 3 | Step 4 |
| Delivered with 200, no row in your table | 4 | Step 5 |
| Rows exist but doubled or out of order | 5 | Step 6 |
Step 2: Failure 1, there is no webhook
Ask Lovable to add one. Lovable's documentation says it writes the webhook function for you, and that you then finish setup in Stripe: create an event destination that points to the function's URL, select the events, and add the signing secret when Lovable asks for it - Lovable docs. Stripe's Dashboard flow is the Webhooks tab in Workbench, then Create an event destination, then Webhook endpoint as the destination type, then your endpoint URL. A signing secret beginning with whsec_ appears on the settings page - Stripe webhooks.
Which events to select depends on what you sell:
- For a one-time purchase through Checkout, Stripe's fulfillment guide listens for
checkout.session.completed. - If you accept delayed payment methods such as ACH direct debit, also listen for
checkout.session.async_payment_succeeded, which fires when the money arrives later - Stripe, Fulfill orders. - Lovable's own examples are
payment_intent.succeededandcustomer.subscription.updated. Pick the smallest set your app really needs. Stripe advises receiving only the event types your integration requires - Stripe webhooks.
The prompt near the end of this guide is a starting point for asking Lovable to build the function correctly the first time.
Step 3: Failure 2, Stripe cannot deliver
Stripe's debugging table is the fastest map from status code to cause. Redirects count as failures, which catches many apps that register http:// or a non-canonical domain - Stripe webhooks.
| Status in Event deliveries | What it means | Fix |
|---|---|---|
| Unable to connect | Stripe cannot reach the server | Make sure the host is publicly accessible |
| 3xx, such as 302 | The server tried to redirect, which Stripe treats as a failure | Register the final URL the redirect resolves to |
| 4xx, such as 401, 403, 404, 405 | The server refuses, the URL is restricted, or the path does not exist | Make the endpoint public and accept the POST method |
| 5xx | Your code threw an error | Read the function logs for the cause |
| TLS error | A certificate or intermediate certificate problem | Run an SSL server test; Stripe needs TLS 1.2 or higher |
| Timed out | The server answered too slowly | Defer heavy work and return a 2xx immediately |
The Supabase-specific 401. Edge Functions check for a signed-in user's token before your code runs. Supabase's documentation says the default is verify_jwt = true, so the platform validates the JWT before your handler runs. A Stripe request carries no such token, so it is refused before your code runs, and Event deliveries shows a 4xx status, usually 401. For external webhooks such as Stripe, the documented approach is to set verify_jwt to false for that one function in supabase/config.toml under [functions.your-function], and then verify the provider's signature inside the handler - Supabase function auth.
Read the warning that goes with it: turning JWT verification off removes the platform's check, so the signature check in your code is now the only thing that verifies the caller. Never turn it off without adding that check. If your Lovable project uses the built-in backend, ask Lovable to make the webhook function publicly callable with Stripe signature verification, rather than editing configuration yourself.
Step 4: Failure 3, the signature check fails
A 400 with a signature message means the function received the request and refused it. Three causes cover almost every case.
The body was changed before verification. Stripe requires the raw body of the request to verify the signature, and any manipulation of that body, including parsing it as JSON first, causes verification to fail - Stripe webhooks. Supabase's own Stripe example reads the body with req.text() and verifies it with constructEventAsync, using a SubtleCryptoProvider so the check runs on Deno's Web Crypto API - Supabase Stripe webhook example:
const body = await req.text()
receivedEvent = await stripe.webhooks.constructEventAsync(
body,
signature!,
Deno.env.get('STRIPE_WEBHOOK_SIGNING_SECRET')!,
undefined,
cryptoProvider
)
The secret belongs to a different endpoint or mode. Stripe generates a unique secret for each endpoint, and if one endpoint serves both test and live keys, the secret is different for each - Stripe webhooks. A function deployed with the test secret will reject every live payment. Reveal the secret on the exact endpoint that is failing and compare it with the value stored in your function's secrets. Supabase reads secrets in a function with Deno.env.get, and a newly set secret is available immediately without a redeploy - Supabase secrets.
The secret was rolled. If someone rolled the endpoint secret in Workbench, the old value stops matching once it expires. Stripe lets you keep the previous secret active for up to 7 days while you update your code - Stripe webhooks.
Step 5: Failure 4, delivered with 200 but no order
This is the most confusing case, because Stripe is happy and your logs look clean. The handler ran, answered, and wrote nothing. Check these in order.
You are looking at the wrong mode. The key decides the mode: a sk_test_ key uses Stripe test mode, and Lovable warns that the preview has no separate test environment, so with a live key, payments made from the preview are real. Price IDs also differ between test and live mode, so check which set your app is using - Lovable docs. If you look at live payments in Stripe, check the live-mode endpoint and the live signing secret, not the test ones.
Row Level Security blocked the write. Supabase's documentation says that once RLS is enabled, no data is accessible through the API when using a publishable key until you create policies, and that a missing grant raises a 42501 error before any policy runs - Supabase Row Level Security. A webhook has no signed-in user, so it should write with a secret key that lives only inside the function. That key bypasses RLS, and Supabase says never to use a secret key in the browser or expose it to customers - Supabase Row Level Security. Edge Functions receive default secrets, including SUPABASE_URL and the secret keys, so you do not need to paste one into your code - Supabase secrets.
The write failed and nobody noticed. Make the handler log the result of the database write, and return a 500 when it fails. A non-2xx answer is what makes Stripe retry: in live mode it keeps trying for up to three days with exponential backoff, while events created in a sandbox are retried three times over a few hours - Stripe webhooks. A handler that swallows the error and returns 200 tells Stripe the order was saved, so no retry ever comes.
The handler did too much before answering. Stripe asks for a quick 2xx before any complex logic, and with a success page configured, hosted Checkout waits up to 10 seconds for your webhook response before redirecting the customer - Stripe, Fulfill orders. Keep the function small: verify, write one row, answer.
Step 6: Failure 5, duplicates and ordering
Webhook endpoints occasionally receive the same event more than once, and Stripe does not guarantee events arrive in the order they were generated. Stripe's advice is to log the event IDs you have processed and skip those you have seen, and never to depend on a specific order - Stripe webhooks.
For an order table the simplest guard is a unique constraint on the Stripe Checkout Session ID, with the handler inserting or updating on that key. Stripe's fulfillment guide says the function must correctly handle being called multiple times with the same Checkout Session ID, possibly concurrently, and must record fulfillment status - Stripe, Fulfill orders. That one constraint also protects you from the next rule: do both.
Paid but still locked out of a subscription feature
If the order row is fine but a paying customer cannot get into the paid part of the app, check the email first. Lovable's documentation says subscriptions are checked live: the app asks Stripe whether the signed-in user has an active subscription, and it matches users by email address - Lovable docs. A customer who signed up to your app with one address and paid in Stripe Checkout with another is a mismatch to rule out before anything else. Compare the email on the Stripe payment with the email on the account in your app, and test with a payment made with the same address.
The same page notes that the key sets the mode, so a subscription bought in test mode does not exist for a live key, and the reverse. Look at the customer in the Stripe mode your app is actually calling.
Use the webhook and the landing page together
Stripe recommends combining both. The webhook is required so fulfillment happens for every payment, even when the customer never returns. The landing page, reached through a success_url containing the {CHECKOUT_SESSION_ID} placeholder, runs the same fulfillment function so the customer sees their order immediately even if the webhook is delayed - Stripe, Fulfill orders. Because both call one idempotent function, whichever arrives first wins and the second does nothing.
Replay the missed payments
You do not need customers to pay again, and you do not need to ask them to. Stripe keeps the events:
- In the Dashboard, open the event and click Resend. This works for up to 15 days after the event was created.
- With the Stripe CLI,
stripe events resend <event_id> --webhook-endpoint=<endpoint_id>works for up to 30 days. - A manual resend does not cancel Stripe's automatic retries, so make sure the handler is idempotent first.
All three points are in Stripe webhooks. For payments older than that, list the paid Checkout Sessions in Stripe and create the missing rows once by hand, using the Checkout Session ID as the key.
A prompt to give Lovable
Results vary, so read what it builds against the steps above. This asks for the pieces that fail most often:
Add a Stripe webhook as a public Edge Function named stripe-webhook.
- Turn off JWT verification for this function only, and verify the
Stripe-Signature header against the raw request body using the endpoint
signing secret stored as a secret. Return 400 if verification fails.
- Handle checkout.session.completed and checkout.session.async_payment_succeeded.
- Retrieve the Checkout Session from Stripe, check payment_status, and insert
one row into orders keyed by the Checkout Session ID with a unique
constraint, so repeats do nothing.
- Write with the server-side secret key from the function environment, never
from the browser. Log the event id and the result of the write.
- Return 500 if the write fails and 200 only after it succeeds.
- Tell me the function URL so I can add it in the Stripe Webhooks tab, and
which secret name to fill with the signing secret.
Then test with a real Checkout in test mode: Lovable's documentation gives Stripe's test card 4242 4242 4242 4242 with a test key. Confirm one order row appears and that Event deliveries shows 200 - Lovable docs. Before taking real money, switch to a live key and live price IDs, add a live-mode endpoint with its own signing secret, and run one real purchase on the published app.
Two other launch checks belong next to this one: make sure no secret key ever reaches the browser, which the security checklist for AI-built apps covers, and decide where the app will live once Lovable's preview is not enough, as in where to deploy your app and when to graduate from a vibe coding tool.
If you would rather hand it over
Founden wrote this guide and also sells help with this kind of launch blocker, so weigh the next paragraph accordingly.
Founden is an AI that builds and runs companies. Its finish-your-app offer opens a separate Founden project from what you can share (a public repository, a public preview, or screenshots and notes) plus one workflow to keep and one launch blocker to clear, such as the order that never gets saved. Building starts with Pro at $29 a month, the account is free, and your original app, hosting and database stay on your own setup. It cannot touch your Stripe account without access you give it, and a real payment flow still needs your own access to the payment and email services. If that fits, scope your release. If not, the steps above are the whole job.
In this topic: Building with AI
- Move a Base44 App Off Base44: What the Docs Allow
- Export a Replit App: Code, Database and Secrets Guide
- Move a Lovable App to Your Own Hosting: What Carries Over
- Lovable Supabase RLS: Empty Data or Error 42501 Fix
- Gumroad Alternatives: Lower Fees, Tax and How to Move
- Carrd Alternatives 2026: Costs, Limits and How to Move
- WordPress Alternatives 2026: Costs, Security and Moving
- Kajabi Alternatives: Real Yearly Costs and How to Move
How do you build software with AI? Every guide on it
Data behind this topic: AI app builders and coding agents: free and first paid plans.