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

Payments

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

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.

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. Look for HTTP 401, 403, or SSL certificate errors.

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.

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 403 forbidden.
  4. Whitelist provider IP ranges if your host uses a WAF.

SSL and TLS requirements

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

Plugin conflicts on checkout

Checkout field editors, EU VAT plugins, and subscription add-ons can remove fields gateways require. Deactivate them temporarily and retest. If multiple gateway plugins load conflicting JavaScript, enable only one gateway at a time.

Use gateway test cards in test mode only. Never run test mode on a live catalog customers can see unless checkout is password protected.

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 on live shops.

FAQs

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.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix