Payment gateway not working on your website? Here's how to find the cause and fix it
Updated · 4 min read · by the Codevo team
Short answer
When a payment gateway stops working, the usual causes are test keys still in place of live keys, a webhook or callback URL that's wrong or blocked, an unapproved domain in the gateway account, SSL problems, or an outdated plugin. If money was deducted but no order was created, check the payment in your gateway dashboard first.
What you might be seeing
- ✗Customers click Pay and nothing happens, or the payment popup never opens
- ✗The customer says money was deducted but no order shows up in my admin
- ✗Payment shows as successful in Razorpay but the order is still "Pending payment"
- ✗UPI payments fail or keep loading, but cards work
- ✗Customers see "Payment failed" or "Something went wrong" on the checkout page
- ✗Everything worked in testing, but real payments don't go through
Common causes
Roughly in order of how often we see them.
- 01
Test keys instead of live keys
Gateways give separate test and live API keys (Razorpay keys start with rzp_test_ or rzp_live_, Stripe with pk_test_ or pk_live_). If the site still has test keys, real customers can't pay, and test payments never reach your bank.
- 02
Webhook or callback URL wrong or blocked
The gateway tells your site a payment succeeded through a webhook or a redirect back to a callback URL. If that URL is wrong, still points to an old or staging domain, or is blocked by a firewall, Cloudflare rule or security plugin, the payment completes but your site never marks the order as paid.
- 03
Domain not approved with the gateway
Razorpay, PayU, Cashfree and others verify the website you registered. If you take payments on a different domain or subdomain, or the site was changed after approval, the gateway can reject the transaction or keep the account restricted.
- 04
SSL certificate problems
Gateways require HTTPS. An expired certificate, mixed http/https content on the checkout page, or an old TLS version on the server can stop the payment popup from loading or make webhook delivery fail.
- 05
Wrong amount or currency format
Razorpay and Stripe expect amounts in the smallest unit, so 499 rupees must be sent as 49900 paise. Sending 499 or a decimal, or a currency your account isn't enabled for, gives an error or the wrong charge.
- 06
Outdated plugin or integration
Gateways update their APIs and checkout scripts. An old WooCommerce gateway plugin or old custom code can stop working after a gateway or WordPress update, especially for newer methods like UPI intent on mobile.
- 07
Server timeouts
If your server is slow, the webhook request from the gateway can time out before your site finishes creating the order. The gateway may retry, but if every attempt times out, the order is never created.
What you can check yourself
Safe steps you can try before calling anyone. Take a backup before changing anything.
- 1
Look up the payment in your gateway dashboard
Ask the customer for the date, amount and UPI or bank reference, then search for it under Transactions → Payments in Razorpay (or the equivalent in PayU, Cashfree or Stripe). Note the status: Failed, Authorized, Captured or Refunded. This tells you whether the money actually reached the gateway.
- 2
Check whether live mode is on
In the gateway dashboard, make sure you're in Live mode, not Test mode. In WooCommerce, go to WooCommerce → Settings → Payments, open your gateway and check that live keys are entered and any "test mode" or "sandbox" box is unticked.
- 3
Check webhook delivery
In Razorpay go to Accounts & Settings → Webhooks (other gateways have a similar section). Confirm the URL is your current live domain and look at recent deliveries. Failed deliveries with errors like 403, 404 or timeout point straight at the problem.
- 4
Test the checkout yourself
Open your site in a private window on mobile, add a low-value product and try to pay with UPI and with a card. Note exactly where it fails and screenshot any error text.
- 5
Check for emails from the gateway
Gateways email you when the account needs KYC documents, a website review, or when a payment method is disabled. Search your inbox for the gateway's name.
When to call a developer
- →The gateway shows payments as captured but your site keeps missing the orders
- →Webhook deliveries are failing and you can't see why
- →You use a custom-built checkout, not a standard plugin
- →Only some payment methods fail, such as UPI on mobile, and settings look correct
- →You're losing orders every day and need it sorted while sales continue
How we fix it
- [1]We reproduce the failure on the live checkout with a small real payment and note exactly where it breaks: before the popup, during payment or after the redirect.
- [2]We match failed orders against the gateway dashboard to see which payments were captured but never recorded, so you know which customers to follow up with.
- [3]We check webhook delivery logs in the gateway and the server access and error logs, and fix the cause: wrong URL, firewall or security plugin blocking the request, or signature verification failing.
- [4]We confirm live keys, the approved domain, SSL and the amount format, and update the gateway plugin or SDK to a supported version.
- [5]We make order creation depend on the webhook rather than only on the browser redirect, since customers often close the tab or lose network after paying.
- [6]We run test and real payments with UPI, cards and net banking before handing it back.
Want the details on how we handle bug fixes and maintenance? See our bug fixing service.
Questions people ask
Q.01Razorpay payment failed but money deducted. What should I do?
Search the payment in your Razorpay dashboard. If it shows Failed, the bank usually reverses it automatically. If it shows Authorized, the money is held but not yet captured, and you can capture it to complete the order or let it auto-refund. The dashboard or Razorpay support can confirm the timeline for that specific payment.
Q.02Why did the payment succeed but the order was not created?
The money reached the gateway but your site never got the confirmation. This is usually a webhook that's failing, a callback URL that's wrong, or the customer closing the page before the redirect finished. Check webhook deliveries in your gateway dashboard and create the order manually for the customer.
Q.03Why is UPI payment not working on my website?
Check that UPI is enabled for your account in the gateway dashboard. On mobile, UPI apps open through an intent flow, which an outdated plugin or custom code may not handle. UPI also fails when the customer's bank server is down, so test with a different UPI app before assuming the site is at fault.
Q.04How long does a bank take to refund a failed online payment?
It depends on the bank, the payment method and the gateway, so we don't quote a fixed number. Look up the payment in your gateway dashboard, which shows its status and refund reference. Share that reference with the customer so they can follow up with their bank.
Q.05Do I need SSL to use a payment gateway?
Yes. Razorpay, PayU, Cashfree and Stripe all require your checkout to run over HTTPS. An expired certificate or mixed http content on the checkout page can stop payments from loading.