Cancelling a subscription

Learn how to cancel a subscription by the subscription identifiers.

Cancelling a subscription is an important feature of subscription management. It allows users or administrators to terminate recurring services or products. This document explains how to cancel a shopper's subscription within our system. It ensures a smooth transition and user experience when a subscription is no longer needed or desired.

When cancelling a subscription, setting suppressCancelNotification to true is crucial in certain scenarios, such as when:

  • You want to manage how and when you notify the customer about the cancellation, perhaps through a custom messaging or email system.

  • You're performing bulk cancellations and wish to avoid spamming your users with multiple notifications.

  • The cancellation is part of a larger account or service modification process where notifications are handled separately or at a later stage.

This option provides flexibility in managing the user experience around subscription cancellations.

To cancel a subscription immediately, send a POST /v1/subscriptions/{subscriptionId}/cancel request. Replace {subscriptionId} with the actual ID of the subscription you wish to cancel. You can include the following parameters in the request body:

  • suppressCancelNotification: Set the suppressCancelNotification parameter to true to suppress the cancellation notification email. By default, this value is false.

  • cancelReasonCode: This optional parameter allows you to specify a code that categorizes the reason for the subscription cancellation. This field can contain up to 64 characters. It helps organize and analyze why users are canceling their subscriptions. Example: "cancelReasonCode": "user_unsubscribe".

  • cancelComment: This optional parameter includes the shopper's comment to provide additional context regarding the subscription cancellation. This field can contain up to 255 characters. It can include any details that might be relevant for future reference or customer service teams. Example: "cancelComment": "I cancelled the subscription due to budget constraints."

curl --location --request POST 'https://{host}>/v1/subscriptions/{subscriptionId}/cancel' \
--header 'Content-Type:  application/json' \
--header 'authorization: bearer {YOUR_ACCESS_TOKEN}'\
--data-raw '{
 "suppressCancelNotification" : true,
 "cancelReasonCode" : "Cancel the corresponding subscription",
 "cancelComment" : "I cancelled the subscription due to budget constraints."
}'

After executing the request, you will receive a 202 Accepted response if successful. The cancellation will go into effect immediately.

Last updated