Renew a Subscription Immediately

Overview

This guide shows you how to implement the Renew Subscription API endpoint to renew a customer's subscription immediately.

Use case

  1. The customer reaches the 5 GB data limit on their Cloudify proxy service and access to the service is paused.
  2. To restore access, Cloudify calls the Renew Subscription API endpoint to renew the subscription immediately.
  3. Cleverbridge bills the customer the full price for the next billing interval.
  4. The new billing period starts immediately from the moment of renewal.

Implement Renew Subscription API endpoint

Before you start

🚧

Important

Get the customer's consent before making changes to a subscription.

To avoid chargebacks and customer inquiries, it is also essential that you coordinate all price increases with Client Experience.

In the European Economic Area (EEA), Strong Customer Authentication (SCA) is required for recurring electronic payments when the amount changes. This means that some of your customers will have to authenticate their payment, which in turn might impact the renewal success rate.

For more information, see Best Practices: Obtain Customer Consent.

Make sure that:

Parameters

ParameterTypeRequiredExampleNotes
SubscriptionIdstrYesS67661151The unique identifier of the subscription.
ResetBillingIntervalboolYestrueSet to true to immediately start the new billing interval. The remaining time from the current billing interval is not carried over.

JSON body

{
    "SubscriptionId": "S67661151",
    "ResetBillingInterval": true
}

Request

If ResetBillingInterval is set to true, the new billing interval begins immediately and the remaining time from the current billing interval is not added to the next billing period.

curl --location 'https://rest.cleverbridge.com/subscription/renewsubscription' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YOUR_BASE64_ENCODED_CREDENTIALS' \
--data '{
    "SubscriptionId": "S67661151",
    "ResetBillingInterval": true
}'
import http.client
import json

conn = http.client.HTTPSConnection("rest.cleverbridge.com")
payload = json.dumps({
  "SubscriptionId": "S67661151",
  "ResetBillingInterval": True
})
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS',
}
conn.request("POST", "/subscription/renewsubscription", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://rest.cleverbridge.com/subscription/renewsubscription',
  'headers': {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Basic YOUR_BASE64_ENCODED_CREDENTIALS'
  },
  body: JSON.stringify({
    "SubscriptionId": "S67661151",
    "ResetBillingInterval": true
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://rest.cleverbridge.com/subscription/renewsubscription")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Basic YOUR_BASE64_ENCODED_CREDENTIALS")
  .body("{\"SubscriptionId\":\"S67661151\",\"ResetBillingInterval\":true}")
  .asString();

Response

{
    "ContinueUrl": "https://www.cleverbridge.com/864/p/534794706-htRannXGq5k4vB391URC",
    "NextBillingDate": "2026-04-13T09:43:08.734828",
    "TransactionStatus": "Success",
    "ResultMessage": "OK"
}

Use ContinueUrl to redirect the customer to the Cleverbridge confirmation page after the renewal request is processed.
If the transaction is not successful, the page linked in the ContinueUrl field will inform the customer about the next steps, such as updating the payment details in case of a failed payment.

Diagram

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

  A(["&nbsp;&nbsp;<br/>The customer reached the data limit&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor
    --> B(["&nbsp;&nbsp;<br/><i>Renew Subscription</i> endpoint used to renew the subscription immediately&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor
    --> C(["&nbsp;&nbsp;<br/>Cleverbridge bills the customer the full price for the next billing interval, starting immediately&nbsp;&nbsp;<br/>&nbsp;"]):::mainColor