E-commerce

Payment Gateway Not Working in WooCommerce? Fixing Failed Payments and Pending Orders in India

WooCommerce payment gateway not working in India? Fix failed UPI payments, orders stuck on pending, webhook errors and Razorpay or Cashfree issues.

Payment Gateway Not Working in WooCommerce? Fixing Failed Payments and Pending Orders in India
On this page
  1. Common symptoms and what they usually mean
  2. Step 1: check the gateway settings
  3. Step 2: fix orders stuck on pending payment
  4. Step 3: rule out caching and optimisation
  5. Step 4: look for plugin and theme conflicts
  6. Step 5: check versions and the server
  7. UPI-specific failures
  8. Refunds and customer communication
  9. Gateway account and compliance issues
  10. Testing payments properly
  11. Preventing payment problems
  12. Quick check: after the fix
  13. When to get help
  14. FAQs
Key takeaways
  • Most WooCommerce payment failures in India come from gateway settings, webhooks, caching or plugin conflicts rather than the gateway itself being down.
  • Orders stuck on pending payment usually mean the gateway never told WooCommerce the payment succeeded, so check webhooks and logs first.
  • Test with the gateway's test mode on a staging copy, keep plugins updated and reconcile paid-but-pending orders against the gateway dashboard.

If your WooCommerce payment gateway is not working in India, start with three checks: is the gateway plugin active and in live mode with the right keys, is the gateway able to send webhooks back to your site, and is anything (cache, security plugin, firewall) blocking checkout or the callback. Most failed payments and orders stuck on "Pending payment" trace back to one of these, not to Razorpay, Cashfree, PayU or PhonePe being down.

This guide walks through the common symptoms, what causes them and how to fix each one safely.

Common symptoms and what they usually mean

SymptomLikely causeFirst check
Payment option missing at checkoutGateway disabled, currency not INR, or a conditional rule hiding itWooCommerce, Settings, Payments
Popup does not open or button does nothingJavaScript error, script optimisation or plugin conflictBrowser console, disable JS minify/defer
Customer paid, order stuck on Pending paymentWebhook or callback not reaching the siteGateway webhook logs and WooCommerce logs
Order marked Failed but money deductedBank delay, timeout or missed callbackGateway dashboard payment status
"Invalid key" or authentication errorTest keys in live mode or wrong account keysGateway plugin settings
Worked before, broke after an updatePlugin, theme or PHP version incompatibilityRecent updates, error log
Only UPI failsUPI intent or collect flow issue, app or bank sideGateway status page, test on another app

Step 1: check the gateway settings

  • Go to WooCommerce, Settings, Payments and confirm the gateway is enabled.
  • Check the store currency is INR (or that the gateway supports your currency).
  • Confirm you are using live keys in live mode and test keys in test mode. Mixing them is one of the most common causes after launch.
  • Make sure the keys belong to the right merchant account, especially if an agency or developer set up a test account first.
  • Check your gateway account is fully activated. New accounts can be limited until KYC and website review are complete.

If you are still choosing a gateway, payment gateways in India compared and accepting online payments on WordPress in India cover setup requirements.

Step 2: fix orders stuck on pending payment

This is the most frustrating problem: the customer's money has gone, but WooCommerce still shows "Pending payment", so no confirmation email goes out and stock is not reduced. It usually means the gateway never successfully told your site that the payment succeeded.

  1. Check webhook settings in the gateway dashboard. The webhook URL should match what the plugin expects, with the right events enabled and the correct secret.
  2. Look at webhook delivery logs in the gateway dashboard. Failed deliveries with 403, 404 or 500 errors point to your site blocking or breaking the request.
  3. Check WooCommerce logs under WooCommerce, Status, Logs. Most gateway plugins log callbacks and errors there when debug logging is enabled.
  4. Check firewalls and security plugins. Cloudflare rules, hosting firewalls or WordPress security plugins sometimes block the gateway's server requests.
  5. Check the site is on HTTPS with a valid certificate. SSL certificate errors can break callbacks.

For orders already stuck, compare each one with the gateway dashboard. If the payment shows as captured, mark the order as Processing manually and add a note with the payment ID. Never mark an order paid without confirming in the dashboard.

Step 3: rule out caching and optimisation

Checkout, cart and my-account pages must never be cached. Page caching on these pages can show stale nonces, break the payment popup or show one customer's details to another.

  • Exclude /cart/, /checkout/ and /my-account/ from page caching in your cache plugin and at the host or CDN level.
  • Exclude the gateway's scripts from JavaScript minification, combining and delaying.
  • Temporarily turn off optimisation plugins and test checkout again.

WordPress caching explained covers how the cache layers interact.

Step 4: look for plugin and theme conflicts

Checkout customisation plugins, one-page checkout tools, COD fee plugins and some themes modify checkout in ways that clash with gateway scripts. On a staging copy of the site:

  1. Switch to a default theme like Storefront and test.
  2. Disable plugins except WooCommerce and the gateway, then test.
  3. Re-enable plugins one by one until the problem returns.

The process is covered in troubleshooting WordPress plugin conflicts. Also check the browser console on the checkout page; a red JavaScript error often names the plugin responsible.

