Payment Went Through but the Order Did Not Update

Customer paid but your AI-built app shows the order as pending? It is usually a webhook problem. Here are the causes and what to check in Stripe or Razorpay.

Uday M7 min read

The money moved because the payment provider recorded it. Your app did not update the order because it never got, or never accepted, the provider's follow-up message, called a webhook. The usual reasons are that the webhook was never set up, the app is checking it against the wrong secret, the endpoint was down or too slow, or you are mixing test and live settings.

What is a webhook, in plain words?#

A webhook is a message that Stripe or Razorpay sends to a web address in your app when something happens, such as a payment succeeding. Think of it as a delivery notification. The customer's payment is the parcel. The webhook is the text message to your app saying it has arrived.

Stripe describes it this way: after you register an endpoint, Stripe pushes data to it when events happen in your account. It also notes that webhooks help you respond to asynchronous events, such as a customer's bank confirming a payment (Stripe docs). That word matters. The payment can finish after the customer has left your site, so the app cannot rely on the customer's browser to report it.

If the text message never arrives, or arrives and is thrown away, the order stays "pending" forever. The payment itself is fine.

Was the webhook ever set up?#

This is the most common gap, and it is easy to check. Stripe says you register an endpoint, with a public HTTPS address, in the Webhooks tab of its dashboard tool called Workbench, and choose which event types to receive (Stripe docs). Razorpay works the same way: you add a webhook with a URL and a secret in its dashboard.

AI tools often build the checkout button and the thank-you page, and skip this step or leave a placeholder address. The code to receive the message may exist, but the provider was never told where to send it.

A working checkout button proves nothing about the message that comes after it.

Is the app using the wrong signing secret?#

Providers sign every webhook so your app can tell it is genuine. Stripe signs with a secret beginning whsec_, one per endpoint, and says the secret is different for test and live keys even on the same endpoint (Stripe docs). Razorpay sends a signature in the X-Razorpay-Signature header, built from the webhook secret you set and the raw request body (Razorpay docs).

If the secret stored in your app does not match, the app rejects real messages as fakes. Both providers also warn that the app must check the raw, untouched body. Stripe says any manipulation of the raw body causes verification to fail. Razorpay says not to parse or cast it before checking. A framework that quietly reformats the data before checking is a classic failure.

From hands-on work, Uday's list of what shows up when opening AI-built code includes failed auth mechanisms. A signature check that always fails is one form of that.

Was the endpoint down, slow or redirecting?#

Stripe says your endpoint must quickly return a success status (any 2xx) before doing any complex work. If the app does slow things first, such as sending emails or calling other services, the provider may give up waiting. Stripe lists a timed-out response as a failure.

Stripe's debugging table lists other failures:

What Stripe seesWhat it means
Unable to connectThe app's address is not reachable from the internet
A 3xx redirectStripe treats a redirect as a failure; use the final address
A 4xx errorThe address is wrong, blocked or does not accept POST requests
A 5xx errorThe app crashed while handling the message
Timed outThe app took too long to answer

Source: Stripe docs. A site that sleeps on a free hosting plan, or a deploy that changed the web address, can cause several of these without anyone noticing.

Razorpay's own blog says receivers have a five-second response window, that failed deliveries are retried with exponential backoff over 24 hours, and that a webhook can be disabled after persistent failure (Razorpay blog). That is the provider describing its own behaviour. It also says Razorpay does not publish an exact retry timetable, so do not plan around those numbers.

Why would the same event arrive twice, or out of order?#

Stripe says endpoints may occasionally receive the same event more than once, and that delivery order is not guaranteed. Its advice is to log the event IDs you have processed and skip repeats (Stripe docs). Razorpay says the same: duplicates are expected, each event has a unique x-razorpay-event-id header, and order is not guaranteed (Razorpay docs).

An AI-built app that never planned for this can go wrong in two ways. It can double-process a repeat, for example sending two confirmation emails. Or it can receive "captured" before "authorized", find no matching order state, and drop the message. If the app expects one clean message in a fixed order, it will fail in real use.

Are you mixing test and live settings?#

Test and live are separate worlds. Razorpay says test events fire only for transactions made in Test mode (Razorpay docs). Stripe says the signing secret differs between test and live (Stripe docs).

