LogoLogo
System Status
  • Commerce API
    • Test and use cases
    • Roles and permissions
    • Sending API calls
  • Shopper APIs
    • Shopper basics
      • Common use cases
        • Creating a customer
        • Applying store credit
        • Private store workflow
        • Guest checkout
    • OAuth
      • Authentication
      • OAuth 2.0 APIs
      • Token
      • Access tokens
      • Session-aware access tokens
      • Authorizing a shopper
    • Shoppers
      • Managing shoppers
        • User management
        • Single sign-on (SSO)
        • Data validation
        • Bulk user management
        • Bulk user account export
      • Managing a shopper's account
      • Managing a shopper's address
      • Managing payment options
    • Product discovery
      • Categories
      • Products
      • Product variations
      • Pricing
      • Inventory status
      • Financing
      • Offers
        • Understanding offers
        • How to use point of promotions (POPs)
          • Retrieving all point of promotion offers for a specific product
          • Retrieving all offers for a specific point of promotion
        • How to use offers
      • Private stores
        • Managing private stores
        • Submitting an order for a private store
        • Useful APIs
      • Fulfillment
        • Electronic Fulfillment Service (OFI)
        • Digital rights
        • Digital rights revocation
        • Physical fulfillment
          • EDI X12 832 definition data elements
          • EDI X12 846 definition data elements
          • EDI X12 850 definition data elements
          • EDI X12 855 definition data elements
          • EDI X12 856 definition data elements
          • EDI X12 180-1 definition data elements
          • EDI X12 180-2 definition of data elements
          • EDI X12 180-3 definition of data elements
    • Cart
      • Applying a shopper to a cart
      • Getting the current cart
      • Creating or updating a cart
        • Adding a product to a cart
          • Gifting
        • Capturing the customer's IP address
        • Providing address information
        • Managing the shipping or billing address
        • Providing subscription information
        • Managing payment methods
        • Capturing the Terms of Sale (TOS) acceptance
      • Managing offers in a cart
        • Applying an offer
        • Applying a coupon or promo code
        • Getting all applied offers
        • Removing an applied offer
        • Removing eligible offers
        • Reconciling conflicting offers
        • Dynamic offers/personalization
          • Skipping Global Commerce merchandising offer arbitration
          • Triggering a promotional URL offer
          • Overriding a promotional URL offer discount
      • Pricing
        • Landed cost
          • Mixed cart support
          • Tax-included pretty price
      • Redirecting to a Digital River-hosted cart
      • Configuring taxes
        • Managing tax identifiers
      • Managing shipping options
        • Getting shipping options
        • Providing a shipping discount
      • Managing line items
      • Applying a price override
      • Managing payment sessions
      • Managing web checkout
      • Submitting a cart
        • Initiating a charge
        • Authorization declines
      • Resuming cart submission
      • HGOP2
    • Orders
      • Getting orders
      • Selling entities
      • Retrieving addresses from an order
      • Retrieving line items from an order
      • Order lookup
      • Returns
        • Initiate an authenticated session
        • Setting up returns in Global Commerce
        • Managing returns
    • Subscriptions
      • Retrieve the subscription
        • Getting all orders for a subscription
        • Getting a subscription's pending actions
        • Getting all subscriptions for a shopper
        • Getting a subscription by identifier
      • Update subscription at the next renewal
        • Changing the subscription renewal type
        • Changing the subscription renewal quantity
        • Adding or updating a perpetual unit price
        • Changing the subscription's payment option
        • Changing the subscription's payment source
      • Immediately change the subscription
        • Updating the subscription's shipping address
        • Updating a subscription's billing and shipping email address
        • Cancelling a subscription
      • Immediately apply a midterm subscription change
        • Reducing the subscription renewal quantity
  • Admin APIs
    • Admin basics
      • Available Admin API calls
    • Order management
      • Getting the order's details
      • Downloading the invoice
    • Offer management
    • Refund management
      • Authorization
      • Refund reason codes
      • Creating a satisfaction refund
      • Getting the available refunds for a specific order
      • Getting refunds for a specific order
      • Getting refunds available for a shopper's order
      • Getting the JSON schema for an order refund
      • Managing a refund for a delayed payment method
      • Refund error scenarios
    • Subscription management
      • Retrieve the subscription
        • Getting all orders for a subscription
        • Getting a subscription's pending actions
        • Getting all subscriptions for a shopper
        • Getting a subscription by identifier
      • Update the subscription at the next renewal
        • Changing the subscription renewal type
        • Changing the subscription renewal product
        • Changing the subscription renewal price
        • Changing the subscription renewal quantity
        • Adding or updating a perpetual unit price
        • Changing the subscription's payment option
        • Changing the subscription's payment source
      • Immediately change the subscription
        • Activating a subscription
        • Changing the subscription's external reference identifier
        • Updating a subscription's billing and shipping email address
        • Cancelling a subscription
        • Updating the subscription's expiration date
      • Immediately apply a midterm subscription change
        • Applying a midterm change with price override
        • Reducing the subscription renewal quantity
      • Subscription notifications
        • Updating the subscriber's email address
        • Card Account Updater
        • Sending a payment information change notification
        • Sending an expired credit card notification
        • Sending an invalid payment account notification
        • Sending a payment failure notification
        • Sending a subscription renewal reminder notification
        • Setting up subscription renewal reminders
        • Setting up trial subscription renewal reminders
        • Setting up marketing reminders
      • Using the Expired Card Optimizer
    • Customer management
      • Retrieving customer details
      • Requesting PII removal for a customer
    • Site management
      • Configuring authorized shipping and billing countries
      • Getting a site's authorized billing countries
      • Getting a site's authorized shipping countries
    • Product management
      • Getting started
      • Manage products (asynchronous API)
        • Creating or updating a product
        • Adding or updating a product variation
        • Deploying a product
        • Applying live changes
        • Retiring a product
        • Deleting a product variation
        • Deleting a base or individual product's locale
      • Retrieve products (synchronous API)
        • Getting a product by locale
        • Getting a product variation
        • Getting a product variation by locale
      • Get the task status for a product (synchronous API)
        • Getting the latest information on a product task
        • Retrieving the tasks for a specific product
        • Retrieving the tasks for products
      • Bulk operation
        • Asynchronous bulk operations
          • Creating products in bulk
          • Updating products in bulk
          • Deploying products in bulk
          • Deleting product variations in bulk
        • Bulk product upload (BPU)
        • Bulk Product Export (BPE)
          • Line-item level satisfaction refund
          • Order-level satisfaction refund
          • Auto-created line-item level return product
          • Line-item level return product
    • File management
      • Downloading a file
  • Payments
    • Payments solutions
      • Drop-in payments
        • How Drop-in payments work
        • Drop-in payments integration guide
      • DigitalRiver.js with Elements
        • Elements integration guide
        • Configuring payment methods
          • Configuring Afterpay
          • Configuring Alipay+ (cross-border)
          • Configuring Alipay (domestic)
          • Configuring Amazon Pay
          • Configuring Apple Pay
          • Configuring Bancontact
          • Configuring BLIK
          • Configuring Boleto
          • Configuring CCAvenue
          • Configuring Clearpay
          • Configuring Credit Cards
          • Configuring FPX Online Banking
          • Configuring Google Pay
          • Configuring iDEAL
          • Configuring Klarna
          • Configuring Konbini
          • Configuring Online Banking (IBP)
          • Configuring Online Banking (Korea Bank Transfer)
          • Configuring PayCo
          • Configuring PayPal
          • Configuring SEPA Direct Debit
          • Configuring Trustly
          • Configuring Wire Transfer
          • Common payment sources
          • Common payment objects
    • Supported payment methods
      • Afterpay
      • Alipay (domestic)
      • Alipay+ (cross-border)
      • Amazon Pay
      • Apple Pay
      • Bancontact
      • BLIK
      • Boleto
      • CCAvenue
      • Clearpay
      • Credit Cards
      • FPX Online Banking
      • Google Pay
      • iDEAL
      • Klarna
      • Konbini
      • Korea Bank Transfer (Online Banking)
      • Online Banking (IBP)
      • PayCo
      • PayPal
      • PayPal Billing Agreement
      • PayPal Credit
      • PayPal Pay in 3
      • PayPal Pay in 4
      • PayPal RatenZahlung (Installment Payment)
      • SEPA Direct Debit
      • Trustly
      • Wire Transfer
    • Source basics
      • Managing sources
      • Handling credit card sources
      • Retrieving sources
    • Building payment workflows
      • Flows by payment type
      • Handling redirect payment methods
    • PSD2 and SCA
    • Payment testing scenarios
      • Testing standard payment methods
      • Testing redirect payment methods
      • Testing receiver payment methods
      • Testing the CCAvenue payment method
  • Events
    • Events overview
    • Responding to events
    • Event types
      • Delayed payment event types
        • Delayed payment expired event
          • Boleto
          • Konbini
          • Wire Transfer
        • Delayed payment reminder event
          • Boleto
          • Konbini
          • Wire Transfer
      • Subscription event types
        • Subscription created event
        • Subscription updated event
        • Subscription action processed event
        • Subscription cancelled event
        • Subscription credit card expired event
        • Subscription payment information changed event
        • Subscription renewal reminder event
        • Subscription renewed event
        • Subscription trial converted event
        • Subscription trial renewal reminder event
        • Subscription payment failed event
      • Post-order event types
        • Invoice created event
        • Refund credit memo event
      • Inventory event types
        • Inventory out of stock event
        • Inventory source and management
        • Inventory self-managed updated event
        • Inventory fulfiller-managed updated event
      • Post-order Notification Integration Guide
    • Webhooks
      • Commerce API safelist
      • Searching for a webhook
      • Creating a webhook
      • Using webhooks
      • Editing a webhook
      • Turning webhooks on or off
      • Revealing a webhook's secret
      • Rotating a webhook's secret
      • Viewing the webhook details
      • Deleting a webhook
  • Developer Resources
    • Postman collection
    • Commerce API references
    • Shopper APIs reference
    • Admin APIs reference
    • DigitalRiver.js reference
      • Including DigitalRiver.js
      • Initializing DigitalRiver.js
      • DigitalRiver object
      • Elements
        • Amazon Pay element
        • Apple Pay elements
        • Google Pay elements
        • IBAN element
        • iDEAL element
        • Konbini elements
        • Compliance element
        • Offline refund element
        • Online Banking elements
        • Tax Identifier element
        • Delayed payment instructions element
        • PayPal elements
      • Guidelines for capturing payment details
      • Security
      • Digital River payment objects
      • Error types, codes, and objects
  • General resources
    • Global Commerce
    • Global Commerce
      • Company hierarchy
      • Categories
        • Getting a list of categories
      • Products
        • Product scenarios
        • Individual products
          • Creating an individual product
        • Base product with variants
          • Creating a base product with variants
        • Bundle offers
          • Creating a prorated bundle offer with a subscription
        • Product combination
          • Creating a product combination
        • Gifting
        • Inventory status
      • Customer service
        • Log a shopper's request to remove PII
      • Customers
        • Creating a customer
        • Digital River-maintained customer login
        • Client-maintained customer login
      • Transparent Commerce purchase flow
    • eCompass
    • eCompass documentation
    • Release notes
      • 2024
      • 2024 latest
      • 2023
      • 2022
      • 2021
      • 2020
