Stripe checkout worked, but the user wasn't upgraded. Why?

Run a free check: FlowWatch signs up, logs in and runs a Stripe test checkout on your app, then scans for exposed keys. You get a shareable report. Run the free check at flowwatch.org

You built the app with Lovable, Bolt, Cursor or another AI tool. A customer pays, Stripe shows the payment, but in your app they're still on the free plan. Or the reverse: someone gets the paid plan without paying. Both usually come from the same place, which is how your app learns that a payment happened.

The two ways an app can learn about a payment

  1. The success page. Stripe sends the buyer back to a URL like /success, and the app unlocks the plan when that page loads. This is easy for an AI tool to generate, and it's fragile: if the buyer closes the tab early, nothing unlocks. And anyone who visits /success directly may get the plan for free.
  2. A webhook. Stripe calls an endpoint on your server (for example on checkout.session.completed, or checkout.session.async_payment_succeeded for delayed payment methods), your server checks the signature, and then updates the user's plan in your database. This is the reliable way.

Common reasons the upgrade doesn't happen

  • No webhook at all. The app only trusts the success page.
  • The webhook URL points at the wrong place. For example a preview deploy, localhost, or an old domain.
  • Wrong signing secret. The endpoint uses a test-mode whsec_ secret in production (or the reverse), so every event fails signature checks.
  • Test vs live mismatch. Price IDs, keys and webhook endpoints are separate in test mode and live mode.
  • The webhook can't find the user. The checkout session wasn't created with the user's ID (for example in client_reference_id or metadata), so the handler doesn't know whom to upgrade.
  • The handler fails after a deploy. A missing env var on your host, or a database permission (such as RLS) that blocks the server's update.

How to check it in 10 minutes

  1. In the Stripe Dashboard (test mode), open the Webhooks tab in Workbench. Confirm there's an endpoint on your real production domain, subscribed to the events your code handles.
  2. Sign up in your app with a fresh email and buy a plan with test card 4242 4242 4242 4242.
  3. In the webhook's event log, check that the event was delivered with a 2xx response. A 400 often means a signature problem. A 500 means your handler threw an error.
  4. Refresh your app. The plan should show as paid without you touching anything.
  5. Open /success (or whatever your success URL is) in a private window without paying. Nothing should unlock.
  6. Search your front-end JS in DevTools for sk_live, sk_test and whsec_. None of them belong in the browser.

Re-test it after changes

This flow can break on any later prompt or deploy that touches env vars, auth or the database, so run the check again after changes, not just at launch.

Automating it

FlowWatch can run a real signup, login and Stripe test checkout on your app every day, and it emails you if a scheduled check fails and again when it recovers. It only uses Stripe's test card, and it stops before entering anything if your checkout is live. Live keys abort the run. Secrets in the report show only their last four characters. The free check is one signup, login, and Stripe test checkout, plus a leak scan: flowwatch.org.

Contact: hello@flowwatch.org