On this page
What this issue is
When a payment fails, your checkout shows a message. An unhelpful payment error message is one that gives the shopper nothing to act on. Typical examples are 'Something went wrong', 'Payment failed', a raw gateway code such as card_declined or generic_decline, or a message that appears briefly and disappears.
Why it costs you leads or sales
A shopper who sees a clear message can fix a typo or try another card in seconds. A shopper who sees 'Something went wrong' does not know if they were charged, if the site is broken or if their card is the problem. Many leave, and some contact support or dispute a charge that never happened.
- CartShopper ready to buy
- Enter cardDetails submitted
- Payment failsShows 'Something went wrong'
- RetryShopper unsure what to change
- OrderNever completed
The payment fails for a fixable reason, but the message gives no direction.
Example: illustrative numbers only, showing how message clarity can change the share of shoppers who try again.
How to check if your site has it
- Declined card (use your gateway's documented decline test card)
- Expired card date
- Wrong security code (CVC)
- Incomplete card number
- Insufficient funds test card, if your gateway offers one
- Failed or cancelled 3-D Secure challenge
- Network drop or gateway timeout (turn off Wi-Fi briefly)
- Check the same cases on a phone screen
How to fix it
List the failures your gateway returns
Open your gateway's docs or dashboard (Stripe, PayPal, Adyen and others list decline and error codes) and note the codes that shoppers actually hit.
Group them into a few shopper-friendly cases
Typical groups: card details wrong, card declined by bank, not enough funds, authentication failed, and temporary technical error.
Write each message in plain words with one next step
Say what happened and what to do. Avoid codes and blame. Do not reveal sensitive reasons that help fraudsters.
Say whether the shopper was charged
For technical errors, add a line such as 'You have not been charged.' only if that is true for your setup.
Keep the form filled and show the error near the problem
Do not clear the cart or the fields. Place the message by the card form and move focus to it so screen readers announce it.
Offer another route
Link to another payment method or to your contact details if the retry fails.
| Situation | Unhelpful | Clearer |
|---|---|---|
| Bank decline | Error: generic_decline | Your bank declined this payment. Try another card or contact your bank. |
| Wrong CVC | Payment failed | The security code doesn't match. Check the 3 or 4 digits on your card and try again. |
| Expired card | Invalid request | This card has expired. Enter a different card or check the expiry date. |
| 3-D Secure failed | Something went wrong | Your bank couldn't confirm it was you. Try again or use another card. |
| Timeout | Error 500 | We couldn't reach the payment service. You haven't been charged. Please try again in a minute. |
Check your payment plugin settings
In WooCommerce, open WooCommerce > Settings > Payments and the gateway's settings. Some gateways have custom error text fields.
Filter the message if there is no setting
Use a small code snippet or a translation plugin such as Loco Translate to change the displayed string. Do this in a child theme or snippets plugin, not core files.
Edit checkout language
Go to Online Store > Themes > Edit default theme content or the language editor and search for payment error strings. Shopify's hosted checkout limits some wording, so check what is editable on your plan.
Check your payment provider
For third-party gateways, review the provider's own messages in its dashboard.
Map gateway codes to your own text
Catch the error object from your gateway's client library and show your own message instead of the raw one. See the snippet below.
Announce the error to assistive tech
Put the message in an element with role=alert next to the card form.
const messages = {
card_declined: 'Your bank declined this payment. Try another card or contact your bank.',
expired_card: 'This card has expired. Check the expiry date or use another card.',
incorrect_cvc: "The security code doesn't match. Check the digits on your card.",
insufficient_funds: 'This card has insufficient funds. Try another card.',
processing_error: "We couldn't process the payment. Please try again in a minute."
};
function showPaymentError(error) {
const el = document.getElementById('payment-error');
el.textContent = messages[error.code] || messages[error.decline_code] || "We couldn't complete your payment. Please try again or use another card.";
el.focus();
}
// <div id="payment-error" role="alert" tabindex="-1"></div>Before
- Message reads 'Something went wrong'
- Gateway code shown to the shopper
- Message disappears after a few seconds
- Card fields cleared
After
- Message names the likely cause
- One clear next step
- Stays visible next to the card form
- Details kept, other payment method offered
How to confirm it's fixed
How to prevent it happening again
- Keep a list of your error messages in one document with owners
- Re-test failure cases after changing themes, plugins or gateway versions
- Review new gateway error codes when you upgrade the integration
- Have support log the payment problems customers mention
- Translate messages for every language your store serves
How FunnelGuard handles this
Questions people ask
Why does my checkout say 'Something went wrong' when payment fails?
That is usually a fallback message shown when the gateway returns an error your site has no specific text for. Map the common gateway codes to plain messages and keep the generic text only as a last resort.
How do I customise payment error messages in WooCommerce?
Check the gateway's settings under WooCommerce > Settings > Payments first. If the text is not editable there, change the string with a translation plugin such as Loco Translate or a small filter added in a child theme or snippets plugin.
Can I change the payment error message in Shopify checkout?
Some wording can be edited in the theme language editor, but Shopify's hosted checkout limits what you can change. Check which strings are editable on your plan and review your payment provider's own messages.
What should a good payment error message say?
It should say what happened in plain words, give one next step and, for technical errors, say whether the shopper was charged if that is true. It should stay visible next to the card form and keep entered details.
Should I tell customers the exact reason their card was declined?
Not always. Banks often give only a general reason, and detailed reasons can help fraudsters test stolen cards. A message such as 'Your bank declined this payment' with advice to try another card or contact the bank is safer.
How do I test payment errors without a real card?
Switch the gateway to test mode and use the failure test cards in its documentation, such as declined, expired or wrong-CVC cards. Never use a real card to trigger failures.
Does a bad payment error message hurt conversions?
It can. Shoppers who cannot tell what went wrong often leave rather than guess, though the effect per order is usually modest because most payments succeed.
Related issues
- CNV-207Payment declined with a valid test cardFix guide
- CNV-2083-D Secure challenge never completesFix guide
- CNV-210Order created but payment fails silentlyFix guide
- CNV-209Payment succeeds but order not createdFix guide
- CNV-206Payment gateway keys expired, all payments declinedFix guide
- CNV-201Card form iframe (Stripe Elements) doesn't renderFix guide