← Blog

Credit Card Decline Codes: Which Layer You're Reading and What to Do

Credit card decline codes come from four layers: the issuer, the card network, the processor and the gateway. Learn to tell them apart and what to do for each common code.

A credit card decline code is the short code that comes back with a failed card payment to say why it failed. Most lists treat every code the same way: a number, a meaning, a line of advice. That skips the step that decides whether the advice is right. The code in front of you came from one of four layers, and a code read as if it came from the wrong layer can send you the wrong way.

So read a decline in two steps. First, work out which layer the code comes from. Then act: retry later, set the card aside, or prove what happened before you charge again. This guide covers both, with the action FloPay's own renewal handling takes for each common code.

If you're working through a single failed payment right now, Payment Was Declined: Immediate Steps to Fix It walks through the diagnosis.

The four layers a decline code comes from

A card payment passes through several hands before the cardholder's bank answers, and each one can put its own code on a failure.

  1. The issuer's response code. The bank that issued the card approves or declines, and the card network carries a raw code back, such as 05 or 51. Stripe calls this the network decline code and warns that its meaning "differs based on the card network", so read it with the card's brand in mind (Stripe, Card declines).
  2. The network's advice code. Alongside the decline, the network can send advice on what to do next. Mastercard calls these Merchant Advice Codes. Stripe passes the raw value on as network_advice_code, and gives its own next step in advice_code: do_not_try_again, try_again_later or confirm_card_data.
  3. The processor's label. Your processor translates the raw code into its own words. Stripe's decline codes, such as insufficient_funds, expired_card or generic_decline, are labels of this kind, and Stripe publishes them as a separate list from the raw network codes (Stripe decline codes).
  4. The gateway or technical error. Sometimes no bank decision reaches you at all. A timeout, a connection failure or a gateway error fails the payment, and the code describes the plumbing, not the card.

The layers even sit in different fields of the same error. In FloPay's SDK, as in Stripe's, code holds the error, such as card_declined, and declineCode holds the reason, such as insufficient_funds (error handling docs).

A card payment travels from checkout through the gateway, the processor and the card network to the issuer, and each layer can add its own code to a decline: a gateway error, a processor label, a network advice code and the issuer's response code

One decline, four possible codes. Know which one you're holding before you act on it.

Each layer tells you something different. The issuer's code says what the bank decided. The advice code says whether the network wants you to try again. The processor's label is a translation, and often a lossy one: Stripe notes that issuers categorize most declines as generic, so generic_decline hides the detail. A gateway error says nothing about the card at all. Why one generic code can hide so much is covered in Do Not Honor Meaning for Merchants.

How to tell which code you're holding

A few quick checks sort out most cases:

Visa and Mastercard decline codes don't always agree

The same number can mean different things on different networks. Stripe's network decline codes page lists each brand's codes, and three examples from it show why the brand matters:

Visa has codes of its own as well: 1A means additional customer authentication is required, N7 is a decline for a CVV2 failure, and 5C means the transaction isn't supported or is blocked by the issuer. The rule is simple: never read a raw code without the card brand beside it, and when an advice code arrives with it, let the advice decide whether you try again.

What FloPay shows you for a decline

Every attempt carries two codes side by side: FloPay's own decline reason, declineReason, which is one of 19 values such as INSUFFICIENT_FUNDS or DO_NOT_HONOUR, and the provider's code.

Where you lookFloPay's reasonThe provider's code
A checkout attempt, in the API and the dashboarddeclineReasongatewayDeclineReason
A renewal invoice's attemptsdeclineReasongatewayErrorCode, for example Worldpay ISO 5 or Stripe card_declined
The invoice.payment_failed webhookNot in the payload: read the invoice with its attemptsNot in the payload
The checkout SDKA provider-neutral declineNever shown to the buyer

