Updating the subscription's expiration date

Learn how to change the subscription's expiration date.

Updating a subscription's expiration date ensures that the shopper's subscriptions remain active and do not inadvertently lapse due to an outdated expiration setting. In our subscription management system, you have the flexibility to extend the active period of a subscription by modifying its expiration date through a simple API request. Whether you need to adjust for changes in service duration, extend a trial period, or cater to a customer's request, setting a new expiration date is straightforward.

To update a subscription's expiration date, send a POST /v1/subscriptions/{subscriptionId}/expiration-date request. Replace {subscriptionId} with the actual subscription ID. Ensure you replace with {YOUR_API_KEY} with your authorization token. In the request body, specify the expirationDate. The date format should be YYYY-MM-DDT00:00:00.000-0000, representing the desired expiration date and time in UTC. For example, if you wanted to set the expiration date to October 19, 2020, your request body would look like this:

{
  "expirationDate":"2020-10-19T00:00:00.000-0000"
}

Here's how you can do it using curl:

curl --location --request POST 'https://api.digitalriver.com/v1/subscriptions/{subscriptionId}/expiration-date' \
--header 'Authorization: Basic {YOUR_API_KEY}' \
...
--data-raw '{
  "expirationDate":"2020-10-19T01:23:48.000-0500"
}'

You should receive a 202 Accepted response indicating that the request has been accepted and the expiration date will be updated accordingly. The new plan will go into effect immediately.

Last updated