Subscription updated event

Understand the updated event.

The subscription.updated event plays a pivotal role in the subscription lifecycle within our system. Triggered whenever there is a modification to any aspect of a subscriber's account—from renewal price, renewal quantity, renewal product, renewal type, expiration date, and immediate mid-term changes like immediately reducing the quantity and increasing the quantity—this event helps you stay informed about significant changes. Changes initiated through all channels, including Global Commerce, the High Availability Subscription API, integration jobs such as SSN/UM, and the Global Commerce-hosted storefront self-service page, will trigger this event

The previousAttributes object in this event provides invaluable insight into the specifics of these changes, highlighting the altered attributes and their state before the update. This level of detail is essential for maintaining accurate records, ensuring the continuity of services, and delivering exceptional customer service.

Previous attributes

When a subscription undergoes any modifications, such as changes in billing details, subscription period adjustments, or service type transitions, a subscription.updated event is generated. This event is crucial for tracking changes accurately to ensure the continuity of a seamless service experience for your customers.

A key component of this event is the previousAttributes object. This object encapsulates the details of what exactly changed during the update. It lists the attributes that were modified and provides the previous values of these attributes before the update took place.

For example, when a subscription's renewal type changes, the previousAttributes could look like this:

  • For a change from manual to auto-renewal:

    "previousAttributes": {
      "autoRenewal": true
    }
  • For a change from auto-renewal to manual:

    "previousAttributes": {
      "autoRenewal": false
    }

Handling a change to the renewal price

When the renewal price of a subscription changes, a subscription.updated event is fired. This event notifies stakeholders of any adjustments to the subscription cost for the upcoming renewal period. Understanding this event is crucial for maintaining transparency with subscribers and ensuring smooth subscription management practices.

Understanding the event structure

Upon a renewal price change, you will receive a subscription.updated event with the following structure:

  • type: Identifies the event type as subscription.updated.

  • data:

    • object: Contains details about the subscription, including ID, state, renewal quantity, and more.

    • renewalPrice: Details the new renewal price, including unitPrice and currency.

  • previousAttributes: Captures the state of the subscription before the update.

    • renewalPrice: Indicates the previous renewal price to allow for a clear comparison.

    The previousAttributes section is especially important as it provides the old values before the update, enabling clear visibility into what has changed. Here's an example snippet indicating a price change:

    "previousAttributes": {
      "renewalPrice": {
        "unitPrice": 9.25
      }
    }

    Significance

    • Transparency: Subscribers are informed about the price change before their renewal date, maintaining trust.

    • Compliance: Ensures adherence to policies or regulations requiring pricing change notification.

    • Analytics: Helps in analyzing the impact of price adjustments on retention and revenue.

    Any change in the renewal price is a critical event that requires attention to manage subscriber expectations effectively and comply with service agreements.

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17986250289",
      "creationDate": "2022-07-27T02:35:43.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2023-07-26T05:00:00.000Z",
      "expirationDate": "2023-07-26T05:00:00.000Z",
      "graceDate": "2023-07-26T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 365,
      "frequency": 365,
      "siteId": "sub2test",
      "shopper": {
        "id": "507033610289",
        "externalReferenceId": "TVHHJW10QWRH10"
      },
      "renewalPrice": {
        "unitPrice": 10.99,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "YEARS",
        "termLength": 1
      },
      "product": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "renewalProduct": {
        "id": "5363866300",
        "displayName": "Monthly auto renewal Subscription",
        "sku": "SUB_AUTORENEW"
      },
      "shipToAddress": {
        "id": "333353820289",
        "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_07262022093537PM362SQVLF@digitalriver.com",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaRIU4NN",
        "id": "18513330289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333376190289",
          "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_07262022093537PM362SQVLF@digitalriver.com",
          "countyName": "Minnetonka"
        }
      },
      "addOns": [
         
      ]
    },
    "previousAttributes": {
      "renewalPrice": {
        "unitPrice": 9.25
      },
      "renewalProduct": {
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "id": "5336721400",
        "sku": "Legacy_Annual_Auto_2"
      }
    }
  },
    "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17986250289"
   }
}

Handling a change to the subscription renewal date

In the lifecycle of managing subscriptions, adjusting the renewal date is a common and necessary action to accommodate various scenarios, such as extending a trial period, aligning billing cycles, or responding to customer requests. The subscription.updated event is crucial as it notifies when there's a modification to the subscription's renewal date. This section offers a comprehensive guide on handling such updates efficiently, ensuring smooth subscription management while maintaining transparency with subscribers.

