Founder deal: 75% off the lifetime licence. Unlimited sites, one payment, every update.See the founder plan
Home / Blog / Declines and diagnostics

“Your card was declined” in WooCommerce: a diagnosis order

The message tells the shopper nothing and tells you less. Here is the order to check things in, so you stop rebuilding a checkout that was never broken.

Somewhere in your WooCommerce logs is a customer who tried to pay you and saw eight words: Payment error: your card was declined. That message is WooCommerce being polite. The real reason is always recorded, and it is almost never what the shopper thinks it is.

Work in this order

Nine times out of ten the answer is in step two, but doing them in order stops you rebuilding a checkout that was never broken.

1. Did the request reach the gateway at all?

Open the order and read the notes. If there is no gateway response recorded, nothing left your server. That points at a plugin conflict, a fatal error mid request, an outbound connection blocked by the host, or a checkout script that never submitted. Look at the PHP error log for the same timestamp, not at the card.

2. What did the gateway actually say?

If a response is recorded, the message on it is the truth. Map it to one of three buckets: the bank refused it, your account is not configured for what you asked, or your own fraud rules stopped it. Our guides to card decline codes and NMI gateway response codes cover what each one means.

3. Is it one customer or all of them?

Take the failure rate for the last hour and compare it with the same hour last week. One customer failing is a card problem. Everyone failing since 14:00 is a configuration or connectivity problem, and the first thing to check is what changed at 14:00.

4. Does a test order fail the same way?

Place one in sandbox with a known good test card. If sandbox works and live does not, the difference is credentials, currency or a transaction type your merchant account has not been enabled for.

The five causes that account for most of it

CauseTellFix
Bank declinedA response code is recorded, other customers pay fineNothing to fix. Tell the customer to use another card or call their bank
Wrong or rotated API keysEvery order fails identically, starting at one momentRe-enter the keys. A rotation in the gateway is not automatic in the store
Transaction type not enabledCards work, ACH or recurring does notAsk your ISO to enable it on the MID
Your own fraud rule firedFailures cluster on one country, value band or BINCheck the rule thresholds before blaming the gateway
Double submitA duplicate transaction error on the second attemptDisable the pay button on submit; the first charge probably succeeded

Fix the message before you fix anything else

The default text teaches the shopper nothing and generates a support ticket. Map the common reasons to sentences that name an action:

  • Wrong security code becomes: the three digits on the back did not match, check and try again.
  • Insufficient funds becomes: your bank declined the payment. Another card usually works.
  • Do not honour becomes: your bank declined it without giving a reason. Try a different card or call the number on the back.
  • Suspected fraud becomes the same wording as above. Never tell a shopper that fraud was suspected.

What not to do

Do not retry a hard decline in a loop, do not clear the cart on failure, and do not switch gateway on the strength of one bad afternoon. Read the response, count the failures, and change one thing at a time. The troubleshooting guide has the plugin specific detail.

Related guides: What Does Declined Mean on a Credit Card? A Plain Guide for Shoppers and Stores | Credit Card Return Codes and Bank Response Codes Explained | Generic Decline Meaning: Why a Bank Refuses Without Giving a Reason

NMI for WooCommerce

See exactly why a payment failed.

Every attempt writes the gateway response, AVS and CVV result into the WooCommerce order notes.

Read the troubleshooting guideSee pricing

Free on WordPress.org. Pro from $49 per year, lifetime from $149.