> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/commerce-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/commerce-api/events/event-types/subscription-event-types/subscription-payment-failed-event.md).

# Subscription payment failed event

The `subscription.payment_failed` event is a crucial notification sent out by Digital River to inform relevant stakeholders that an attempt to process a subscription payment was unsuccessful. This event is particularly aimed at circumstances involving the auto-renewal of subscriptions, ensuring timely communication about any issues with transaction processes. Understanding the dynamics of this event is essential for maintaining uninterrupted subscription services and efficiently managing payment failure instances.

{% hint style="info" %}
PayPal and other payment methods share the same events. However, the contents of the email notification for each payment method will differ.
{% endhint %}

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

```json
{
   "type":"subscription.payment_failed",
   "data":{
      "object":{
         "id":"5610199",
         "creationDate":"2022-03-28T16:29:13.000Z",
         "activationDate":"2022-03-28T05:00:00.000Z",
         "nextRenewalDate":"2022-05-28T05:00:00.000Z",
         "nextBillingDate":"2022-05-28T05:00:00.000Z",
         "expirationDate":"2022-05-28T05:00:00.000Z",
         "graceDate":"2022-06-04T05:00:00.000Z",
         "currentQuantity":1,
         "renewalQuantity":1,
         "autoRenewal":true,
         "locale":"en_US",
         "state":"PendingRenewal",
         "duration":61,
         "frequency":30,
         "currentBillingCycleNumber":2,
         "totalNumberOfBillingCycle":2,
         "siteId":"sub2test",
         "shopper":{
            "id":"25448436960199",
            "externalReferenceId":"OXELSH53JI9L"
         },
         "renewalPrice":{
            "unitPrice":9.0,
            "locked":false,
            "currency":"USD"
         },
         "term":{
            "termUnit":"MONTHS",
            "termLength":1
         },
         "product":{
            "id":"5367865200",
            "displayName":"APM_2_months_auto",
            "sku":"SUBS_COMMITMENT"
         },
         "shipToAddress":{
            "id":"405361290199",
            "firstName":"Subscription",
            "lastName":"Automation",
            "companyName":"DR",
            "line1":"10380 Bren Rd W",
            "line2":"Conjunto 304",
            "line3":"Conjunto 304",
            "city":"Minnetonka",
            "postalCode":"55343",
            "countrySubdivision":"MN",
            "country":"US",
            "countryName":"United States",
            "phoneNumber":"952-253-1234",
            "emailAddress":"subs_03282022112857AM783CMDJQ@digitalriver.com",
            "countyName":"Minnetonka"
         },
         "paymentOption":{
            "nickName":"VisaYVX7B2",
            "id":"4017490199",
            "isDefault":"true",
            "type":"CreditCardMethod",
            "creditCard":{
               "expirationMonth":"3",
               "expirationYear":"2024",
               "type":"visa",
               "displayName":"Visa"
            },
            "address":{
               "id":"405360070199",
               "firstName":"Subscription",
               "lastName":"Automation",
               "companyName":"DR",
               "line1":"10380 Bren Rd W",
               "line2":"Conjunto 304",
               "line3":"Conjunto 304",
               "city":"Minnetonka",
               "postalCode":"55343",
               "countrySubdivision":"MN",
               "country":"US",
               "countryName":"United States",
               "phoneNumber":"952-253-1234",
               "emailAddress":"subs_03282022112857AM783CMDJQ@digitalriver.com",
               "countyName":"Minnetonka"
            }
         },
         "addOns":[
              
         ]
      }
   },
   "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"5610199"
   }
}
```

{% endtab %}

{% tab title="Response" %}

```json
  {
    "id": "5de114d9-a868-420f-9290-0afbaeaa0629",
    "type": "subscription.payment_failed",
    "data": {
        "object": {                        "id":"5610199",
         "creationDate":"2022-03-28T16:29:13.000Z",
         "activationDate":"2022-03-28T05:00:00.000Z",
         "nextRenewalDate":"2022-05-28T05:00:00.000Z",
         "nextBillingDate":"2022-05-28T05:00:00.000Z",
         "expirationDate":"2022-05-28T05:00:00.000Z",
         "graceDate":"2022-06-04T05:00:00.000Z",
         "currentQuantity":1,
         "renewalQuantity":1,
         "autoRenewal":true,
         "locale":"en_US",
         "state":"PendingRenewal",
         "duration":61,
         "frequency":30,
         "currentBillingCycleNumber":2,
         "totalNumberOfBillingCycle":2,
         "siteId":"sub2test",
         "shopper":{
            "id":"25448436960199",
            "externalReferenceId":"OXELSH53JI9L"
         },
         "renewalPrice":{
            "unitPrice":9.0,
            "locked":false,
            "currency":"USD"
         },
         "term":{
            "termUnit":"MONTHS",
            "termLength":1
         },
         "product":{
            "id":"5367865200",
            "displayName":"APM_2_months_auto",
            "sku":"SUBS_COMMITMENT"
         },
         "shipToAddress":{
            "id":"405361290199",
            "firstName":"Subscription",
            "lastName":"Automation",
            "companyName":"DR",
            "line1":"10380 Bren Rd W",
            "line2":"Conjunto 304",
            "line3":"Conjunto 304",
            "city":"Minnetonka",
            "postalCode":"55343",
            "countrySubdivision":"MN",
            "country":"US",
            "countryName":"United States",
            "phoneNumber":"952-253-1234",
            "emailAddress":"subs_03282022112857AM783CMDJQ@digitalriver.com",
            "countyName":"Minnetonka"
         },
         "paymentOption":{
            "nickName":"VisaYVX7B2",
            "id":"4017490199",
            "isDefault":"true",
            "type":"CreditCardMethod",
            "creditCard":{
               "expirationMonth":"3",
               "expirationYear":"2024",
               "type":"visa",
               "displayName":"Visa"
            },
            "address":{
               "id":"405360070199",
               "firstName":"Subscription",
               "lastName":"Automation",
               "companyName":"DR",
               "line1":"10380 Bren Rd W",
               "line2":"Conjunto 304",
               "line3":"Conjunto 304",
               "city":"Minnetonka",
               "postalCode":"55343",
               "countrySubdivision":"MN",
               "country":"US",
               "countryName":"United States",
               "phoneNumber":"952-253-1234",
               "emailAddress":"subs_03282022112857AM783CMDJQ@digitalriver.com",
               "countyName":"Minnetonka"
            }
         },
         "addOns":[
             
         ]
      }
   },       "liveMode": false,
    "createdTime": "2021-07-01T06:19:02.725277Z"
}
```

{% endtab %}
{% endtabs %}