Handling a change to the subscription renewal product

The subscription.updated event is triggered whenever a product is modified associated with a subscriber's renewal period. This can include changes such as updating to a new product version, switching to a different product that better suits the subscriber's needs, or modifying the product's components, including add-ons. This event ensures that subscribers and service providers are informed about the upcoming changes to the subscribed product before the current subscription term renews.

Key information provided in the event's payload includes:

  • id: The subscription identifier.

  • renewalProduct: Details of the new product for renewal, including product id, displayName, and sku.

  • previousAttributes: Shows the renewalProduct details before the update, allowing an easy comparison between the old and new renewal products.

Understanding and handling this event is crucial for maintaining transparency with subscribers and ensuring a seamless transition to the new product.

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17986250289",
      "creationDate": "2022-07-27T02:35:43.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2023-07-26T05:00:00.000Z",
      "expirationDate": "2023-07-26T05:00:00.000Z",
      "graceDate": "2023-07-26T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 365,
      "frequency": 365,
      "siteId": "sub2test",
      "shopper": {
        "id": "507033610289",
        "externalReferenceId": "TVHHJW10QWRH10"
      },
      "renewalPrice": {
        "unitPrice": 10.99,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "YEARS",
        "termLength": 1
      },
      "product": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "renewalProduct": {
        "id": "5363866300",
        "displayName": "Monthly auto renewal Subscription",
        "sku": "SUB_AUTORENEW"
      },
      "shipToAddress": {
        "id": "333353820289",
        "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_07262022093537PM362SQVLF@digitalriver.com",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaRIU4NN",
        "id": "18513330289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333376190289",
          "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_07262022093537PM362SQVLF@digitalriver.com",
          "countyName": "Minnetonka"
        }
      },
      "addOns": [
         
      ]
    },
    "previousAttributes": {
      "renewalPrice": {
        "unitPrice": 9.25
      },
      "renewalProduct": {
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "id": "5336721400",
        "sku": "Legacy_Annual_Auto_2"
      }
    }
  },
    "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17986250289"
   }  
}

Handling a change to the subscription renewal type

When the renewal type of a subscription changes, a subscription.updated event is triggered. This event signifies a modification in how the subscription will be renewed – switching between manual and automatic renewals. It's a critical update that reflects either a change in customer preference or an adjustment in business strategy regarding the subscription.

Key details in the event payload:

  • id: Subscription identifier.

  • autoRenewal: Boolean value indicating if the renewal is set to automatic (true) or manual (false).

  • previousAttributes: Contains the subscription attributes before the update, allowing for a comparison. For the renewal type change, it will typically show "autoRenewal": true or "autoRenewal": false depending on the initial setup.

Example:

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17989940289",
      "autoRenewal": false
    },
    "previousAttributes": {
      "autoRenewal": true
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T03:03:31.240841Z"
}

This event communicates a significant update to all relevant parties, ensuring transparency and maintaining trust in the subscription service.

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17989940289",
      "creationDate": "2022-07-27T03:03:02.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2023-07-26T05:00:00.000Z",
      "expirationDate": "2023-07-26T05:00:00.000Z",
      "graceDate": "2023-07-26T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": false,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 365,
      "frequency": 365,
      "siteId": "sub2test",
      "shopper": {
        "id": "507071400289",
        "externalReferenceId": "WGEMPHUZMXHN"
      },
      "renewalPrice": {
        "unitPrice": 9.25,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "YEARS",
        "termLength": 1
      },
      "product": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "renewalProduct": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "shipToAddress": {
        "id": "333519630289",
        "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_07262022100256PM587GIVYE@digitalriver.com",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaBSM7YE",
        "id": "18524920289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333608930289",
          "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_07262022100256PM587GIVYE@digitalriver.com",
          "countyName": "Minnetonka"
        }
      },
      "addOns": [
         
      ]
    },
    "previousAttributes": {
      "autoRenewal": true
    }
  },
   "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17989940289"
   }   
}

Handling a change to the subscription renewal quantity

When the renewal quantity of a subscription changes, a subscription.updated event is triggered. This event is a crucial indication for subscribers and service providers that there has been an adjustment in the number of subscribed units or services before the next renewal period. The event payload provides detailed information, including:

  • Subscription ID ("subscriptionId")

  • Previous and Current Quantity Values: It includes both the previous and current values of currentQuantity and renewalQuantity to maintain transparency.

  • Renewal Product Details: Information about the renewal product, including ID, displayName, and SKU.

  • AutoRenewal Status: Indicates whether the subscription is set to renew automatically.

