Cancel a Subscription

PATCH /subscriptionsplans/v1/subscriptions/subscription_id

You can cancel a subscription at any time. However, if you cancel a subscription on the day of the nextPayment date, that payment will be processed, and the subscription will be canceled for all subsequent payments. You can see the next payment date for a subscription by processing a GET request on that subscription.

To cancel a subscription, you must initiate a PATCH request to the subscriptions/subscription_id endpoint.

Before trying the example, you should:

  • Replace the subscription ID (82522762-fb59-42b8-886d-0a74ab8d239b) with the id you received in the response to your subscription creation request.
  • Replace the API key (after the -u) with the Test API key you have received.

This table describes the elements used in subscription cancellation request.

Element Type Required Description
status enum Yes

This is the status of the subscription. It must be set to:

  • CANCELLED – The subscription will be cancelled, so no billings can be generated.
reasonForCancellation string

This is the reason for cancelling the subscription.

For a description of the elements in the request and response for this example, see Create a Subscription.

For a complete list and description of the elements and values associated with a subscription, consult the subscription creation API request.

Did you find this page useful?