# Subscription action processed event

The `subscription.action.processed` occurs when a subscription changes, such as activation, email, expiration date, payment option, payment source, perpetual price, immediate quantity change, external reference ID, renewal price, renewal product, renewal quantity, renewal type, and ship-to-address. Requests sent through the High Availability Subscription API trigger this event; changes made through other channels will not activate this event. Additionally, the Webhook Service sends notifications regardless of whether the change succeeds or fails. It provides essential feedback on the success or failure of the requested action, serving as a foundational tool for overseeing subscription action statuses and preserving system integrity. This event also underscores the importance of transparency and real-time updates in maintaining the alignment of subscription services with the needs and expectations of subscribers.

Central to this event is the [`actionType` ](#action-type)field, which identifies the specific modification applied to the subscription.&#x20;

For seamless integration and monitoring of this event, it is advised to ensure correct configuration with the High Availability API and consult with the Digital River Customer Success Manager (CSM) as needed.

This structured event data facilitates a deeper understanding and more efficient management of subscription lifecycle events.

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

```
{
   "type":"subscription.action.processed",
   "data":{
      "object":{
         "action":{
            "actionType":"ship_to_address",
            "actionStatus":"success"
         },
         "subscription":{
            "id":"13530199",
            "creationDate":"2022-06-01T09:14:48.000Z",
            "activationDate":"2022-06-01T05:00:00.000Z",
            "nextRenewalDate":"2022-07-01T05:00:00.000Z",
            "expirationDate":"2022-07-01T05:00:00.000Z",
            "graceDate":"2022-07-08T05:00:00.000Z",
            "currentQuantity":1,
            "renewalQuantity":1,
            "autoRenewal":true,
            "locale":"en_US",
            "state":"Subscribed",
            "duration":30,
            "frequency":30,
            "siteId":"sub2test",
            "shopper":{
               "id":"26195489030199"
            },
            "renewalPrice":{
               "unitPrice":10.99,
               "locked":false,
               "currency":"USD"
            },
            "term":{
               "termUnit":"MONTHS",
               "termLength":1
            },
            "product":{
               "id":"5363866300",
               "displayName":"Monthly auto renewal Subscription",
               "sku":"SUB_AUTORENEW"
            },
            "shipToAddress":{
               "id":"406032130199",
               "firstName":"Vikram42",
               "lastName":"Kumar",
               "line1":"Abc",
               "city":"Pune",
               "postalCode":"324345",
               "countrySubdivision":"CA",
               "country":"AR",
               "countryName":"Argentina",
               "phoneNumber":"02134567890",
               "emailAddress":"vkumar42@dr.com"
            },
            "paymentOption":{
               "nickName":"Default",
               "id":"4022980199",
               "isDefault":"true",
               "type":"CreditCardMethod",
               "creditCard":{
                  "expirationMonth":"4",
                  "expirationYear":"2024",
                  "displayableNumber":"************1111",
                  "type":"visa",
                  "displayName":"Visa"
               },
               "address":{
                  "id":"406032100199",
                  "firstName":"Vikram42",
                  "lastName":"Kumar",
                  "line1":"Abc",
                  "city":"Pune",
                  "postalCode":"324345",
                  "countrySubdivision":"CA",
                  "country":"AR",
                  "countryName":"Argentina",
                  "phoneNumber":"02134567890",
                  "emailAddress":"vkumar42@dr.com"
               }
            },
            "addOns":[
                
            ]
         }
      }
   },
   "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"13530199"
   }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
   "id":"12430c66-8f77-472e-81a3-f5c852ec69c6",
   "platformId":"Headless",
   "type":"subscription.action.processed",
   "accountId":"sub2test",
   "clientIds":{
      "site_id":"sub2test"
   },
   "data":{
      "object":{
         "action":{
            "actionType":"ship_to_address",
            "actionStatus":"success"
         },
         "subscription":{
            "id":"13530199",
            "creationDate":"2022-06-01T09:14:48.000Z",
            "activationDate":"2022-06-01T05:00:00.000Z",
            "nextRenewalDate":"2022-07-01T05:00:00.000Z",
            "expirationDate":"2022-07-01T05:00:00.000Z",
            "graceDate":"2022-07-08T05:00:00.000Z",
            "currentQuantity":1,
            "renewalQuantity":1,
            "autoRenewal":true,
            "locale":"en_US",
            "state":"Subscribed",
            "duration":30,
            "frequency":30,
            "siteId":"sub2test",
            "shopper":{
               "id":"26195489030199"
            },
            "renewalPrice":{
               "unitPrice":10.99,
               "locked":false,
               "currency":"USD"
            },
            "term":{
               "termUnit":"MONTHS",
               "termLength":1
            },
            "product":{
               "id":"5363866300",
               "displayName":"Monthly auto renewal Subscription",
               "sku":"SUB_AUTORENEW"
            },
            "shipToAddress":{
               "id":"406032130199",
               "firstName":"Vikram42",
               "lastName":"Kumar",
               "line1":"Abc",
               "city":"Pune",
               "postalCode":"324345",
               "countrySubdivision":"CA",
               "country":"AR",
               "countryName":"Argentina",
               "phoneNumber":"02134567890",
               "emailAddress":"vkumar42@dr.com"
            },
            "paymentOption":{
               "nickName":"Default",
               "id":"4022980199",
               "isDefault":"true",
               "type":"CreditCardMethod",
               "creditCard":{
                  "expirationMonth":"4",
                  "expirationYear":"2024",
                  "displayableNumber":"************1111",
                  "type":"visa",
                  "displayName":"Visa"
               },
               "address":{
                  "id":"406032100199",
                  "firstName":"Vikram42",
                  "lastName":"Kumar",
                  "line1":"Abc",
                  "city":"Pune",
                  "postalCode":"324345",
                  "countrySubdivision":"CA",
                  "country":"AR",
                  "countryName":"Argentina",
                  "phoneNumber":"02134567890",
                  "emailAddress":"vkumar42@dr.com"
               }
            },
            "addOns":[
                
            ]
         }
      }
   },
   "searchableData":{
      "subscriptionId":"13530199"
   },
   "createdTime":"2022-06-01T09:23:24.045582Z",
   "indexName":"webhook-events-dev-20220528",
   "callbackTrackerIndexName":"webhook-event-callbacks-dev-20220528",
   "transformPayload":false
}
```

{% endtab %}
{% endtabs %}

For more information, see [Using `subscription.action.processed` and `subscription.updated`](https://docs.digitalriver.com/commerce-api/events/event-types/subscription-event-types/pages/31Y4Oj5sApgUxGIvRobO#using-subscription.action.processed-and-subscription.updated) topic.

## Action type

An `actionType` refers to a specific action carried out on a subscription within a high-availability subscription system. It is a key component of the process, identifying the nature of the modification or adjustment made to a subscriber's account. Each `actionType` is associated with a distinct change in the subscription's status, parameters, or configuration. Examples of `actionType` include [`ship_to_address`](#ship_to_address), [`activate`](#activate), and [`cancel`](#cancel), each triggering different processes and updates to the subscription details and state. This system ensures that all changes are accurately monitored and allows for efficient subscription management and integrity.

### `activate`

When you [activate a shopper's subscription](/commerce-api/admin-apis/subscription-management/immediately-change-the-subscription/activating-a-subscription.md), the subscription state changes from `pendingActivation` to `Subscribed`. It also updates the subscription expiration date and all subscription-related data columns.

### `cancel`

Canceling a subscription triggers a change in the subscription's state from `Subscribed` to `Cancelled`. This action does not immediately close the account but sets the subscription to end after the current billing period. The `actionType` for this event would be `cancel`, indicating the specific action taken on the subscription.

### `email`

You will be notified when you [update a shopper's subscription billing or shipping email address](/commerce-api/admin-apis/subscription-management/immediately-change-the-subscription/updating-a-subscriptions-billing-and-shipping-email-address.md). The specific fields for updating these addresses in the system are:

* **Billing email address**: Identified by `subscription.billingOption.billAddress.emailAddress`, this address is used for sending billing-related communications.
* **Shipping email address**: Defined by `subscription.shipToAddress.emailAddress`, this address is used for any communications related to physical deliveries associated with the subscription.

### `expiration_date`

When you [update a shopper's expiration date](/commerce-api/admin-apis/subscription-management/immediately-change-the-subscription/updating-the-subscriptions-expiration-date.md) for a subscription, the system associates a new expiration date with the subscription.&#x20;

### `payment_option`

When you [update a shopper's subscription payment option](/commerce-api/shopper-apis/subscriptions/retrieve-the-subscription/getting-a-shoppers-subscription.md), the system associates a new billing or payment option with the subscription. When updated successfully, Retry On Account Update will trigger a billing attempt if the subscription falls under the renewal window.

### `payment_source`

When you [update a shopper's subscription payment source](/commerce-api/shopper-apis/subscriptions/update-subscription-at-the-next-renewal/changing-the-subscriptions-payment-source.md), the system associates the new payment source with the subscription. If there is a billing option associated with the payment source, the system will create a new billing option for the payment source. The request payload contains the `sourceId` and `isShippingSameAsBilling` flag.

### `perpetual_price`

When you [modify a shopper's subscription's perpetual price](/commerce-api/admin-apis/subscription-management/update-the-subscription-at-the-next-renewal/adding-or-updating-a-perpetual-unit-price.md#creating-or-changing-a-perpetual-unit-price), the system changes the subscription price [for the remaining subscription cycle](/commerce-api/shopper-apis/subscriptions/immediately-apply-a-midterm-subscription-change.md). The system updates the perpetual price or the hold price.

### `reduce`

When you [reduce a subscriber's subscription](https://docs.digitalriver.com/commerce-api-references/admin-apis/subscription-mangement/apply-an-immediate-midterm-change#v1-subscriptions-subid-reduce), either by lowering the quantity of the subscription items or removing product add-ons, the system promptly adjusts the subscriber's current subscription details. However, this action does not result in a refund for the adjustments made for the remaining period of the current subscription cycle.

### `reference_id`

You will be notified when you [modify the subscription's external reference ID](/commerce-api/admin-apis/subscription-management/immediately-change-the-subscription/changing-the-subscriptions-external-reference-identifier.md).

### `renewal_price`

When you change the shopper's subscription price, the system updates the shopper's subscription renewal price.

### `renewal_product`

When you [change the shopper's subscription renewal product](/commerce-api/admin-apis/subscription-management/update-the-subscription-at-the-next-renewal/changing-the-subscription-renewal-product.md), the system updates the shopper's subscription renewal product.

### `renewal_quantity`

When you [change the shopper's subscription renewal quantity](/commerce-api/shopper-apis/subscriptions/update-subscription-at-the-next-renewal/changing-the-subscription-renewal-quantity.md), the system updates the shopper's subscription renewal quantity.

### `renewal_type`

When you [change the shopper's subscription renewal type](/commerce-api/shopper-apis/subscriptions/update-subscription-at-the-next-renewal/changing-the-subscription-renewal-type.md), the system updates the shopper's subscription renewal quantity.

### `ship_to_address`

When you [change the shopper's ship-to address](/commerce-api/resources/reference/elements.md#shipping-address-change), the system either adds or updates it.


---

# 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-action-processed-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.