Example of subscription.updated event data with a focus on renewal quantity change:

{
  "type": "subscription.updated",
  "data": {
    "object": {
      ...
      "currentQuantity": 3,
      "renewalQuantity": 3,
      ...
    },
    "previousAttributes": {
      "currentQuantity": 1,
      "renewalQuantity": 1
    }
  }
}

This event signals an important update in the subscription's lifecycle and aids in maintaining effective communication and satisfaction between the service provider and the customer.

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17977930289",
      "creationDate": "2022-07-27T02:40:02.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2023-07-26T05:00:00.000Z",
      "expirationDate": "2023-07-26T05:00:00.000Z",
      "graceDate": "2023-07-26T05:00:00.000Z",
      "currentQuantity": 3,
      "renewalQuantity": 3,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 365,
      "frequency": 365,
      "siteId": "sub2test",
      "shopper": {
        "id": "507034050289",
        "externalReferenceId": "TMOUBN1NC107M"
      },
      "renewalPrice": {
        "unitPrice": 9.25,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "YEARS",
        "termLength": 1
      },
      "product": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "renewalProduct": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "shipToAddress": {
        "id": "333403920289",
        "firstName": "Subscription",
        "lastName": "Automation",
        "companyName": "DR",
        "line1": "10380 Bren Rd W",
        "line2": "Conjunto 304",
        "city": "Minnetonka",
        "postalCode": "55343",
        "countrySubdivision": "MN",
        "country": "US",
        "countryName": "United States",
        "phoneNumber": "952-253-1234",
        "emailAddress": "subs_07262022093956PM876CLTVC@digitalriver.com"
      },
      "paymentOption": {
        "nickName": "VisaLGDIP6",
        "id": "18520600289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2023",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333417850289",
          "firstName": "Subscription",
          "lastName": "Automation",
          "companyName": "DR",
          "line1": "10380 Bren Rd W",
          "line2": "Conjunto 304",
          "city": "Minnetonka",
          "postalCode": "55343",
          "countrySubdivision": "MN",
          "country": "US",
          "countryName": "United States",
          "phoneNumber": "952-253-1234",
          "emailAddress": "subs_07262022093956PM876CLTVC@digitalriver.com"
        }
      },
      "addOns": [
         
      ]
    },
    "previousAttributes": {
      "currentQuantity": 1,
      "renewalQuantity": 1
    }
  },
    "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17977930289"
   } 
}

Handling midterm subscription activity

When a subscription is updated midterm, it's fundamental to accurately track and manage these changes to ensure a seamless customer experience. The subscription.updated event is critical for identifying and responding to these modifications, which can range from billing details changes, adjustments in subscription periods, or updates to the service types.

Key Steps:

  1. Identify the Change: Review the subscription.updated event data to understand exactly what was altered in the subscription. This could involve changes in quantity, pricing, product details, payment methods, or other attributes.

  2. Update Records: Promptly update your internal records to reflect the changes identified. This ensures that all systems are in sync and reduces the risk of service interruptions or billing inaccuracies.

  3. Notify the Subscriber: Depending on the nature of the change (e.g., pricing or product alterations), it may be pertinent to notify the subscriber. This can be done via email, SMS, or in-app notifications, ensuring transparency and maintaining trust.

  4. Adjust Billing if Necessary: If the change affects the billing amount or cycle, make the necessary adjustments to the billing system. This may include issuing a new invoice, refunding overcharges, or updating the billing schedule.

  5. Monitor for Issues: After processing the change, monitor the subscription for any issues that might arise. This can include payment failures, access problems, or further changes requested by the customer.

By following these steps, companies can effectively manage midterm subscription changes, keeping customer satisfaction high and operational issues to a minimum.