Powered by GitBook
On this page
  • Previous attributes
  • Handling a change to the renewal price
  • Handling a change to the subscription renewal date
  • Handling a change to the subscription renewal product
  • Handling a change to the subscription renewal type
  • Handling a change to the subscription renewal quantity
  • Handling midterm subscription activity
  • Handling a change to the subscription expiration date
  • Using subscription.action.processed and subscription.updated

Was this helpful?

  1. Events
  2. Event types
  3. Subscription event types

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"
   }
}
{
  "id": "bea17c0e-eaeb-471f-bd33-36090594261b",
  "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"
      }
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T02:35:50.486568Z"
}

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"
   }  
}
{
  "id": "bea17c0e-eaeb-471f-bd33-36090594261b",
  "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"
      }
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T02:35:50.486568Z"
}

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"
   }   
}
{
  "id": "33af99a8-0be2-437d-a350-7a66fe923990",
  "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
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T03:03:31.240841Z"
}

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"
   } 
}
{
  "id": "8b2d4e58-2f69-4e3e-bf54-12b2d23be651",
  "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
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T02:40:39.139929Z"
}

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"
   }   
}
{
  "id": "5fe634ff-f189-4719-8b94-dec0a36686a4",
  "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
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T02:40:43.696371Z"
}

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"
   } 
}
{
  "id": "29d7ba4e-378c-4298-9133-9d67e170b859",
  "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
    }
  },
  "liveMode": false,
  "createdTime": "2022-07-27T02:31:40.39632Z"
}

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.

PreviousSubscription created eventNextSubscription action processed event

Last updated 1 year ago

Was this helpful?