The common mistake: the webhook was registered while testing, then the app went live with live payment keys but kept the test secret, or the live webhook was never created. Payments succeed in live mode and nothing reaches the app. Testing passed, production fails.

What can you check in the dashboard without code?#

You do not need to read code to find out which of the above you are dealing with.

In Stripe:

  1. Open Workbench, go to Webhooks and confirm an endpoint exists for the live account, with a web address you recognise.
  2. Select the endpoint and open the Event deliveries tab. Stripe says it lists events as Delivered, Pending or Failed, and each shows the HTTP status code of the attempt (Stripe docs).
  3. For a failed event, you can click Resend in the dashboard. Stripe says this works for up to 15 days after the event. Resending does not fix the cause, so use it after the app is repaired.

In Razorpay:

  1. Open the dashboard's webhook settings and confirm a webhook is present, active and pointing at the right address for the mode you are in.
  2. Razorpay's blog says dashboard delivery logs cover the last three hours and show request and response headers, and that unacknowledged events up to seven days old can be replayed in limited numbers (Razorpay blog). Check the current Razorpay dashboard, as that is a vendor article rather than reference documentation.

What the results tell you:

What you seeLikely cause
No webhook listedNever set up, or set up in test mode only
Events listed but no delivery attemptsWrong event types selected, or wrong mode
Failed with 4xxWrong address, or the app is rejecting the message
Failed with 5xx or timeoutThe app crashed or answered too slowly
Delivered with 200, order still pendingThe app accepted the message but its own update logic failed

The last row is the one the dashboard cannot explain. A delivered message that does nothing is a bug inside the app, and you need someone to read the code and the logs.

What should you ask your developer?#

Ask four things. Where is the webhook registered, and for which mode? Does the app check the signature against the right secret for that mode? Does it answer quickly and do slow work afterwards? And does it ignore duplicate event IDs?

Uday's notes on AI-built apps include a founder problem that fits here: no way to tell what went wrong when things start to break at scale. A payment that succeeds with no order update is that problem in its purest form. There is no error on screen, only a customer waiting. The fix is logging on the webhook route, so you can see every message received and what happened to it. Also see why AI-built apps break when real users arrive and what to check before launch, and browse the full set of AI-built app guides.

What should you do right now?#

Find the affected customers in your payment dashboard, since the provider's records are the truth. Update those orders by hand, or have them resent after the cause is fixed. Then work down the checks above in order: set up, secret, speed, duplicates, mode. If you are unsure where your business stands more broadly, the free Digital Maturity Calculator is a quick way to see which area needs attention first.

This post is general information, not payment-compliance or legal advice. Provider behaviour changes, so confirm details in the current Stripe or Razorpay documentation.

Frequently asked questions

Can I fix a missed payment webhook myself without code?

You can find out whether the message was sent, whether it failed and what error came back, using the Stripe or Razorpay dashboard. You can also resend a failed event from the dashboard within the time limits the provider sets. Fixing the cause, such as a wrong secret or a crashing endpoint, needs someone who can edit the app.

Should the app trust the page the customer lands on after paying?

No. That page only tells you the customer's browser came back. The provider's webhook is the message that confirms the payment from the provider's side. An app that marks orders paid only because someone reached a thank-you page can be fooled, and can also miss payments when the customer closes the tab.

Why do I get the same payment event twice?

Both Stripe and Razorpay say the same event can arrive more than once. The app should record the event IDs it has handled and ignore repeats, so a customer is not charged in your records twice or sent two confirmation emails.

Sources

U

Uday M

Co-founder, Svarnix

Builds and fixes websites, apps and automations for startups and small businesses.

Keep reading

AI-built apps6 min read

What to Test Before Launching an AI-Built App

A click-through test script for non-technical founders: signup, duplicate email, password reset, mobile data, payment, empty and error states. No code needed.

AI-built apps5 min read

Who Owns Your Lovable or Bolt App's Code?

Who owns the code of an app built with Lovable or Bolt, and can you leave? What each builder's own terms say about ownership, export and training.

AI-built apps5 min read

How to Move Your Lovable App to Your Own Hosting

Moving a Lovable app to GitHub and your own host is easy for the front end and harder for the backend. See the steps, what breaks and what needs a developer.