New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Payments

Learn how to fix WooCommerce payment gateway errors.

Payment gateway errors hide behind friendly messages like 'An error occurred processing your payment.' The real cause is usually wrong API keys, a blocked webhook, or a plugin altering checkout fields. This guide covers systematic gateway debugging without exposing secret keys.

Time: 30-50 minutes Level: Intermediate
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

Each WooCommerce gateway plugin talks to an external API. Failures happen when keys expire, currencies mismatch, or the server cannot reach the provider because of firewall rules.

Generic checkout errors rarely mean the customer's card is bad. They often mean your store never completed the server-to-server step after the browser form looked fine.

Step 1: Collect evidence from WooCommerce logs

Enable logging for your gateway under WooCommerce → Settings → Payments → [Gateway] → Enable logging. Place a test order, then download the newest log file from WooCommerce → Status → Logs. Files also live under wp-content/uploads/wc-logs/. Look for HTTP 401, a 403 forbidden, or SSL certificate errors.

Step 2: Common API and mode mistakes

  • Live keys on a staging site or test keys on production.
  • Restricted keys missing required permissions for charges or refunds.
  • Currency not enabled in the gateway dashboard.
  • Account still in pending verification with payout holds.

Step 3: Webhook and IPN setup

Many gateways rely on webhooks to mark orders paid. If your security plugin blocks POST requests to wp-json or wc-api endpoints, orders stay on-hold forever.

  1. Copy the webhook URL from gateway settings or WooCommerce docs.
  2. Add it in the provider dashboard and send a test event.
  3. Confirm your site returns HTTP 200, not 301 loops or a 403 forbidden.
  4. Whitelist provider IP ranges if your host uses a WAF.

Step 4: SSL and TLS requirements

Gateways require TLS 1.2 or newer. Outdated server OpenSSL versions cause handshake failures that appear as generic payment errors. Your host can confirm cipher support. WordPress site URLs must use https.

Step 5: Plugin conflicts on checkout

Checkout field editors, EU VAT plugins, and subscription add-ons can remove fields gateways require. Rename wp-content/plugins to plugins.disabled via File Manager, SFTP, or FTP and retest. If multiple gateway plugins load conflicting JavaScript, enable only one gateway at a time.

When to stop DIY and hire help

Gateway debugging crosses WooCommerce, hosting firewalls, and PCI boundaries. Hire help if webhooks fail with no clear log entry, if you process high value orders, or if custom checkout code is involved. BugShield integrates Stripe, PayPal, and UK merchant gateways at a confirmed price without hourly billing surprises.

Questions answered

WooCommerce payment gateway error FAQs

Answers about gateway logs, live credentials, webhooks, order statuses, currencies, safe testing, and avoiding duplicate payments.

Where are WooCommerce payment logs stored?

WooCommerce → Status → Logs. Files also live under wp-content/uploads/wc-logs/ with a .htaccess deny rule. Download via admin when possible.

Why do payments work in test mode but not live?

Live accounts need identity verification, bank details, and sometimes separate live API keys. Test mode does not prove live credentials are correct.

Can a security plugin block payments?

Yes. Wordfence, Sucuri, and Cloudflare WAF can block gateway callbacks. Check firewall logs when webhooks fail.

Should I enable all payment gateways at once?

Enable only gateways you actively support. Fewer gateways means fewer scripts on checkout and easier debugging.

What causes WooCommerce payment gateway errors?

Invalid credentials, wrong test or live mode, blocked scripts, webhook failures, unsupported currency, account restrictions, plugin conflicts, and declined cards are common causes.

What does a failed or pending WooCommerce payment status mean?

Failed normally means the attempt was declined or could not complete. Pending means WooCommerce has not confirmed payment, so check provider records before changing the order.

How do I check whether WooCommerce uses live gateway credentials?

Confirm the gateway mode and compare its publishable, secret, merchant, or API credentials with the matching live account. Never paste live secrets into screenshots or support messages.

Can missing webhooks leave paid WooCommerce orders pending?

Yes. The provider may collect payment but WooCommerce never receives confirmation. Compare the provider event with WooCommerce logs and order notes before retrying.

How should I test a WooCommerce payment gateway fix?

Use official test credentials and test payment methods on staging, then run one controlled low-value live order and confirm payment, stock, email, refunds, and order status.

When should a developer investigate a WooCommerce payment error?

Get help when customers may have been charged, provider and WooCommerce statuses disagree, or retries could create duplicate payments or orders.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix