Skip to content

All posts

The customer paid, but your app never heard about it

Payment webhooks fail quietly in many vibe-coded apps. Customers are charged, your app records nothing, and nobody notices until someone complains.

4 min readvibe coding issues, payments, stripe, webhooks

A customer pays for a booking. Stripe takes the money and shows a success page. Your app never marks the booking as paid, because the message that was supposed to tell it never arrived, or arrived and was ignored.

Now you have a customer who paid for something your system says they did not buy.

What it looks like in your app

The checkout looks perfect in testing. In real life you get a trickle of emails: "I paid but I do not have access." You check Stripe and the payment is there. You check your database and it is not. You fix it by hand, apologise, and hope it was a one-off.

It rarely is. One consultant who rescues these apps describes a case where roughly 15 percent of successful payments were never recorded. Treat that as one story rather than an average, but it shows how a small leak adds up.

Why vibe-coded apps end up here

When a customer pays, there are two separate things that happen. The customer's browser is sent to a "thank you" page. And separately, Stripe sends a message called a webhook to your server saying "this payment succeeded." Only the second one is reliable. Customers close tabs, lose signal, or never return from the payment page.

AI tools often take a shortcut: when the thank-you page loads, mark the order as paid. That works in testing, because you always reach the page. It fails when a real customer's phone drops out at the wrong moment.

The webhook code, when it exists, tends to cover only the happy path. Common gaps:

  • No signature check. Anyone who knows the address can post "payment succeeded" to your server. Stripe signs each message so you can tell it is real. Skipping that check lets people give themselves free access.
  • No handling of repeats. Stripe will send the same event more than once if your server is slow. Without care, a customer gets two orders or two emails.
  • Silent failures. If your server returns an error, Stripe retries for a while and then gives up. If nobody looks, the order is lost.
  • Missing cases. Failed renewals, refunds and disputes often have no code at all.

Check it in five minutes

  1. In the Stripe dashboard, open Developers, then Webhooks. Is there an endpoint pointing at your live site, and is it the live-mode one rather than test?
  2. Open its recent deliveries. Any red marks or non-200 responses are lost orders.
  3. In your own app, find the code that marks an order paid. Is it triggered by the thank-you page, or by the webhook?
  4. Send a test event from the dashboard and see whether your database changes.

How to fix it

  • Make the webhook the only thing that marks an order paid. The thank-you page can show "we are confirming your payment" and wait.
  • Verify the signature on every webhook, using the signing secret from the dashboard. Stripe's webhook guide walks through it.
  • Store the event id of everything you process, and ignore an id you have seen before.
  • Log every webhook that fails, and set up an alert for it. A failed payment event is the kind of error you want an email about.
  • Test the unhappy cases in Stripe's test mode: a declined card, a refund, a renewal that fails.

A prompt to start with: "Change the payment flow so orders are only marked paid by a verified Stripe webhook. Verify the signature, ignore duplicate event ids, and log and alert on any failure."

Where we come in

This is one of the four things our audit always checks, because the cost of getting it wrong is real money and real customers. Send us a link and tell us which tool built the app. The report will name the file and the line.

Can we watch how you use this site?

We use Microsoft Clarity to see where visitors click and scroll, so we can fix confusing pages. It sets cookies and records your visit. Nothing loads unless you say yes.

Read the privacy notice