Introduction
A customer paid, Razorpay shows the money, and your WooCommerce order still says "Pending payment" or never appeared. The usual cause is not the payment: it is that your store never received, or rejected, Razorpay's server notification (the webhook) that says the payment succeeded. Work through the checks below in order. Most stores find the cause in the first three.
Do not refund automatically and do not ask the customer to pay again until you have checked the payment status in Razorpay.
Why this happens
When a customer pays, two separate messages travel. The first goes through the customer's browser: after payment, the checkout page sends the payment result back to your store. If the customer closes the tab, loses signal or is switched to another app (common with UPI), that message never arrives. The second goes directly from Razorpay's servers to your store: the webhook. Razorpay's documentation describes webhooks as server-to-server notifications sent asynchronously when events occur, such as payment.authorized or order.paid (Razorpay webhooks). It also says that capturing payments for which you did not get a response on the client side is "perhaps the most important use case" for the payment.authorized event. If the browser message fails and the webhook also fails, the order stays pending.
Step 1: check the payment status in Razorpay
Open the payment in your Razorpay dashboard and note its status.
- Captured. The money is yours, and the problem is on your store side. Continue to step 2.
- Authorized, not captured. The bank approved it but the payment has not been captured. Razorpay states that payments in the authorized state must be captured within 3 days of creation, and that payments not captured within that period are refunded automatically to the customer (payment capture settings). Check your capture setting in the dashboard. Only the Razorpay account owner can change it.
- Late authorization. Razorpay's docs explain that when the bank's status does not reach Razorpay immediately, it polls for up to 3 days, so a payment shown as failed can later become authorized. Do not cancel the order in the first hours.
- Failed. The customer was not charged. If they report a debit, ask them to wait for the bank's automatic reversal and share the bank reference.
Step 2: read the WooCommerce order notes
Open the order and read the notes on the right. Look for lines about the Razorpay payment ID, a signature check or a cancellation. The note "Unpaid order cancelled - time limit reached." means WooCommerce's own unpaid-order timer cancelled the order, which is a different problem: see WooCommerce orders cancelled automatically.
Step 3: check that the webhook exists and points to your store
In the Razorpay dashboard, open Webhooks. You need an active webhook that points at your current store address. For the official Razorpay WooCommerce plugin, the webhook address is your site's admin-post.php address with ?action=rzp_wc_webhook added, as set in the plugin's code; the plugin can create the webhook for you when you save its settings. Check that:
- the address uses your live domain, with the right
https://andwwwform, with no leftover staging domain; - the events include
payment.authorized(and ideallyorder.paidandpayment.failed); - the webhook is active, not disabled.
If you changed your domain recently, the old webhook may still point to the old one.
Step 4: check the webhook secret
Razorpay signs each webhook with your secret, and the signature arrives in the X-Razorpay-Signature header. Razorpay says the signature is calculated with HMAC SHA256, using the webhook secret as the key and the raw request body as the message (validate and test webhooks). If the secret in your Razorpay webhook settings differs from the secret saved in the WooCommerce plugin settings, every webhook fails verification, and the order is never updated. Razorpay also notes that if you change the webhook secret, retries of older events must be validated with the old secret, because the new one causes a mismatch. Re-save the same secret in both places.
Step 5: look for something blocking Razorpay
Razorpay's request is an HTTP POST from outside your site. These commonly block it:
- a firewall or security plugin (including your host's firewall or Cloudflare rules) blocking unknown POST requests to
admin-post.php; - a maintenance-mode or "coming soon" plugin returning a page instead of the store;
- password protection (HTTP authentication) on the site or on a staging copy;
- a redirect from
http://tohttps://or betweenwwwand non-www. A redirect can drop the POST body, so use the final address in the webhook.
Check your host's firewall log and your security plugin's blocked-requests log for requests from Razorpay around the payment time.
Free quote · reply within 24 hours
Stuck with a slow or broken WordPress site?
Tell us what's wrong. You get a fixed written quote to fix it, or rebuild it, within 24 hours.
Step 6: allow time, and check WordPress cron
The plugin's code logs that it handles the payment.authorized event "by cron", and its changelog for version 3.9.4 says "Added delay of 5 minutes to webhook process". So a short delay before the order updates can be normal. If orders stay pending long after that, confirm that WordPress scheduled tasks run. If DISABLE_WP_CRON is set in your configuration, a real server cron job must call wp-cron.php. You can check your plugin version in the plugins list, as behaviour changes between versions.
Step 7: test the webhook
Razorpay lets you test webhooks in test mode: you can set up a webhook, trigger test events from a test transaction and check whether your endpoint receives them (validate and test webhooks). Run one test payment on your staging copy or in test mode and watch the order notes.
Step 8: fix the orders that are already stuck
For each affected order:
- Confirm in the Razorpay dashboard that the payment is captured for the right amount and matches the order.
- If it is captured, change the order to Processing (or Completed for digital goods), and add a note with the Razorpay payment ID.
- If it is only authorized, capture it from the dashboard if you want the sale, within the 3-day window.
- If the customer paid twice, refund the extra payment from Razorpay.
Keep a list so finance can reconcile the orders later.
Step 9: stop it happening again
- Make sure the webhook is reachable and verified, then run a real low-value live order and refund it.
- Razorpay warns that the same webhook event can arrive more than once and recommends identifying duplicates with the
x-razorpay-event-idheader. The official plugin checks if an order is already paid before acting. If you have custom code, add the same check. - Do not rely on the customer's browser reaching the thank-you page. Treat the webhook as the source of truth.
- Check "Pending payment" orders daily during sales.
When to call a developer
If the dashboard shows captured payments, the webhook is active, the secrets match, nothing is blocked and orders still do not update, the cause is in code or hosting: a conflicting plugin, a custom checkout, a cache serving old pages to the webhook, or a theme overriding checkout behaviour. A developer can read the plugin's debug log, replay a webhook and trace the request. Our WooCommerce payment integration and checkout troubleshooting covers this, and our guide on WooCommerce orders stuck on pending payment lists causes common to all gateways. See also WooCommerce payment gateways for India.
Frequently asked questions
Should I refund the customer if the order is pending?
Not at first. Check the payment status. If it is captured, complete the order. If it is only authorized, capture it or let it be refunded automatically after the window. If it failed, the customer was not charged.
How long should I wait before worrying?
The plugin's changelog mentions a 5-minute delay in webhook processing. Razorpay also polls late authorizations for up to 3 days, so a payment can change status after the customer leaves. If a captured payment still has no matching paid order after 15 to 30 minutes, start the checks above.
Why does it happen mostly with UPI?
UPI payments often involve the customer switching to another app and back. If they do not return to your site, the browser message is lost, and the order relies fully on the webhook.
Can I just mark orders as paid manually?
Yes, after you confirm the payment in the Razorpay dashboard, and add the payment ID as a note. Fix the webhook so you do not have to keep doing it.
Does this apply to Cashfree or PayU?
The same pattern applies: the browser return can fail, and a verified server notification is the reliable signal. The settings and addresses differ by gateway.
Conclusion
Need a second pair of eyes on a checkout that is losing orders? Message us on WhatsApp at +91 73482 28167 and you get a fixed written quote within one working day.
Free quote · reply within 24 hours
Want a fixed price for your project?
Tell us what's wrong. You get a fixed written quote to fix it, or rebuild it, within 24 hours.
Keep reading on WordPress & WooCommerce
- My WordPress site got hacked: how to clean it and stop it happening againWordPress site hacked? What to do in the first hour, how to clean it properly, how to get Google's warning removed, and how to stop it happening again.
- WooCommerce Payment Gateways in India: 6 Compared (2026)Compare Razorpay, PayU, Cashfree, PhonePe, Paytm and CCAvenue for WooCommerce in India: payment methods, refunds, plugin needs and pricing links.
- Best WooCommerce Caching Plugins (2026): 4 ComparedCompare WP Rocket, LiteSpeed Cache, W3 Total Cache and WP Super Cache for WooCommerce: page vs object cache, CDN, cart exclusions and Core Web Vitals.
