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_abc123",
  "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

Use this test card number to simulate an expired_card decline:
4000000000000069
Any future expiration date and any CVC will work. (The decline is simulated regardless of the expiration date you provide.)
curl -X POST https://api.flowlix.dev/v1/payments \
  -H "Authorization: Bearer fl_test_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "currency": "eur",
    "card": {
      "number": "4000000000000002",
      "exp_month": 12,
      "exp_year": 2027,
      "cvc": "123",
      "holder_name": "Test User"
    },
    "customer": {
      "email": "test@example.com",
      "first_name": "Test",
      "last_name": "User",
      "country": "DE",
      "phone": "+491234567890",
      "address": "100 Main St",
      "city": "Berlin",
      "zip": "10115"
    }
  }'