If the checkout page itself fails before the gateway ever loads, the cause is usually elsewhere; see what to do when WooCommerce checkout not working is the real problem.

Step 5: check versions and the server

  • Update the gateway plugin, WooCommerce and WordPress, after taking a backup.
  • Confirm your PHP version is supported by the gateway plugin. Updating the PHP version explains how to do this safely.
  • Make sure the server can make outgoing HTTPS requests. Some cheap hosting blocks outbound connections or uses outdated SSL libraries.
  • Check that WP-Cron is running, because some plugins use scheduled tasks to check pending payments.

UPI-specific failures

UPI failures often come from outside your site: the customer's bank, the UPI app or a timeout. Things you can control:

  • Show clear instructions on the payment page about approving the request in the UPI app.
  • Make sure the order is not cancelled too quickly. WooCommerce's hold stock setting can cancel unpaid orders before a slow UPI payment completes.
  • Offer a fallback, such as cards, net banking or COD, so a failed UPI attempt does not lose the sale.
  • Check the gateway's status page for known UPI issues before spending hours debugging.

Refunds and customer communication

When a customer says money was deducted but no order arrived, respond quickly and calmly. Check the gateway dashboard; if the payment failed, the bank usually reverses it automatically within the timeframe the gateway states. If it succeeded, update the order and send the confirmation. A clear note on your FAQ or checkout page about failed payments reduces panic and support load. Good order notifications help customers know where they stand.

Gateway account and compliance issues

Sometimes the site is fine and the problem is on the account side. Indian payment gateways review the website and business before full activation and may limit or pause an account later. Check the gateway dashboard and emails for:

  • Pending KYC or document requests.
  • A website review asking for pages such as contact details, terms, privacy policy, refund and cancellation policy, and shipping policy.
  • Restrictions on certain product categories.
  • Settlement holds or risk reviews after unusual order patterns.

Keep the policy pages accurate and visible in the footer, with a real business address and contact details. If the gateway asks for changes, make them and reply promptly; the support team can usually tell you exactly what is missing.

Testing payments properly

Many stores only discover payment problems when customers complain. A simple testing routine catches most issues first:

  1. On staging, switch the gateway to test mode with test keys and place orders using the gateway's published test methods.
  2. Check that the order moves to Processing, stock reduces and emails go out.
  3. Test a failed payment and confirm the order shows as Failed or Pending as expected.
  4. Test a refund from the WooCommerce order screen if your plugin supports it.
  5. On the live site, place a small real payment after major updates and refund it.

Keep notes of what you tested and when. If something breaks later, you know the last date everything worked, which makes it much easier to find what changed.

Preventing payment problems

  • Test a real low-value payment after every major update.
  • Keep webhooks configured and monitor failed deliveries.
  • Keep checkout pages out of caching and optimisation.
  • Use a staging site for updates and new plugins.
  • Reconcile orders against the gateway dashboard regularly.
  • Keep at least two payment options active.

Quick check: after the fix

  1. Make a test payment in the gateway's test mode and check the order moves to Processing.
  2. Check WooCommerce > Status > Logs for gateway errors.
  3. Check the webhook URL in your gateway dashboard matches your site.

Planning a new store and budgeting for it? See the e-commerce website cost in India guide.

If payments go through but orders are missing, see WooCommerce orders not showing.

When to get help

If payments are failing and you are losing orders, fixing it fast matters more than learning every detail. A WooCommerce developer can check gateway settings, webhooks, logs and conflicts and set up monitoring so it does not happen again. You can also hire a WordPress developer in India for ongoing WooCommerce maintenance. You can also send the details through the contact form.

If the gateway settings themselves refuse to save, see WooCommerce error saving settings.

FAQs

Why is my WooCommerce payment gateway not working in India?

The usual causes are wrong keys or mode, an inactive or under-review gateway account, webhooks not reaching the site, caching on checkout pages, or a plugin conflict. Check settings, webhook logs and WooCommerce logs first.

Why are my WooCommerce orders stuck on pending payment?

The gateway did not confirm the payment back to WooCommerce, usually because the webhook failed or was blocked. Check the webhook URL, secret and delivery logs, and confirm stuck orders against the gateway dashboard.

Customer paid but order shows failed. What should I do?

Check the payment status in the gateway dashboard. If captured, update the order manually with the payment ID and send confirmation. If failed, the bank normally reverses the amount.

Can caching break WooCommerce payments?

Yes. Cart, checkout and account pages should never be cached, and gateway scripts should be excluded from minification and delay settings.

Should I offer COD as a backup?

For many Indian stores, yes. Keeping COD or another payment method active means a gateway problem does not stop all orders.

Need help with your website?

I'm a freelance WordPress developer building fast, SEO-friendly websites since 2020. Tell me what you need and I'll reply with a plan and a fixed quote, usually within 24 hours.

Found this useful? Share it:
Contact

Let's build your next website

Available for freelance projects, agency white-label work and long-term maintenance. Feel free to pass this along to your team or company.

I reply within 24 hours, usually the same day. Your details are emailed to me, then WhatsApp opens so we can chat right away.

Chat now