Commerce Subscription Cancellation

Cancel an active Commerce subscription. This API is available only to registered shoppers.

This API cancels a Commerce subscription for a registered shopper using the account ID specified in the effectiveAccountId parameter. If no account ID is provided as a query parameter, the API defaults to the user’s context to cancel the specified subscription.

When using this resource, keep the following considerations in mind:

  • A subscription cancellation takes effect only on the subscription’s next billing date.
  • A subscription that has been amended or renewed cannot be canceled before the amendment or renewal start date. To cancel such a subscription, you must first revert the amendment or renewal using the Initiate Rollback on Last Action. Once the rollback is complete, you can cancel the subscription using the Commerce Webstore Subscription Cancellation API. For example, if you amend your current subscription by increasing its quantity from 5 to 10 and later decide to cancel the subscription, you can't cancel it directly. Instead, first initiate a rollback to revert the amendment, and then proceed with the cancellation using the API.

To access this API, users must have the following licenses and permissions:

  • B2B Commerce
  • Revenue Lifecycle Management
Resource
1/commerce/webstores/webstoreId/subscriptions/actions/initiate-cancellation
Resource examples
1https://yourInstance.salesforce.com/services/data/67.0/commerce/webstores/0ZExx000000005rGAA/subscriptions/actions/initiate-cancellation
Available version
63.0
HTTP methods
POST
Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
effectiveAccountId String ID of the account for which the request is made. If not specified, it defaults to the account ID for the context user. Optional

This field is required if the buyer wants to cancel a subscription associated with a managed account other than their default account.

63.0
Request body for POST
Root XML tag
CommerceSubscriptionCancelInput
JSON example
1{
2  "subscriptionIds": [
3    "02ixx0000004Hb4AAE"
4  ]
5}
Properties
Name Type Description Required or Optional Available Version
subscriptions String[] List of digital product subscription IDs to cancel.

Currently supports canceling only one digital product subscription per request.

Required 63.0
Response body for POST
Commerce Subscription Cancel Output