Turn Off Automatic Renewal 2.0

Turn off auto-renew to switch the renewal type to Manual

Overview

This guide shows you how to use the Update Subscription Renewal Type API endpoint to turn off automatic renewal when using Subscription Management 2.0.

Use case

Turn off automatic renewal for a subscription in Subscription Management 2.0 .

  1. A customer is subscribed to a plan that includes a monthly 20 GB data allowance. After reaching the data limit, the customer decides they no longer need the subscription and asks to cancel it.
  2. To ensure the customer is not charged again at the end of the current billing interval, your system must turn off automatic renewal for the subscription. This is done using the Update Subscription Renewal Type API endpoint,

Result

The subscription renewal type changes from Automatic to Manual. The subscription remains active until the end of the current billing interval and is not renewed automatically afterward.

Implement the Update Subscription Renewal Type endpoint

📘

Note

In Subscription Management 2.0, renewal type is set at the subscription level. Turning off automatic renewal applies to the entire subscription rather than individual items.

Before you start

🚧

Important

Get the customer's consent before making changes to a subscription.
For more information, see Best Practices: Obtain Customer Consent.


Before you start

Make sure that:

  • The subscription has the status Active.
  • The subscription currently uses the Automatic renewal type.

📘

Note

In Subscription Management 2.0, renewal type is managed at the subscription level.

Customers who agree to recurring billing receive subscriptions with the Automatic renewal type. Customers who do not agree to recurring billing receive subscriptions with the Manual renewal type.


🚧

Important

For more information about managing subscriptions, see Subscription Management 1.0 and 2.0.

Parameters

ParameterTypeRequiredExampleNotes
RenewalTypestrYesManualSet to Manual to turn off automatic renewal.
SubscriptionIdstrYesS67670740The unique identifier of the subscription.

Request

curl --location 'https://rest.cleverbridge.com/subscription/updatesubscriptionrenewaltype' 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Authorization: Basic ' 
--data '{
  "RenewalType": "Manual",
  "SubscriptionId": "S67670740"
}'
import http.client
import json

conn = http.client.HTTPSConnection("rest.cleverbridge.com")
payload = json.dumps({
  "RenewalType": "Manual",
  "SubscriptionId": "S67670740"
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS'
}
conn.request("POST", "/subscription/updatesubscriptionrenewaltype", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'rest.cleverbridge.com',
  'path': '/subscription/updatesubscriptionrenewaltype',
  'headers': {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "RenewalType": "Manual",
  "SubscriptionId": "S67670740"
});

req.write(postData);

req.end();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://rest.cleverbridge.com/subscription/updatesubscriptionrenewaltype")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Basic YOUR_BASE64_ENCODED_CREDENTIALS")
  .body("{\n  \"RenewalType\": \"Manual\",\n  \"SubscriptionId\": \"S67670740\"\n}")
  .asString();

Response

{
    "ResultMessage": "OK"
}

Diagram

flowchart LR
  classDef mainColor fill:#ffffff,color:#555555,stroke:#96C34B,stroke-width:2px;

  A(["&nbsp;&nbsp;<br/><b>Data limit reached</b><br/>The customer uses up the 20 GB data limit&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor
    --> B(["&nbsp;&nbsp;<br/><b>Cancellation</b><br/>The customer decides to cancel their subscription&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor
    --> C(["&nbsp;&nbsp;<br/><b>Deactivation</b><br/><i>Update Subscription Renewal Type</i> API endpoint used to turn off automatic renewal&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor
📘

Turn On Automatic Renewal

If you need to turn on the automatic renewal of a subscription , see Turn On automatic Renewal.