invalid_expiry_yearThe expiry year is invalid

Stripe's invalid_expiry_year decline means the card's expiration year is invalid. How it differs from expired_card and what to tell the customer.

Next step
Customer should correct their card details
Hard decline
Not on Stripe's list
Share the reason
Yes

What does invalid_expiry_year mean?

The expiration year is invalid.

If the date is valid but in the past, Stripe returns expired_card instead, and the customer needs a different card.

What Stripe says to do

The customer needs to try again with the correct expiration date.

What to tell the customer

You can tell the customer the expiry year wasn't valid.

Example wording
The expiry year on the card isn't valid. Please check the date and try again.

Should you retry invalid_expiry_year?

Yes, after the customer corrects the date. It isn't on Stripe's hard decline list, so Stripe Billing retries follow your Smart Retries or custom schedule.

Before any retry, check the charge's outcome.advice_code. try_again_later means the issuer allows a retry, do_not_try_again means don't use the card again for this transaction, and confirm_card_data means some card details need checking.

Where invalid_expiry_year shows up

On a failed PaymentIntent, read last_payment_error.decline_code. On the Charge, the same code is in outcome.reason. Card declines usually come with the error code card_declined and the reason in decline_code.

Stripe also documents invalid_expiry_year as a top-level API error code, so check error.code as well as decline_code when you handle it.

To test it in a Stripe sandbox: Enter a year up to 50 years in the past, such as 95, with any test card.

Get failed payments in Slack

ChargeBell posts a Slack alert when a Stripe payment fails, with the amount, the customer, and Stripe's decline message. Open the payment from the alert to see its decline code, such as invalid_expiry_year, and follow up from there.

Related decline codes

All Stripe decline codes