Senior software engineering · Vancouver, BC · Making software since 1994[email protected] · US and Canadian business hours

Insights

Paid in Stripe, Nothing Changed in the App

The payment shows in Stripe. The customer is still on the free plan, or sees "payment pending" forever. In an app built with an AI tool on Supabase, the cause is nearly always the webhook: the call Stripe makes to tell your app that someone paid.

How the payment reaches your app

The checkout page belongs to Stripe. When the payment succeeds, Stripe sends a message, a webhook event, to an address in your app. In most apps built with Lovable, Bolt or v0 that address is a small Supabase Edge Function. The function checks that the message really came from Stripe, then updates the customer's record in your database.

If any link in that chain breaks, Stripe keeps the money and your app never hears about it. The redirect back to your "thank you" page is not proof of payment, so a well-built app waits for the webhook.

Check these, in order

1. Is Stripe calling the right address?

In Stripe, open the webhook endpoint under Workbench, Webhooks, and look at Event deliveries. Each event shows whether it was delivered, pending or failed, with the status code your app returned.

  • No endpoint at all, or one that points to an old preview address: add or fix it. Stripe treats a redirect (a 3xx code) as a failure, so use the final address, not one that forwards.
  • Errors with 401: see step 3.
  • Errors with 400: see step 2.

2. Does the signing secret match?

Every endpoint has its own signing secret, starting with whsec_. Stripe's documentation is direct about the trap: if the same endpoint is used with test and live keys, "the secret is different for each one". An app tested in test mode and switched to live keys often still holds the test secret, and every live event fails the signature check.

The fix: copy the secret from the live endpoint into the function's secret setting in Supabase, not into the code.

3. Is Supabase turning Stripe away?

By default, a Supabase Edge Function expects a signed-in user's token. Stripe has none, so the function answers 401 before your code runs. Supabase's own Stripe example deploys the webhook function with that check off (verify_jwt = false), because the Stripe signature does the checking instead. Turn the check off for this one function only, and keep the signature check in the code.

4. Is the code reading the raw message?

The signature is computed over the exact bytes Stripe sent. Stripe: "Any manipulation to the raw body of the request causes the verification to fail." In a Supabase function, that means reading the body with req.text(), not req.json(), and verifying with constructEventAsync. AI tools sometimes "fix" a failing webhook by parsing the JSON first, which makes it fail for good, or by removing the signature check, which makes it accept messages from anyone.

5. Does it handle the same event twice?

Stripe retries an event it could not deliver, for up to three days in live mode, and may occasionally deliver the same event more than once. Events can also arrive out of order. A function that adds credits on every delivery can give a customer two months for one payment. Store each event's ID and skip the ones already processed.

After the fix

Resend the failed events from the Stripe Dashboard (it works for up to 15 days after the event) so the customers who already paid get what they paid for. Then make one test purchase in test mode and one small real one, and watch both arrive in Event deliveries with a 200.

Questions

Can I just mark the customer as paid on the thank-you page?

Not on its own. Anyone can open that page without paying. Use it to show a message; let the webhook change what the customer can access.

Why did it work in test mode?

Test mode has its own keys, its own endpoints and its own signing secrets. Moving to live means each of those has to be set again.

Should the AI tool fix this?

It can, if you tell it exactly which step failed and what the Event deliveries tab shows. "Payments don't work" tends to produce a rewrite. Never paste your Stripe secret key into the chat.

Customers paid and nothing changed? Get a free first look: send the link and what the Event deliveries tab shows, never your keys. See also what a fix usually costs.

Sources, opened November 18, 2026: Stripe, Receive Stripe events in your webhook endpoint; Supabase, Handling Stripe webhooks.

Payments landing nowhere?

Send the link, the tool you built with and what Stripe shows for the failed events. A senior engineer replies within one business day.

Get a free first look

Reply within one business day · No passwords or keys, ever