Troubleshooting · Troubleshooting
How to Fix "Payment Failed" Errors in WooCommerce
Short answer
A “Payment failed” error is usually a gateway setup problem, not a broken store, so start with the gateway log at WooCommerce > Status > Logs and the order notes. Check that the gateway is in live mode with live keys, that its webhook is configured, and that the checkout page is not cached. If the logs show nothing, test for a plugin or theme conflict on a staging site before changing anything on the live store.
Key takeaways
- A failed payment is usually a gateway setup problem, not a broken store.
- 400 errors point to a wrong contact URL, while 200 errors point to wrong credentials.
- Test keys on a live store produce failures that look random.
- Cart, checkout, and My Account pages must never be served from a page cache.
- Keep gateway logging off unless you are troubleshooting a failure.
What does “Payment failed” mean in WooCommerce?
“Payment failed” means the payment gateway refused the transaction or the checkout could not reach the gateway at all.
The message itself does not say which one happened, so the order notes and the gateway log decide the next step. WooCommerce's payment error guide lists the general causes: a wrong address, wrong credentials, or a PHP fault behind a blank page.
WooCommerce sorts payment errors by code. WooCommerce's payment error guide says 400 errors usually happen because the contact URL is incorrect, while 200 errors often result from incorrect credentials. A blank page often points to a PHP issue, and enabling debugging finds the root cause.
A failed order is not the same as a pending one. WooCommerce's payment error guide states that the Failed status means payment was unsuccessful or declined, and the order notes hold the specific error information.
Is it a card decline or a broken checkout?
Check the gateway dashboard first: a decline there means the bank said no, while no record at all means the checkout never reached the gateway.
A card decline is the bank refusing the card, and the gateway dashboard will show the reason, such as insufficient funds or an expired card. The store is fine in that case, and the customer needs a different card or a call to their bank.
A broken checkout shows no payment attempt in the gateway dashboard. The order may exist as Pending payment, or the checkout may spin and return a vague error. That points to your gateway settings, a cached checkout page, or a plugin conflict.
Tell the two apart before changing settings. Fixing credentials will not help a declined card, and telling a customer to retry will not fix a checkout that never submits.
What should I check in the gateway logs?
Turn on logging in the gateway settings, place one test order, then read the new entries at WooCommerce > Status > Logs.
WooCommerce's payment error guide gives these exact steps: go to WooCommerce > Settings > Payments, open your gateway, enable logging, then read the logs under WooCommerce > Status > Logs. Gateway plugins usually write to their own log file, so pick the right one from the dropdown.
Logging only captures new transactions, so old failures will not appear. WooCommerce's order troubleshooting guide notes the same limit and suggests placing a test order to generate fresh logs.
Read the order notes alongside the log. WooCommerce's payment error guide says order notes record what happened during a transaction, including decline reasons and error codes with timestamps. Keep logging switched off when you are not troubleshooting, since WooCommerce's payment error guide recommends keeping it deactivated unless needed.
Are the API keys and mode correct?
Confirm the gateway is in live mode with live keys, since test keys on a live store produce failures that look random.
Open WooCommerce > Settings > Payments and check the mode first. Test keys in the live fields, or live keys in the test fields, both break payments. Keys also expire or get revoked, so re-enter them from the gateway dashboard if they are old.
Check the webhook next. A webhook is a real-time message your gateway sends your store when a payment status changes, and WooCommerce's order troubleshooting guide notes that some gateways need webhooks set up by hand. Stripe for WooCommerce is the named example that needs manual setup.
Stripe's webhook documentation explains that Stripe sends event notifications to an endpoint URL your store registers. Open Developers > Webhooks in the Stripe dashboard and check the delivery list. A 403, 404, or 500 response tells you where to look next.
Also check that the store currency is one the gateway supports. A gateway that works in one currency can refuse payments in another, and the log will show the mismatch.
| Check | Where to look | What a failure looks like |
|---|---|---|
| Live vs test mode | WooCommerce > Settings > Payments | Test keys on a live store, or the reverse |
| API keys | Gateway settings and dashboard | Expired, revoked, or mistyped keys |
| Webhook delivery | Gateway dashboard, Webhooks section | 403, 404, 500, or timeout responses |
| Currency support | Gateway dashboard, supported currencies | Currency the gateway does not accept |
| Authorize vs capture | Gateway settings | Authorized but never captured |
Is the checkout page being cached?
Cart, checkout, and My Account pages must never be served from a page cache, or payments fail with stale security tokens.
A cached checkout can carry an expired token, an old cart, or a stale nonce, and the payment fails when the form is submitted. Most caching plugins exclude these pages by default, but a host-level cache or a Cloudflare rule can still serve them.
Check your caching plugin's exclusion list and your host's cache settings. Purge the cache after any change, then test checkout in a private window while logged out. If the failure only happens for logged-out shoppers, caching is a strong suspect.
Our guide on how to set Cloudflare cache rules for WordPress shows how to keep dynamic pages out of the cache.
For LiteSpeed hosts, see our LiteSpeed Cache settings for WooCommerce.
Could a plugin or theme conflict cause it?
Yes, so test on a staging site with a default theme and only WooCommerce and the gateway active.
WooCommerce's conflict testing guide gives the order: update all plugins and themes first, then switch to a default theme such as Twenty Twenty-Five or the Storefront theme, then deactivate all plugins except WooCommerce and the gateway you are checking.
Place a test order after each change. If the failure disappears with the default theme, the theme is the cause. If it disappears after deactivating plugins, reactivate them one by one and test after each reactivation until the failure returns. WooCommerce's conflict testing guide warns that testing is the only way to find the cause.
Back up the site before you start, since deactivating plugins can change behaviour. WooCommerce's conflict testing guide recommends a staging site for this work, because test orders can trigger emails and reach connected systems.
Our guide on how to fix plugin conflicts in WordPress walks through the same process in more detail.
If the conflict started right after an update, check the update notes before rolling anything back. Our guide on how to update WooCommerce safely covers update order and backups.
What about SSL and the checkout block?
Most payment gateways need a valid SSL certificate, and the checkout block only shows gateways that support it.
WordPress recommends HTTPS support along with PHP 8.3 or greater and MariaDB 10.11 or MySQL 8.4 or greater. A missing or expired certificate can stop a gateway from loading at checkout, and some gateways refuse to work on a plain HTTP page.
If a gateway appears on the classic checkout but not on the checkout block, it may not support the block yet. Switch that gateway to the classic checkout shortcode page, or update the gateway plugin to a version with block support. The gateway's own changelog will say when block support was added.
If the checkout shows a blank page instead of an error, enable WordPress debugging. WordPress's debugging guide explains how WP_DEBUG in wp-config.php surfaces PHP errors. A blank page often points to a PHP fault, as WooCommerce's payment error guide notes.
A sudden flood of small failed payments is a different problem: card testing bots probing stolen cards. Our guide on how to stop card testing attacks on WooCommerce covers that case.
How do I confirm the fix worked?
Run one test payment in the gateway's test mode, then one small live payment, and confirm both orders reach Processing.
WooCommerce's payment error guide recommends a staging site for testing, and most gateways offer a test or sandbox mode for this purpose. Use the gateway's documented test card numbers, never a real card, for the test-mode order.
Check three things on each test: the payment appears in the gateway dashboard, the order notes show the confirmation, and the order status moves to Processing. If a test payment times out or stays pending, WooCommerce's payment error guide points to the payment timeout checklist in the Troubleshooting Orders guide.
Read the System Status report after the fix, since it lists your WooCommerce version, PHP version, and server setup. Our guide on how to read the WooCommerce Status Report explains what each section means.
What mistakes should you avoid?
The most common mistake is changing several settings at once, which hides the real cause.
- Changing keys, webhooks, and plugins in one go, so you cannot tell which change fixed it.
- Testing gateway changes on the live store instead of in test mode or on staging.
- Leaving debug logging on after the fix, which fills the disk with log files.
- Asking a customer to retry before checking whether the first payment went through.
- Ignoring the gateway dashboard, which often holds the exact decline reason.
- Updating WooCommerce and the gateway at the same time without a backup.
Frequently asked questions
What does "Payment failed" mean at WooCommerce checkout?
It means the gateway refused the payment or the checkout never reached the gateway. Read the order notes and the gateway log at WooCommerce > Status > Logs. The log usually names the cause, such as wrong credentials, a failed webhook, or a cached checkout page.
How do I tell a card decline from a broken checkout?
A decline means the bank said no, and the gateway dashboard shows the reason. A broken checkout shows no payment attempt in the gateway at all. Fix a decline with the customer, and fix a broken checkout in your gateway settings.
Why do payments fail after I change the gateway keys?
Test keys on a live store are the most common cause. Open WooCommerce > Settings > Payments and confirm the gateway is in live mode with live keys. Keys can also expire or be revoked, so re-enter them from the gateway dashboard.
Can caching cause WooCommerce payment failures?
Yes. A cached checkout can carry an expired security token, so the payment fails on submit. Cart, checkout, and My Account pages must never be served from a page cache. Check your caching plugin and host cache exclusions.
How do I find which plugin breaks WooCommerce checkout?
Test on a staging site with a default theme and only WooCommerce and the gateway active. If the failure stops, reactivate plugins one by one until it returns. That plugin is the conflict, so update it, replace it, or ask its author for a fix.
Sources
- Troubleshoot payment errors WooCommerce
- Troubleshooting Orders WooCommerce
- How to test for plugin and theme conflicts WooCommerce
- Requirements WordPress.org
- Debugging in WordPress WordPress Developer Resources
- Webhooks Stripe
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
