For builders shipping this week
Paid in Stripe, but the plan in your app is still free
Stripe shows the payment as paid. The Lovable, Bolt, or Cursor app still shows the free plan. The success page only means the browser came back. The plan changes when your webhook writes it. If the Upgrade button never opens Stripe, start with Lovable Stripe checkout not working.
Typical symptoms: the receipt or the Checkout page says paid, the return URL loads, and the account is still Free or the Upgrade button is still there. It often worked in the preview, or only for the account you used while building. Check the causes below against one real delivery, not against the success page.
Where to look in Stripe
Stripe's docs say to open Workbench, then the Webhooks tab, then the endpoint, then the Event deliveries tab. If your dashboard still shows Developers, then Webhooks, that list is the same place. Turn the test-mode or sandbox toggle off when the payment was live, and on when you are reproducing it with a test card. Open a delivery to see the URL Stripe called, the event name, the HTTP status, and the response body. A delivery Stripe never attempted will not be in that list. The event can still exist under Events.
1. The endpoint still points at test mode or a preview URL
Test mode and live mode keep separate webhook endpoints. An endpoint you added while the test-mode toggle was on does not receive live payments. A URL that contains localhost, a Vercel preview host, or a Lovable or Bolt preview host is also the wrong target once customers use the published site.
Check: with the live toggle, read the endpoint URL. It should be the public https address customers use, plus the path your handler actually serves. In Event deliveries, a live payment that never appears was not sent to this endpoint. A 404 means Stripe reached a host that has no such path.
Fix: create the endpoint in the same mode as the payment, paste the live URL, and subscribe it to the events in section 4. Redeploy is not required for a URL change in the dashboard. The signing secret will be new. That is section 2.
2. The live signing secret is missing or from the other mode
Each endpoint has its own signing secret, and it starts with whsec_. The secret from the test endpoint does not verify live events. The secret printed by stripe listen only verifies events that the CLI forwards. Your live function has to read the secret of the live endpoint, usually from STRIPE_WEBHOOK_SECRET in Supabase Edge Function secrets or in the host's production environment.
Check: on the endpoint, reveal the signing secret and compare it with the value the deployed function reads. Event deliveries then shows 400 when signature verification fails. Changing an environment variable does not change a function that is already deployed. Redeploy after you paste the secret.
3. The Supabase function still requires a JWT, so Stripe gets 401
Supabase Edge Functions require a valid JWT in the Authorization header unless you turn that off for one function. Stripe does not send a Supabase JWT. The gateway answers 401 and your code never runs, so the function logs can be empty while Event deliveries shows 401.
Supabase's function configuration guide uses the Stripe webhook as the example. The name in the file has to be the deployed function name:
[functions.stripe-webhook] verify_jwt = false
Fix: set verify_jwt = false for that function and redeploy it. The URL is then public, so the function still has to verify the Stripe-Signature header before it writes anything. A 401 that disappears after this change was the gateway, not your SQL.
4. The endpoint is not subscribed to the event that unlocks the plan
Stripe only sends the event types selected on that endpoint. A handler that waits for checkout.session.completed does nothing if the endpoint only lists invoice.paid. Later changes to a subscription arrive as customer.subscription.updated (and customer.subscription.created when it starts). Those are not included just because Checkout completed.
Check: on the endpoint, read the list of events. Then open Event deliveries and see which event name was actually sent. If the payment exists under Events and this endpoint has no delivery for it, add the event on the endpoint. Adding it in the dashboard does not require a code deploy. The handler still has to read that event type instead of ignoring it.
5. The body was parsed before the signature check
Stripe's webhook guide says signature verification needs the raw body. If a framework reads the body as JSON first, the bytes change and constructEvent fails. Event deliveries then shows 400.
const payload = await request.text();
const event = stripe.webhooks.constructEvent(
payload,
request.headers.get("stripe-signature") ?? "",
process.env.STRIPE_WEBHOOK_SECRET ?? "",
);In a Supabase function, use await req.text() the same way. Do not call request.json() before constructEvent.
6. The user is matched by email instead of the id you sent
Checkout can collect a different email from the one on the account. Matching customer_details.email then updates nobody, or the wrong row. Set client_reference_id to your user id when you create the session. That value comes back on checkout.session.completed. customer.subscription.updated does not include client_reference_id. Copy the same id into subscription_data.metadata so subscription events carry it.
await stripe.checkout.sessions.create({
mode: "subscription",
client_reference_id: userId,
subscription_data: { metadata: { user_id: userId } },
// price, success_url, cancel_url
});Check: open the event payload in Event deliveries and look for client_reference_id or metadata.user_id. If those fields are empty, the session was created without them. Fix the create call, then run a new payment. Resending the old event cannot add a field that was never stored.
7. Row Level Security blocks the update
The webhook has no logged-in user. If the function updates the plan with the anon or publishable key, RLS still applies, and an update that matches no policy changes no row. The Supabase client often returns no error for that. The service role key bypasses RLS. It belongs only in the server function, never in frontend code or a VITE_ or NEXT_PUBLIC_ variable.
Check: in the function logs for that event id, see which key the client used and whether the update returned a row. If the log is silent and the row is unchanged, select the row back after the write and treat zero rows as a failure.
8. The delivery is 200, and the database write still failed
Stripe stops retrying when your URL returns 2xx. A handler that catches the database error, logs it, and still returns 200 will show Delivered in Event deliveries while the plan stays free. Return 500 when the write fails. Stripe keeps the delivery failed and you can resend it after the fix. Stripe's webhook guide says a 200 means the endpoint accepted the event, and that you can resend a delivery from that event in the dashboard.
Verify the fix
- Deploy the handler, the secret, and the verify_jwt change before you resend.
- In Event deliveries, open the failed payment and choose Resend. A new attempt should be 2xx. Read the response body, not only the badge.
- For a fresh check, run one payment in the same mode as the endpoint. In test mode, Stripe's test card is
4242 4242 4242 4242. Live mode needs a live endpoint and the live secret. - Open that user in the app or the database. The plan row has to be the paid plan. A 2xx with the old row is not a fix.
What FirstUser can check here
FirstUser opens your public URL in a fresh browser, signs up, confirms email when it can see the message, logs in, and then runs a checkout step. That step looks for a link named pricing, checkout, upgrade, subscribe, or billing. If it finds one, it clicks it. If it does not, it tries the checkout path you set, then /pricing and /checkout on the same site. It passes only when the page shows a price, a dollar, euro, or pound amount. The saved pass message is "Opened the pricing or checkout page and found a price." When the step runs, it tries to store a JPEG of the page it ended on.
It stops there. It does not enter a card, does not finish payment, and does not read the plan after payment. It cannot tell you that a webhook failed. Use the free test to see whether a new visitor can reach a price. Use Event deliveries to see whether a payment updated the plan. A Bolt app whose price page disappeared is covered in Test a Bolt app checkout. The shorter German note is Bezahlt, aber kein Pro.
FAQ
Stripe says the payment succeeded, and the app still shows the free plan. Where do I look first?
Open the Stripe Dashboard, then Workbench and the Webhooks tab. If your account still shows Developers, then Webhooks, that is the same list. For a live payment, turn the test-mode or sandbox toggle off. Open the endpoint whose URL is your live site, then Event deliveries. A missing delivery, a 401, or a 400 is the handler. A 200 still needs a check that this user's plan row changed.
The delivery is 200. Does that mean the plan updated?
No. Stripe records that your URL returned 200. If the handler catches a database error, or the update matches no row, and still returns 200, Stripe will not retry. Compare that event id with your function logs, and read the plan row for the same user id.
Why does this work in test mode and fail after I switch to live?
Test mode and live mode have separate endpoints, separate signing secrets, and separate prices. An endpoint created while the test-mode toggle was on does not receive live events. Copy the whsec_ secret from the live endpoint into the environment the live function reads, then redeploy that function.
Can FirstUser tell me the plan changed after payment?
No. The checkout step looks for a link named pricing, checkout, upgrade, subscribe, or billing. It passes only when that page shows a price, and the saved message is "Opened the pricing or checkout page and found a price." It does not enter a card, does not finish payment, and does not read the plan afterward. It can show that a new visitor never reached a price. Whether payment updated the plan is the webhook check on this page.