Cancel a Subscription

Allow customer to cancel a subscription using an "unsubscribe" button on a client-hosted website, a click-through link in the Cleverbridge purchase confirmation email or, if set up to receive them, in a renewal reminder email.

📘

Provide your customers with a "turn off automatic renewal" option instead of a cancelation option. It has the same effect from the customer's perspective: it stops future billings, but makes it easier for you to win the customer back. For more information, see Turn Off Automatic Renewal.

Preconditions and Considerations

  • Each subscription item must have the status Active.
  • If all items in a subscription are deactivated, the status of the entire subscription automatically changes to deactivated.

Description

  1. On April 29th, a customer, who had purchased a Windows Anti-virus subscription from your company, decides to cancel it. The customer logs into the My Subscriptions page of your company's website. The My Subscriptions page displays the customer's two subscription items, retrieving the data using the Get Subscriptions for Customer endpoint.
  2. The customer clicks the Unsubscribe button for the Windows Anti-virus subscription. The page uses the Deactivate Subscription Items endpoint to deactivate the items.

This use case requires two calls as described below:

Obtain the customer's current subscription details (first call)

To call the Get Subscriptions for Customer endpoint, pass one (and only one) of the following parameters: CustomerId or CustomerReferenceId or CustomerEmail.

If your company is able to securely identify a customer prior to an order, then you can pass your own unique customer identifier to Cleverbridge, and Cleverbridge will store it as CustomerReferenceId for your subsequent use in qualifying certain API endpoint calls (including this one).

The Subscriptionstatus parameter is optional. If it is blank, information on all subscriptions for the specified customer is returned. The Subscriptionstatus parameter takes the following string values (and returns a corresponding integer in a JSON response):

  • Active (or 1 for JSON)

  • Deactivated (or 3 for JSON)

  • Finished (or 4 for JSON)

  • Grace (or 5 for JSON)

  • Hold (or 6 for JSON)

  • New (or 7 for JSON)

For example:

ParameterSet to Value
CustomerIdThe unique identifier for the customer.
CustomerReferenceId(blank)
SubscriptionstatusNew, Active
CustomerEmail(blank)

Deactivate the customer's subscription (second call)

Call the Deactivate Subscription Items endpoint with the parameters set to the values listed below:

ParameterSet to Value
RunningNumbers1 (This subscription has only one item.)
SubscriptionIdThe unique identifier of the subscription.

Illustration