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

Decline Code 54: Expired Card in WooCommerce and NMI

Decline code 54 means the issuer says the card is expired. In NMI it usually shows as 223 or 224. Here is how to tell a typo from a dead card and what to do.

Decline code 54 means expired card: the issuer says the expiration date on the card is past, or does not match what the bank has on file. In NMI this usually shows as response code 223 (Expired card) or 224 (Invalid expiration date). Ask the customer to check the date or use a new card.

The standard issuer value is 54, but wording and exact numbers vary by processor and card network, so check your processor’s code list. NMI itself returns the three-digit response_code. The overview is in credit card decline codes explained, and every NMI value is listed in the response code lookup.

What an expired card decline means

A card is valid through the last day of the month printed on it. After that, the issuer rejects it. Code 54 is the issuer’s answer; NMI maps it to 223 Expired card in the usual case, depending on the processor. A decline for a wrong date, such as month and year swapped, usually comes back as 224 Invalid expiration date.

The two differ in what you should tell the customer. With 223 the card is likely dead. With 224 the card may be fine and the date was typed wrong.

Why it happens

  1. Typo in the date. The most common cause at checkout. Month and year swapped, or a two-digit year read as four.
  2. The card expired. Common on subscriptions and saved cards, where a card that worked for two years stops on the first of the month.
  3. The customer has a replacement card. The bank issued a new card with a new date and the old details are still saved.
  4. Autofill gave an old date. A browser filled in an outdated saved card.
  5. The saved token is stale. The vault record holds the old expiry. Whether it updates depends on the card updater service your processor offers; check with them.

What to do

  1. Open the order and read the gateway response in the notes. Confirm the number is 223 or 224, not something else.
  2. For 224, ask the customer to retype the date and try again. Do not mark the card as bad.
  3. For 223, ask for a different card or for the new card details.
  4. For a subscription renewal, stop retrying the same stored card. Retries on an expired date will fail every time. Move the order to on-hold and send the customer a card update link.
  5. For saved cards, remove the expired one so it is not offered at checkout again.

A ready-to-use message for the customer:

Your bank says the expiration date on this card is no longer valid. Please check the month and year, or use a different card. If your card was recently replaced, the new one will have a new date.

A decision rule for retries

Use the clock, not the count. If today is after the last day of the printed month, do not retry the stored card at all. If the date is still in the future and you get 224, the card details were wrong, so one corrected attempt is fine. If the stored date is in the future but the bank still says expired, the bank has issued a new date and the stored data is stale, so ask the customer for fresh details.

For renewal flows, set up a reminder before the card expires rather than a retry after. The dunning playbook for failed renewals shows the timing.

When to stop and who to call

  • The customer’s bank if the customer swears the card is current and the date is typed correctly. The issuer may have the wrong date on file.
  • Your processor or reseller if many unrelated customers get 223 or 224 on valid cards, or if saved cards keep expiring without updates. Ask whether an account updater service is available on your merchant account, since that depends on the provider. See gateway, processor and merchant account if you are not sure which party that is.

Related issuer declines are covered in decline code 51 and credit card return codes.

How NMIWP helps

NMIWP stores the raw gateway response in the WooCommerce order notes, so you can tell 223 from 224 in seconds, and it uses hosted card fields so the date is entered in an NMI iframe. Customer Vault saved cards, which customers can manage in My Account, are a Pro feature, and subscription renewals with soft decline retry are Enterprise. It cannot change an issuer’s decision.

Quick answers

Is decline code 54 the same as NMI 223?

Usually, but it depends on the processor. Read the NMI response code and text on the order.

Can an expired card still be charged?

No. The issuer will refuse it. The customer needs to give new details.

Why did a card that expires this month fail?

Cards expire at the end of the printed month, but a replacement may already be active, and the old one can be closed early.

Is invalid expiration date the same thing?

Close but not the same. 224 usually means the date does not match, which can be a typo.

More in this series: Decline Code 14: Invalid Card Number at NMI Checkout | Refer to Card Issuer (Code 01, 02, NMI 240): What It Means | Decline Code 57: Transaction Not Permitted to Cardholder

Last reviewed November 2026.

NMI for WooCommerce

Keep saved cards and renewals current

Saved cards and subscription renewals are paid features of NMIWP.

See pricing

Free on WordPress.org. Pro adds saved cards.