Apply an immediate midterm change

Subscription Immediate Midterm Change API - Store cart for subscription owner

post

Preview Change API provides the preview response for the changes which includes the credit, sub total, total tax and total amount due to be paid if the preview changes results in due amount. This API return the cart details (if created) in the response of the preview API. If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration. If “proratedUnitPrice” attribute is not present then GC pricing and proration applies. If subscription is perpetual subscription and we don’t pass “proratedUnitPrice” attribute into the request payload then prorated transaction price calculates on the basis of perpetual price.

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret) - Client Admin key

principalstringOptional

principal header is required only for price overriding. By default principal type will be a site. Other principal type (company, user) need to pass explicitly in header.

Body
quantityinteger · int32Required

Product quantity

proratedUnitPricenumberOptional

If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration.

Responses
200
OK
application/json
post
POST /v1/subscriptions/{subId}/preview-cart HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 190

{
  "addOns": [
    {
      "product": {
        "id": "text",
        "externalReferenceId": "text"
      },
      "quantity": 1,
      "proratedUnitPrice": 1
    }
  ],
  "product": {
    "id": "text",
    "externalReferenceId": "text"
  },
  "quantity": 1,
  "proratedUnitPrice": 1
}
{
  "subscriptionId": "text",
  "subTotal": 1,
  "credit": 1,
  "totalAmountDue": 1,
  "totalTax": 1,
  "currency": "text",
  "prorationDate": "text",
  "isCartNeeded": true,
  "isPaymentOnFile": true,
  "previewCharges": [
    {
      "productId": "text",
      "quantity": 1,
      "unitPrice": 1,
      "proratedUnitPrice": 1
    }
  ],
  "previewSubscription": {
    "addOns": [
      {
        "product": {
          "id": "text",
          "externalReferenceId": "text"
        },
        "quantity": 1,
        "proratedUnitPrice": 1
      }
    ],
    "product": {
      "id": "text",
      "externalReferenceId": "text"
    },
    "quantity": 1,
    "proratedUnitPrice": 1
  },
  "reduceActionUrl": "text",
  "cart": {
    "token": "text",
    "url": "text"
  }
}

Reduce Subscription's Quantity Or Addons

post

This API to change the subscription quantity immediately so that client have increased subscription management capability via API

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret) - Client Admin key or Full access token

Body
quantityinteger · int32Required

Product quantity

Responses
202
Accepted
post
POST /v1/subscriptions/{subId}/reduce HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "addOns": [
    {
      "product": {
        "id": "text",
        "externalReferenceId": "text"
      },
      "quantity": 1
    }
  ],
  "product": {
    "id": "text",
    "externalReferenceId": "text"
  },
  "quantity": 1
}

No content

Subscription Immediate Midterm Change API - Doesn't store cart for subscription owner

post

Preview Change API provides the preview response for the changes which includes the credit, sub total, total tax and total amount due to be paid if the preview changes results in due amount. This API does not return the cart details (if created) in the response of the preview API. If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration. If “proratedUnitPrice” attribute is not present then GC pricing and proration applies. If subscription is perpetual subscription and we don’t pass “proratedUnitPrice” attribute into the request payload then prorated transaction price calculates on the basis of perpetual price.

Path parameters
subIdstringRequired

Subscription Id

Header parameters
tokenstringRequired

Basic authorization (dispatch Key and Secret) - Client Admin key

principalstringOptional

principal header is required only for price overriding. By default principal type will be a site. Other principal type (company, user) need to pass explicitly in header.

Body
quantityinteger · int32Required

Product quantity

proratedUnitPricenumberOptional

If “proratedUnitPrice” attribute is present then it overrides all other prices and skip normal proration.

Responses
200
OK
application/json
post
POST /v1/subscriptions/{subId}/preview HTTP/1.1
Host: api.digitalriver.com
token: text
Content-Type: application/json
Accept: */*
Content-Length: 190

{
  "addOns": [
    {
      "product": {
        "id": "text",
        "externalReferenceId": "text"
      },
      "quantity": 1,
      "proratedUnitPrice": 1
    }
  ],
  "product": {
    "id": "text",
    "externalReferenceId": "text"
  },
  "quantity": 1,
  "proratedUnitPrice": 1
}
{
  "subscriptionId": "text",
  "subTotal": 1,
  "credit": 1,
  "totalAmountDue": 1,
  "totalTax": 1,
  "currency": "text",
  "prorationDate": "text",
  "isCartNeeded": true,
  "isPaymentOnFile": true,
  "previewCharges": [
    {
      "productId": "text",
      "quantity": 1,
      "unitPrice": 1,
      "proratedUnitPrice": 1
    }
  ],
  "previewSubscription": {
    "addOns": [
      {
        "product": {
          "id": "text",
          "externalReferenceId": "text"
        },
        "quantity": 1,
        "proratedUnitPrice": 1
      }
    ],
    "product": {
      "id": "text",
      "externalReferenceId": "text"
    },
    "quantity": 1,
    "proratedUnitPrice": 1
  },
  "reduceActionUrl": "text"
}

Last updated