How to Fix WooCommerce Payment Not Working
WooCommerce payment failures from SSL issues, 3DS problems, gateway config errors, or plugin conflicts. How to diagnose and fix each cause.
WooCommerce payment failures are most often caused by SSL not being active on the checkout page, a gateway API key mismatch between live and test mode, a JavaScript error blocking the payment form, or a plugin conflict — enable WooCommerce logging and check the browser console to identify which applies.
WooCommerce payment failures fall into a few distinct categories: SSL errors, gateway configuration problems, 3D Secure issues, PHP errors on the checkout page, and plugin conflicts. The error message (or lack of one) usually points to the category. Here is how to work through each one.
Step 1 - Identify the exact error
Before diagnosing, capture the exact failure mode:
What the customer sees:
- An error message on the checkout page? What does it say?
- A redirect to a Stripe/PayPal error page?
- The page reloads with no error message (payment silently fails)
- A 500 error on checkout submit
- The order appears in WooCommerce admin as "pending" but the payment never completed
Check the payment gateway dashboard:
- Log into Stripe, PayPal, or whichever gateway is in use
- Look at recent payment attempts in the gateway's dashboard
- A failed attempt with an error code tells you more than the generic WooCommerce error message
Check WooCommerce logs:
- WooCommerce > Status > Logs
- Select your payment gateway log (e.g.,
wc-stripe-YYYY-MM-DD.log) - Look at the most recent entries for the time of the failed payment
Check PHP error log:
tail -n 50 /var/log/nginx/error.log # Or WordPress debug log: tail -n 50 /var/www/html/wp-content/debug.log
Step 2 - SSL certificate issues
WooCommerce payment gateways refuse to operate on pages without valid HTTPS. If the SSL certificate is invalid, expired, or misconfigured:
Symptoms:
- "Payment cannot be processed" error
- Browser shows a security warning before checkout
- Stripe shows "TLS error" in logs
Diagnose:
# Check SSL certificate validity curl -I https://yourdomain.com/checkout/ # Look for: SSL certificate verify result: ok # Or use online tool: # ssl-checker.online-domain-tools.com
Fix:
- If Let's Encrypt:
sudo certbot renew --force-renewal - If purchased certificate: re-install the certificate chain correctly
- Ensure all files on the checkout page are loaded over HTTPS (mixed content blocks payment gateway scripts)
Step 3 - Test mode vs live mode mismatch
The most common configuration error: the gateway plugin is in test mode, or test API keys are used in production.
Stripe:
- Go to WooCommerce > Settings > Payments > Stripe > Manage
- Check "Enable Test Mode" - should be OFF for production
- Verify the Live Secret Key and Live Publishable Key are filled in (not test keys starting with
sk_test_orpk_test_)
PayPal:
- WooCommerce > Settings > Payments > PayPal > Manage
- "Enable PayPal Sandbox" should be OFF for production
- Verify the Client ID and Secret Key are from your live PayPal application, not sandbox
If test mode was active during a purchase, the order shows as pending in WooCommerce but no money was actually charged. The customer may have received an order confirmation but not been charged.
Step 4 - 3D Secure authentication failures
European transactions require 3DS2 authentication (PSD2 regulation). When 3DS fails, the payment declines even if the card details are correct.
Common 3DS problems:
Popup blocked: If the 3DS authentication opens in a popup and the browser blocks it, authentication fails. The checkout should ideally handle 3DS inline (within an iframe on the checkout page). Stripe's official WooCommerce plugin handles this correctly by default.
Redirect loop: Some 3DS implementations redirect away from checkout and back. If the return URL is incorrect, customers land on the wrong page after 3DS. Check the gateway's return URL configuration.
"Authentication Required" error in logs: The card requires 3DS but the gateway's 3DS handling is failing. Update the payment gateway plugin to the latest version - 3DS2 support has been updated frequently since PSD2 came into effect.
Fix:
- Update the payment gateway WooCommerce plugin to the latest version
- In Stripe: enable "3D Secure" in the gateway settings if it is an option
- Test with a 3DS test card:
4000 0025 0000 3155(in Stripe test mode)
Step 5 - Plugin conflicts
A JavaScript error from another plugin can break the payment form. Stripe and PayPal embed JavaScript on the checkout page - any other script that throws an error can prevent these from initialising.
Diagnose:
- Open browser DevTools > Console on the checkout page
- Look for JavaScript errors (red entries)
- Note which script the error originates from
If errors are present:
- Temporarily deactivate all plugins except WooCommerce and the payment gateway plugin
- Test a payment (use test mode)
- If payment works: reactivate plugins one by one until the conflict reappears
Plugins most commonly causing checkout JS conflicts:
- Optimisation/minification plugins (WP Rocket's JS minification, Autoptimize)
- Page builders loading scripts on all pages
- Third-party chat widgets
- Custom analytics tracking scripts
WP Rocket fix: In WP Rocket > File Optimisation, exclude payment gateway scripts from minification:
/wp-content/plugins/woocommerce-gateway-stripe/assets/js/stripe.jsjs.stripe.com
Step 6 - Caching the checkout page
A cached checkout page breaks payments. The checkout page contains nonces (security tokens) that expire. If a cached version of the page is served, the nonce is stale and the payment fails.
Diagnose: In the browser Network tab, check the checkout page response headers for X-Cache: HIT or similar. If the checkout is being served from cache, that is the problem.
Fix for common caching plugins:
WP Rocket: Checkout, Cart, and My Account pages should be in the "Never Cache" list. Go to WP Rocket > Cache > Never Cache These Pages and verify /checkout/, /cart/, /my-account/ are listed. WooCommerce's integration with WP Rocket adds these automatically if WooCommerce is detected.
Nginx FastCGI cache: Ensure the cache bypass condition includes the WooCommerce cookies:
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|woocommerce_cart_hash|woocommerce_items_in_cart") {
set $skip_cache 1;
}
if ($request_uri ~* "/cart.*|/checkout.*|/my-account.*") {
set $skip_cache 1;
}
Step 7 - Currency and country mismatches
Payment gateways are tied to specific countries and currencies. Issues arise when:
- The store currency does not match the gateway's account currency (causing conversion errors)
- The gateway account is registered in one country but processing cards from another (triggers fraud rules)
- Stripe's account is set up in the UK but the WooCommerce store is configured with USD prices
Fix:
- Ensure WooCommerce > Settings > General > Currency matches the currency your gateway account is configured for
- For multi-currency stores, use a multi-currency plugin (WPML WooCommerce Multilingual, Currency Switcher for WooCommerce) with gateways that support multi-currency
Step 8 - WooCommerce checkout blocks vs classic checkout
WooCommerce's new block-based checkout uses different payment gateway APIs than the classic shortcode-based checkout. Not all payment gateway plugins support both.
If you recently switched to the checkout block and payments stopped working:
- Check if your gateway plugin explicitly supports the WooCommerce Checkout Block (look in the plugin's changelog or documentation)
- If not: revert to the classic checkout shortcode temporarily
Classic checkout shortcode (add to the Checkout page):
[woocommerce_checkout]
Or go to WooCommerce > Settings > Advanced > Page Setup and ensure the Checkout page uses the classic shortcode, not the Checkout block.
Quick diagnostic checklist
- [ ] Check gateway dashboard for specific error codes
- [ ] Check WooCommerce > Status > Logs for gateway log
- [ ] Confirm live mode is active (not test mode)
- [ ] SSL certificate is valid and HTTPS is working
- [ ] Checkout page is not being served from cache
- [ ] No JavaScript errors in browser console
- [ ] Payment gateway plugin is on the latest version
- [ ] No currency/country mismatch
Related reading
Frequently Asked Questions
Why is WooCommerce payment not working on my checkout page?
How do I fix Stripe not working in WooCommerce?
Why does WooCommerce checkout reload without processing payment?
How do I test WooCommerce payments without charging real customers?
// new_articles
Get notified when new guides drop
Practical WordPress guides from a working agency owner. No filler. Unsubscribe any time.
Was this article helpful?
Thanks for the feedback!