# Subscription credit card expired event

It's crucial to ensure payments are processed without hitches when managing subscriptions. The `subscription.credit_card_expired` event plays a pivotal role in this process. It is triggered when a customer's credit card associated with their subscription is nearing its expiration date. This event is an essential notification for subscribers to update their payment information, ensuring their access to services or products remains uninterrupted. With details including subscription ID, renewal price, and credit card information, this event supports timely updates to payment methods, securing a seamless subscription management experience.

Managing the expiration of credit cards within subscription services is crucial for several reasons:

1. **Prevent service interruption:** Ensures continuous access to the service for the subscriber by preventing disruptions that can occur when a payment method expires.
2. **Maintain revenue stream:** Helps maintain a consistent revenue stream for the service provider by reducing churn due to failed payment transactions.
3. **Enhance customer experience:** Proactively prompting customers to update their payment information improves customer experience, fostering loyalty.
4. **Reduce administrative costs:** Automating the update process for expired credit cards can significantly reduce the administrative costs associated with manual follow-ups.
5. **Compliance and security:** Keeping payment information up to date is also a part of adhering to financial compliance standards and ensuring transaction security.

Promptly managing credit card expirations through automated notifications and updates benefits the service provider and significantly enhances the subscriber's experience.

{% tabs %}
{% tab title="Request" %}

```json
{
   "type":"subscription.credit_card_expired",
   "data":{
      "object":{
         "id":"4200199",
         "creationDate":"2022-03-28T15:09:36.000Z",
         "activationDate":"2022-03-28T05:00:00.000Z",
         "nextRenewalDate":"2022-06-28T05:00:00.000Z",
         "expirationDate":"2022-06-28T05:00:00.000Z",
         "graceDate":"2022-07-05T05:00:00.000Z",
         "currentQuantity":1,
         "renewalQuantity":1,
         "autoRenewal":true,
         "locale":"en_US",
         "state":"Subscribed",
         "duration":92,
         "frequency":92,
         "siteId":"earth1",
         "shopper":{
            "id":"25448428670199"
         },
         "renewalPrice":{
            "unitPrice":35.99,
            "locked":true,
            "currency":"USD"
         },
         "term":{
            "termUnit":"MONTHS",
            "termLength":3
         },
         "product":{
            "id":"5619730199",
            "externalReferenceId":"",
            "displayName":"3 Month auto renew Sub - Copy",
            "sku":"SUB_ADDONS"
         },
         "shipToAddress":{
            "id":"405320220199",
            "firstName":"Digital",
            "lastName":"River QA",
            "line1":"10380 Bren Rd W",
            "city":"Minnetonka",
            "postalCode":"55343",
            "countrySubdivision":"MN",
            "country":"US",
            "countryName":"United States",
            "phoneNumber":"9525559519",
            "emailAddress":"Auto_54203282022100838AM@digitalriver.com"
         },
         "paymentOption":{
            "nickName":"Visa 1111",
            "id":"4013880199",
            "isDefault":"false",
            "type":"CreditCardMethod",
            "creditCard":{
               "expirationMonth":"4",
               "expirationYear":"2022",
               "displayableNumber":"************1111",
               "type":"visa",
               "displayName":"Visa"
            },
            "address":{
               "id":"405320210199",
               "firstName":"Digital",
               "lastName":"River QA",
               "line1":"10380 Bren Rd W",
               "city":"Minnetonka",
               "postalCode":"55343",
               "countrySubdivision":"MN",
               "country":"US",
               "countryName":"United States",
               "phoneNumber":"9525559519",
               "emailAddress":"Auto_54203282022100838AM@digitalriver.com"
            }
         },
         "addOns":[
            {
               "product":{
                  "id":"5619750199",
                  "displayName":"Subscription AddOn_1 - Copy",
                  "sku":"SUB_ADDONS"
               },
               "quantity":1,
               "renewalPrice":{
                  "unitPrice":4.0,
                  "locked":true,
                  "currency":"USD"
               }
            }
         ]
      }
   },
   "clientIds":{
      "site_id":"earth1"
   },
   "searchableData":{
      "subscriptionId":"4200199"
   }
}
```

{% endtab %}

{% tab title="Response" %}

```json
  {
    "id": "c5b1adf3-3ae8-45d8-a0ca-fa1e9f2d0b05",
    "type": "subscription.credit_card_expired",
    "data": {
        "object": {    
         "id":"4200199",
         "creationDate":"2022-03-28T15:09:36.000Z",
         "activationDate":"2022-03-28T05:00:00.000Z",
         "nextRenewalDate":"2022-06-28T05:00:00.000Z",
         "expirationDate":"2022-06-28T05:00:00.000Z",
         "graceDate":"2022-07-05T05:00:00.000Z",
         "currentQuantity":1,
         "renewalQuantity":1,
         "autoRenewal":true,
         "locale":"en_US",
         "state":"Subscribed",
         "duration":92,
         "frequency":92,
         "siteId":"earth1",
         "shopper":{
            "id":"25448428670199"
         },
         "renewalPrice":{
            "unitPrice":35.99,
            "locked":true,
            "currency":"USD"
         },
         "term":{
            "termUnit":"MONTHS",
            "termLength":3
         },
         "product":{
            "id":"5619730199",
            "externalReferenceId":"",
            "displayName":"3 Month auto renew Sub - Copy",
            "sku":"SUB_ADDONS"
         },
         "shipToAddress":{
            "id":"405320220199",
            "firstName":"Digital",
            "lastName":"River QA",
            "line1":"10380 Bren Rd W",
            "city":"Minnetonka",
            "postalCode":"55343",
            "countrySubdivision":"MN",
            "country":"US",
            "countryName":"United States",
            "phoneNumber":"9525559519",
            "emailAddress":"Auto_54203282022100838AM@digitalriver.com"
         },
         "paymentOption":{
            "nickName":"Visa 1111",
            "id":"4013880199",
            "isDefault":"false",
            "type":"CreditCardMethod",
            "creditCard":{
               "expirationMonth":"4",
               "expirationYear":"2022",
               "displayableNumber":"************1111",
               "type":"visa",
               "displayName":"Visa"
            },
            "address":{
               "id":"405320210199",
               "firstName":"Digital",
               "lastName":"River QA",
               "line1":"10380 Bren Rd W",
               "city":"Minnetonka",
               "postalCode":"55343",
               "countrySubdivision":"MN",
               "country":"US",
               "countryName":"United States",
               "phoneNumber":"9525559519",
               "emailAddress":"Auto_54203282022100838AM@digitalriver.com"
            }
         },
         "addOns":[
            {
               "product":{
                  "id":"5619750199",
                  "displayName":"Subscription AddOn_1 - Copy",
                  "sku":"SUB_ADDONS"
               },
               "quantity":1,
               "renewalPrice":{
                  "unitPrice":4.0,
                  "locked":true,
                  "currency":"USD"
               }
            }
         ]
      }
   },
 
    "liveMode": false,
    "createdTime": "2021-07-01T06:19:02.725277Z"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/events/event-types/subscription-event-types/subscription-credit-card-expired-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