The dashboard shows both codes on each attempt and groups declines by currency, reason and provider, the same split our authorization rate guide recommends before you change anything. When FloPay tries another gateway after a decline, the new attempt points back to the declined one, and the payment timeline marks it Cascade. No field carries the network's advice code on its own.

Build your logic on FloPay's reason, and keep the raw code for your team. Our Worldpay connector guide puts it plainly: never show a raw provider reason to the buyer. The webhook payloads are in the events reference.

Common credit card decline codes and what to do

The table covers the codes merchants ask about most. Meanings are Visa's, from Stripe's network decline codes page, unless the row says otherwise. The last column is what FloPay does when the code comes back on a subscription renewal.

FloPay decides from the evidence behind a code, not the label alone. A generic refusal is usually worth another try later, but the same refusal with evidence that the card was lost is not.

CodeWhat it meansWhat to doWhat FloPay does on a renewal
05Don't honorRetry later. If it keeps failing, the customer asks their bank or uses another cardRetry later inside the billing cycle. With failover on, FloPay may try the same card on another eligible gateway first.
06ErrorRetry laterRetry later
51Not sufficient fundsRetry later, not straight awayRetry later
14Invalid account numberAsk for the correct card detailsSet the card aside
41, 43Lost card, stolen cardAsk for another card, and show the customer a generic decline, not the reasonSet the card aside
54Expired cardAsk for the new cardSet the card aside
57Transaction not permitted to cardholderAsk for another cardSet the card aside
62Restricted cardAsk for another cardNot retried later on that gateway. With failover on, another eligible gateway may still be tried.
65 (Mastercard), 1A (Visa)The bank wants the customer to authenticateBring the customer back to pay and authenticateNever retried with no customer present: the renewal goes into recovery so the customer can pay and authenticate
No code: a timeout or technical errorNo bank decision you can seeDon't charge again until you knowProve what happened: check with the provider before charging again

A few notes on reading it:

All of this is written down. The rules are in our subscriptions guide and, for Worldpay's codes, in the Worldpay connector guide.

When another gateway can help, and when it can't

A merchant with one processor has two moves after a decline: wait and retry, or ask for another card. A merchant with two processors has a third: send the card to the other one. With failover turned on, FloPay can try a declined new card on the merchant's other processor, Stripe to Worldpay or back, before the buyer sees the refusal. For a returning customer, it tries the preferred saved card across the eligible gateways before it moves on to an older card. Failover is set per gateway, and a new gateway starts with it off (routing and reliability).

A second gateway still reaches the same bank, though. FloPay keeps a decline on the gateway that took it when another gateway would reach the same bank and get the same answer, or would risk charging twice:

Two panels compare a declined new card in checkout: a generic refusal on a route with failover on can go to the next gateway, while card details to fix, failed authentication, insufficient funds, card limits, card-wide refusals and uncertain outcomes stay on the gateway that declined

Another gateway helps when the route may be the problem. It doesn't help when the card or the bank is.

What's left is mostly the generic refusal, where a different merchant account or acquirer might get a different answer. Do Not Honor Meaning covers how cascade routing treats it. A saved card can only move between gateways if it's stored outside any one processor, and what a credit card vault is explains why. To see the walk before a real decline does, the stage card form has a test outcome, Declines then succeeds on fallback, described in the stage testing guide.

When the code isn't on any list

Sometimes a code arrives that no mapping covers yet. A code FloPay can't map is recorded as UNKNOWN_DECLINE_REASON, with the provider's raw code kept beside it, and it raises an alert so we add the mapping. In a saved-card checkout an unknown reason moves on to the customer's next card instead of stopping.

That's how Worldpay's codes 93 and 192 got mapped in November. They had been stored as unknown, and they now count as do-not-honor, as do 63, 78 and 83.

If your own system maps codes, build the same habit. Keep the raw code next to your label, count the unknowns, and treat a growing unknown bucket as a mapping to fix, not a kind of decline.

The short version

See how FloPay recovers failed renewals, or visit FloPay.