Subscription updated event

Understand the updated event.

When any of the following midterm change activities updates the subscription, Digital River creates a subscription.updated event.

Previous attributes

Each subscription.updated event includes the previousAttributes object. The previousAttributes object lists the resource's attributes that changed, along with the previous values of these attributes.‌ The following example shows the previousAttributes for a change renewal type:

previousAttributes example
Renewal Type Changed from Manual to Auto:
"previousAttributes": {
"autoRenewal": true
 }
 
Renewal Type Changed from Auto to Manual:
"previousAttributes": {
 "autoRenewal": false
}

Change renewal price

When there is an update to the subscription's renewal price. You will receive a notification every time the subscription price has been updated regardless of the price type.

Webhook request
{
    "id": "0712ca6b-b079-4dd6-b372-a117fe0a7aef",
    "type": "subscription.updated",
    "data": {
        "object": {
            "id": "4660199",
            "creationDate": "2022-05-12T11:51:56.351Z",
            "activationDate": "2022-05-12T05:00:00.000Z",
            "nextRenewalDate": "2023-05-12T05:00:00.000Z",
            "expirationDate": "2023-05-12T05:00:00.000Z",
            "graceDate": "2023-05-12T05:00:00.000Z",
            "currentQuantity": 1,
            "renewalQuantity": 1,
            "autoRenewal": true,
            "locale": "en_US",
            "state": "Subscribed",
            "duration": 365,
            "frequency": 365,
            "siteId": "sub2test",
            "shopper": {
                "id": "26007258190199",
                "externalReferenceId": "DQZYHRPJBOPE"
            },
            "renewalPrice": {
                "unitPrice": 29.99,
                "locked": true,
                "currency": "USD"
            },
            "term": {
                "termUnit": "YEARS",
                "termLength": 1
            },
            "product": {
                "id": "5336721400",
                "displayName": "Legacy_Annual_Auto_2_Has_Change",
                "sku": "Legacy_Annual_Auto_2"
            },
            "shipToAddress": {
                "id": "406030020199",
                "firstName": "Jane",
                "lastName": "Doe",
                "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": "555-253-1234",
                "emailAddress": "[email protected]",
                "countyName": "Minnetonka"
            },
            "paymentOption": {
                "nickName": "VisaECBJA8",
                "id": "4014370199",
                "isDefault": "true",
                "type": "CreditCardMethod",
                "creditCard": {
                    "expirationMonth": "5",
                    "expirationYear": "2024",
                    "displayableNumber": "************1111",
                    "type": "visa",
                    "displayName": "Visa"
                },
                "address": {
                    "id": "406031450199",
                    "firstName": "Jane",
                    "lastName": "Doe",
                    "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": "[email protected]",
                    "countyName": "Minnetonka"
                }
            },
            "addOns": []
        },
        "previousAttributes": {
            "renewalPrice": {
                "locked": false,
                "unitPrice": 9.25
            }
        }
    },
    "liveMode": false,
    "createdTime": "2022-05-12T11:52:22.257527Z"
}

Change renewal date

When there is an update to the subscription's renewal date. You will receive a notification any time the subscription's renewal date has changed.

Webhook request
{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "8010199",
      "creationDate": "2022-05-24T12:48:38.000Z",
      "activationDate": "2022-05-24T05:00:00.000Z",
      "nextRenewalDate": "2022-07-01T05:00:00.000Z",
      "expirationDate": "2022-07-01T05:00:00.000Z",
      "graceDate": "2022-07-08T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": true,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 38,
      "frequency": 31,
      "siteId": "sub2test",
      "shopper": {
        "id": "26195292440199"
      },
      "renewalPrice": {
        "unitPrice": 10.99,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "MONTHS",
        "termLength": 1
      },
      "product": {
        "id": "5363866300",
        "displayName": "Monthly auto renewal Subscription",
        "sku": "SUB_AUTORENEW"
      },
      "shipToAddress": {
        "id": "405935420199",
        "firstName": "Jane",
        "lastName": "Doe",
        "line1": "1030 Brent Rd",
        "city": "Pune",
        "postalCode": "411014",
        "countrySubdivision": "AK",
        "country": "IN",
        "countryName": "India",
        "phoneNumber": "55596541230",
        "emailAddress": "[email protected]"
      },
      "paymentOption": {
        "nickName": "Visa 1111",
        "id": "4018780199",
        "isDefault": "false",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "3",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "405935410199",
          "firstName": "Jane",
          "lastName": "Doe",
          "line1": "1030 Brent Rd",
          "city": "Pune",
          "postalCode": "411014",
          "countrySubdivision": "AK",
          "country": "IN",
          "countryName": "India",
          "phoneNumber": "07896541230",
          "emailAddress": "[email protected]"
        }
      },
      "addOns": []
    },
    "previousAttributes": {
      "duration": 31,
      "nextRenewalDate": "2022-06-24T05:00:00.000Z",
      "graceDate": "2022-07-01T05:00:00.000Z",
      "expirationDate": "2022-06-24T05:00:00.000Z"
    }
  },
  "clientIds": {
    "site_id": "sub2test"
  },
  "searchableData": {
    "subscriptionId": "8010199"
  }
}

Change renewal product

