Skip to main content

Expired Card

Decline code: expired_card Error type: card_error HTTP status: 201 Created (payment status becomes failed asynchronously)

What it means

The card used for the payment has passed its expiration date. The issuing bank rejected the transaction because the card is no longer valid.

Why it happens

  • The card’s expiration month/year has passed (e.g., a card with exp_month: 03, exp_year: 2025 used after March 2025).
  • The customer may not have received or activated their replacement card yet.
  • The customer may be using saved card details that are outdated.
This is a straightforward, non-suspicious decline. The customer simply needs to use a valid card.

API response

The payment is created with status: "pending". After processing, it transitions to failed with decline details:
{
  "id": "pay_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "failed",
  "decline_code": "expired_card",
  "decline_message": "The card has expired."
}

What to tell the customer

Your card has expired. Please update your card details or use a different payment method.
This message can be direct since expired cards are not sensitive or embarrassing — it is a routine issue that customers understand.

What the merchant should do

  1. Show a clear message indicating the card has expired.
  2. Highlight the expiration date fields in your payment form if possible, so the customer can verify their input.
  3. Allow the customer to update their card or enter a different one.
  4. Do not retry — an expired card will not start working again. The customer needs to take action.
  5. If you store cards on file, proactively notify customers before their saved cards expire so they can update them.
  6. Consider pre-validating the expiration date client-side before sending the request to the API.

Testing

The current Flowlix sandbox only deterministically reproduces the do_not_honor and insufficient_funds decline codes (see Test Cards). To exercise your expired_card handling end-to-end, write an integration test that injects a Payment with status: "failed" and decline_code: "expired_card" into your handler, or file a request to add this code to the sandbox.