{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17986430289",
      "creationDate": "2022-07-27T02:40:07.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2022-08-26T05:00:00.000Z",
      "expirationDate": "2022-08-26T05:00:00.000Z",
      "graceDate": "2022-09-02T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 31,
      "frequency": 31,
      "siteId": "sub2test",
      "shopper": {
        "id": "507034990289",
        "externalReferenceId": "YXZEGJ0V7Y32"
      },
      "renewalPrice": {
        "unitPrice": 10.99,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "MONTHS",
        "termLength": 1
      },
      "product": {
        "id": "5363866300",
        "displayName": "Monthly auto renewal Subscription",
        "sku": "SUB_AUTORENEW"
      },
      "renewalProduct": {
        "id": "5363866300",
        "displayName": "Monthly auto renewal Subscription",
        "sku": "SUB_AUTORENEW"
      },
      "shipToAddress": {
        "id": "333411690289",
        "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_07262022094001PM256WRYMG@digitalriver.com",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaXFK0GS",
        "id": "18519660289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333417910289",
          "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_07262022094001PM256WRYMG@digitalriver.com",
          "countyName": "Minnetonka"
        }
      },
      "addOns": [
        {
          "product": {
            "id": "5400082600",
            "displayName": "Subscription AddOn 1",
            "sku": "SUBS_ADDON"
          },
          "quantity": 3,
          "renewalPrice": {
            "unitPrice": 11.0,
            "locked": false,
            "currency": "USD"
          }
        }
      ]
    },
    "previousAttributes": {
      "currentQuantity": 3,
      "renewalQuantity": 3
    }
  },
  "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17986430289"
   }   
}

Handling a change to the subscription expiration date

The subscription.changed event related to expiration date changes indicates a significant modification in the end date of a subscription. Several actions, such as extending or reducing the subscription term, adjusting the renewal settings, or altering the subscription package, can trigger this event.

Key attributes affected:

  • expirationDate: The updated expiration date of the subscription.

  • nextRenewalDate: Possibly adjusted along with the expiration date, especially for auto-renewing subscriptions.

  • duration and frequency: These may change to reflect adjustments in the subscription period due to the update.

Example scenarios:

  1. Extension of subscription term: A subscriber opts to extend their existing subscription term, pushing the expiration date further into the future.

  2. Early termination: Either the subscriber or provider decides to terminate the subscription ahead of its original expiry date, setting a new, earlier expiration date.

{
   "type": "subscription.updated",
  "data": {
    "object": {
      "id": "17976370289",
      "creationDate": "2022-07-27T02:31:11.000Z",
      "activationDate": "2022-07-26T05:00:00.000Z",
      "nextRenewalDate": "2024-07-26T05:00:00.000Z",
      "expirationDate": "2024-07-26T05:00:00.000Z",
      "graceDate": "2024-07-26T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 366,
      "frequency": 366,
      "siteId": "sub2test",
      "shopper": {
        "id": "507032380289",
        "externalReferenceId": "VPJIGHX21053W"
      },
      "renewalPrice": {
        "unitPrice": 9.25,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "YEARS",
        "termLength": 1
      },
      "product": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "renewalProduct": {
        "id": "5336721400",
        "displayName": "Legacy_Annual_Auto_2_Has_Change",
        "sku": "Legacy_Annual_Auto_2"
      },
      "shipToAddress": {
        "id": "333310610289",
        "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_07262022093105PM669XKWZN@digitalriver.com",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaOUEN58",
        "id": "18505720289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "7",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333359110289",
          "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_07262022093105PM669XKWZN@digitalriver.com",
          "countyName": "Minnetonka"
        }
      },
      "addOns": [
         
      ]
    },
    "previousAttributes": {
      "duration": 365,
      "nextRenewalDate": "2023-07-26T05:00:00.000Z",
      "state": "PendingRenewal",
      "graceDate": "2023-07-26T05:00:00.000Z",
      "expirationDate": "2023-07-26T05:00:00.000Z",
      "frequency": 365
    }
  },
    "clientIds":{
      "site_id":"sub2test"
   },
   "searchableData":{
      "subscriptionId":"17976370289"
   } 
}

Using subscription.action.processed and subscription.updated

The subscription.action.processed and subscription.updated events are crucial in keeping subscribers and service providers informed about subscription changes. While they may cover similar updates, such as expiration_date, renewal_type, and renewal_price, they are triggered under different circumstances and serve distinctive purposes:

  • subscription.action.processed: This event is triggered when specific actions, such as updating the renewal_type, are processed through various channels like the high-availability (HA) subscription API. It signifies that the requested action on the subscription has been successfully processed, ensuring that changes are accurately reflected and communicated.

  • subscription.updated: Occurs when a subscription is updated, either through integration jobs, the -availability (HA) subscription API, or self-service options on the storefront. This event is broader, encompassing updates to billing cycles, subscription plans, and subscriber information. Unique to this event is its coverage of changes made through certain channels that do not trigger the subscription.action.processed event. For instance, a change in renewal_price via SSN (Self Service Network) leads to the emission of only the subscription.updated event.

Understanding the distinction and overlap between these events allows for better integration and event handling strategy, ensuring that applications or services subscribing to these events can accurately process and react to changes in subscription details.

Last updated