When there is a change to the subscribed product. For example:

  • Changing the product midterm. When there is an Immediate Midterm Change from the Preview Cart API due to either a change to the subscribed product or a change to the subscription quantity.

  • Adding an addon to a base subscription or removing an addon from a base subscription.

  • Product change at the end of the subscription cycle.

Webhook request
"previousAttributes": {
  "renewalProduct" : {
    "id" : "111",
    "displayName" : "Legacy_Annual_Auto_1_Has_Change",
    "sku" : "Legacy_Annual_Auto_1"
   }
} 

Change renewal type

When there is a change to the subscription renewal (manual or auto) type. Such as changing autoRenewal to true or false. You will receive a notification when the renewal type has changed.

Webhook request
{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "18023200289",
      "creationDate": "2022-06-07T06:39:43.000Z",
      "activationDate": "2022-06-07T05:00:00.000Z",
      "nextRenewalDate": "2023-06-07T05:00:00.000Z",
      "nextBillingDate": "2022-07-07T05:00:00.000Z",
      "expirationDate": "2023-06-07T05:00:00.000Z",
      "graceDate": "2022-07-07T05:00:00.000Z",
      "currentQuantity": 1,
      "renewalQuantity": 1,
      "autoRenewal": false,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 365,
      "frequency": 30,
      "currentBillingCycleNumber": 1,
      "totalNumberOfBillingCycle": 12,
      "siteId": "sub2test",
      "shopper": {
        "id": "507087780289",
        "externalReferenceId": "PONZUOEQZRQ5"
      },
      "renewalPrice": {
        "unitPrice": 18.1,
        "locked": true,
        "currency": "USD"
      },
      "term": {
        "termUnit": "MONTHS",
        "termLength": 1
      },
      "product": {
        "id": "5367865700",
        "displayName": "APM_12_months_auto",
        "sku": "SUBS_COMMITMENT"
      },
      "shipToAddress": {
        "id": "333129830289",
        "firstName": "Jane",
        "lastName": "Doe",
        "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": "555-253-1234",
        "emailAddress": "[email protected]",
        "countyName": "Minnetonka"
      },
      "paymentOption": {
        "nickName": "VisaBUSXG0",
        "id": "18557680289",
        "isDefault": "true",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "6",
          "expirationYear": "2024",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "333204940289",
          "firstName": "Jane",
          "lastName": "Doe",
          "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": "555-253-1234",
          "emailAddress": "[email protected]",
          "countyName": "Minnetonka"
        }
      },
      "addOns": []
    },
    "previousAttributes": {
      "autoRenewal": true
    }
  },
  "clientIds": {
    "site_id": "sub2test"
  },
  "searchableData": {
    "subscriptionId": "18023200289"
  }
}

Change renewal quantity

When there is a change to the subscription type. Such as changing the subscribed quantity. You will receive a notification when the quantity of purchased or subscribed products has increased or decreased.

Webhook request
{
  "type": "subscription.updated",
  "data": {
    "object": {
      "id": "13450199",
      "creationDate": "2022-06-01T06:10:30.000Z",
      "activationDate": "2022-06-01T05:00:00.000Z",
      "nextRenewalDate": "2022-07-01T05:00:00.000Z",
      "expirationDate": "2022-07-01T05:00:00.000Z",
      "graceDate": "2022-07-08T05:00:00.000Z",
      "currentQuantity": 3,
      "renewalQuantity": 6,
      "autoRenewal": false,
      "locale": "en_US",
      "state": "Subscribed",
      "duration": 30,
      "frequency": 30,
      "siteId": "sub2test",
      "shopper": {
        "id": "26195488930199"
      },
      "renewalPrice": {
        "unitPrice": 10.99,
        "locked": false,
        "currency": "USD"
      },
      "term": {
        "termUnit": "MONTHS",
        "termLength": 1
      },
      "product": {
        "id": "5396391700",
        "displayName": "Monthly manual renewal Subscription",
        "sku": "SUB_MANUAL_RENEW"
      },
      "shipToAddress": {
        "id": "406031020199",
        "firstName": "Jane",
        "lastName": "Doe",
        "line1": "minnesota",
        "city": "alabama",
        "postalCode": "99950",
        "countrySubdivision": "CT",
        "country": "US",
        "countryName": "United States",
        "phoneNumber": "5554567898",
        "emailAddress": "[email protected]"
      },
      "paymentOption": {
        "nickName": "Visa 1111",
        "id": "4022940199",
        "isDefault": "false",
        "type": "CreditCardMethod",
        "creditCard": {
          "expirationMonth": "12",
          "expirationYear": "2036",
          "displayableNumber": "************1111",
          "type": "visa",
          "displayName": "Visa"
        },
        "address": {
          "id": "406031010199",
          "firstName": "Jane",
          "lastName": "Doe",
          "line1": "minnesota",
          "city": "alabama",
          "postalCode": "99950",
          "countrySubdivision": "CT",
          "country": "US",
          "countryName": "United States",
          "phoneNumber": "5554567898",
          "emailAddress": "[email protected]"
        }
      },
      "addOns": []
    },
    "previousAttributes": {
      "renewalQuantity": 1
    }
  },
  "clientIds": {
    "site_id": "sub2test"
  },
  "searchableData": {
    "subscriptionId": "13450199"
  }
}

Last updated

Was this helpful?

#1249: DOC-395 CCAvenue

Change request updated