LogoLogo
System status
Admin APIs reference
Admin APIs reference
  • Admin APIs reference
  • Order management
    • Refunds
    • Retrieve an order (synchronous API)
    • Retrieve an invoice (synchronous API)
    • Manage orders (synchronous API)
  • Customer management
    • Retrieve a customer (synchronous API)
    • Manage a customer (synchronous API)
  • Subscription mangement
    • Manage a subscription
    • Renew a subscription
    • Apply an immediate midterm change
    • Manage subscription payments
    • Modify the subscription's external reference ID
    • Manage the subscription's address
    • Get all orders
    • Retrieve subscriptions with pending actions
    • Retrieve subscriptions
    • Manage a perpetual price
    • Update a subscription's email address
  • Site management
    • Get authorized countries
  • Product management
    • Manage products (asynchronous API)
    • Retrieve a product (synchronous API)
    • Retrieve the product task status (synchronous API)
  • Offer Management
    • Manage offers (synchronous API)
    • Retrieve an offer (synchronous API)
  • Webhook management
    • Manage webhook events
  • Payment source
    • Source management
  • File management
    • Retrieve a file
Powered by GitBook
On this page
  1. Subscription mangement

Manage a subscription

PreviousManage a customer (synchronous API)NextRenew a subscription

Last updated 1 year ago

  • POSTUpdate Subscription Expiration Date
  • POSTCancel Subscription
  • POSTActivate Subscription

Update Subscription Expiration Date

post

This will update subscription expiration date

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret)

Body
expirationDatestring · date-timeRequired

The subscription expiration date in "2020-10-11T01:23:48.000Z", "2020-10-11T01:23:48.000-0500", "2020-10-11T01:23:48.000+1100".

Responses
202
Accepted
400
* Bad request
application/json
401
Please verify your API key and secret (if applicable) is correct.
403
* Access Denied
application/json
404
* Not found
application/json
409
* Conflict
application/json
post
POST /v1/subscriptions/{subId}/expiration-date HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "expirationDate": "2025-05-14T16:30:28.162Z"
}

No content

Cancel Subscription

post

This will cancel the subscription by subscription Id and Subscription state changes to Cancelled

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret) or Full access token

Body
suppressCancelNotificationbooleanOptional

The clients can use this element to suppress cancel notification email.By default this is false.

cancelReasonCodestringOptional

Optional, you can specify the codes used to categorize the reason for the subscription cancellation. This field can contain up to 64 characters.

cancelCommentstringOptional

An optional comment provided by the shopper detailing additional information or context regarding the subscription cancellation. This field can contain up to 255 characters.

Responses
202
Accepted
400
* Bad request
application/json
401
Please verify your API key and secret (if applicable) is correct.
403
* Access Denied
application/json
404
* Not found
application/json
409
* Conflict
application/json
post
POST /v1/subscriptions/{subId}/cancel HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "suppressCancelNotification": true,
  "cancelReasonCode": "text",
  "cancelComment": "text"
}

No content

Activate Subscription

post

This will activate the subscription.The subscription state changes from PendingActivation to Subscribed

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret)

Body
activationKeystringRequired

The subscription activation key

activationDatestring · date-timeOptional

The subscription activation date in "2020-10-11T01:23:48.000Z", "2020-10-11T01:23:48.000-0500", "2020-10-11T01:23:48.000+1100".

expirationDatestring · date-timeOptional

The subscription expiration date in "2020-10-11T01:23:48.000Z", "2020-10-11T01:23:48.000-0500", "2020-10-11T01:23:48.000+1100".

Responses
202
Accepted
400
* Bad request
application/json
401
Please verify your API key and secret (if applicable) is correct.
403
* Access Denied
application/json
404
* Not found
application/json
409
* Conflict
application/json
post
POST /v1/subscriptions/{subId}/activate HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "activationKey": "text",
  "activationDate": "2025-05-14T16:30:28.162Z",
  "expirationDate": "2025-05-14T16:30:28.162Z"
}

No content