First: What Type of Failure Is This?
Payment issues in WooCommerce usually fall into one of three categories:
- Gateway doesn't load — payment form doesn't appear at checkout
- Payment fails at the bank/processor — customer gets an error from the payment provider
- Payment succeeds but order doesn't update — customer is charged, order stays "Pending"
Each has different causes.
Case 1: Gateway Doesn't Load at Checkout
The payment option just isn't appearing on the checkout page.
Check first:
- Go to WooCommerce → Settings → Payments — is the gateway enabled?
- Is there a currency mismatch? Most gateways only work with specific currencies.
- Are there any JavaScript errors in the browser console? (Right-click → Inspect → Console)
- Does the gateway have a minimum order amount set?
Common culprits:
- JavaScript conflict from another plugin
- Caching plugin serving a cached version of checkout without the payment scripts
- Theme incompatibility with the payment widget
Test: deactivate your caching plugin and reload checkout. Also try switching to Storefront or Twenty Twenty-Three theme temporarily.
To pinpoint a JavaScript conflict, temporarily deactivate all plugins except WooCommerce and your payment gateway, then check the checkout page. If the gateway loads, reactivate plugins one by one until the issue returns.
Case 2: Payment Fails at the Processor
The payment form loads but the transaction is declined or throws an error.
Things to check:
| Symptom | Likely cause |
|---|---|
| "Invalid API key" | Wrong API keys in plugin settings (live vs. test) |
| "Card declined" from processor | Bank-side rejection, try a different card |
| SSL error | Your checkout page isn't loading over HTTPS |
| "Currency not supported" | Your store currency isn't in the gateway's supported list |
| Works in test mode, fails in live | Live keys not entered, or account not verified |
Check your API keys:
Go to WooCommerce → Settings → Payments → [Your Gateway] → Manage
Make sure you're using live keys (not sandbox/test keys) and that they match exactly what's in your gateway dashboard. Even one extra space breaks it.
Case 3: Payment Goes Through But Order Stays Pending
This is the most confusing case. The customer's bank takes the money, but WooCommerce never updates the order status.
This is almost always a webhook/IPN failure. Payment gateways send a callback to your server after payment completes. If that callback fails, WooCommerce never "hears" that the payment succeeded.
How to debug:
- Log into your payment gateway's dashboard (e.g., Stripe, PayPal) and navigate to the Webhooks or IPN settings. Look for failed delivery attempts.
- Contact your hosting provider and ask them to check the server error log for any 500 errors occurring on the callback URL (the webhook URL). Provide them with the exact webhook URL from your payment gateway settings.
- Make sure your site is accessible from the internet (not behind a VPN or staging firewall).
Common causes of webhook failures:
- A security plugin blocking the gateway's IP
- Firewall rules on your server
- SSL certificate issue on the callback URL
- WooCommerce session expiry issue (rare)
Stripe webhook URL format: https://yoursite.com/?wc-api=WC_Stripe
Check this URL returns a 200 status code from outside your server.
Case 4: It Worked Yesterday, Broken Today
Check for:
- Recent plugin or WooCommerce update
- Recent PHP version change at your host
- Expired or changed API keys (some gateways rotate keys annually)
- SSL certificate expired
Checking Logs
WooCommerce has its own log system: WooCommerce → Status → Logs
Filter by your gateway name. You'll often see the exact API response that explains the failure.
Also enable WordPress debug logging:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
If you've tried the steps above and your payment gateway still isn't working — or you'd rather not troubleshoot it yourself — we at DevCev Digital can help. Send us your error logs and we'll diagnose the issue quickly.