> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Subscribers to Cancel a Subscription

You can enable your subscribers to cancel an existing Subscription using your self-care portal as of the end of their current billing period. To support this functionality, you must use the Subscribe APIs.

* **Use Case Number:** 2-4-09
* **Completed By:** Software Developer
* **Estimated Completion Time:** \<1 day

## Basic Scenario

A subscriber logs in to your self-care portal, selects the Subscription they wish to cancel and submits the cancelation request. The Subscription to be canceled must be in active or suspended state.

As a best practice, Subscribe make this cancelation effective at the end of the service period. Subscribe does not refund any partial amounts of the last billed transaction and leaves the entitlements on until the end of the service period. So the subscription goes into Pending Cancel status through the last full service period the subscriber paid for. When that service period is over, the subscription is Canceled.

To learn more about Subscription statuses, see [Subscription Lifecycle](https://docs.vindicia.com/bundle/Subscribe_Portal2_User_Guide/page/topics/subscriptionLifecycle.html) in the *Subscribe Merchant Portal User Guide*.

## Design Approach

As shown in the following diagram, you must call the subscription endpoint with the cancel action utilizing default parameters to handle the best practice.

For more information, see [Cancel a subscription](https://docs.vindicia.com/bundle/Subscribe_Portal2_User_Guide/page/topics/subscriptionDelete.html).

<img src="https://mintcdn.com/amdocs-slm/ifa3y22T11JlqvtT/portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2409_cancelSubscriptionEndOfCurrentBillPeriod.png?fit=max&auto=format&n=ifa3y22T11JlqvtT&q=85&s=5ed7bc869e3a2c972a2775f2e27583b1" alt="" width="685" height="268" data-path="portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2409_cancelSubscriptionEndOfCurrentBillPeriod.png" />

* **[Cancel a Subscription Using Subscribe APIs](../topics/2409_r_cancelSubscriptionEndPeriod#)**

**Parent topic:**[Subscription Cancellations](../topics/r_subscriptionCancellations)

## Cancel a Subscription Using Subscribe APIs

To enable your subscribers to cancel Subscriptions:

1. Call the subscriptions endpoint using `POST https://api.vindicia.com/subscriptions/:subscription/actions/cancel` command.

   The subscription by default is disentiled at the end of the current billing period. For more details and instructions, see [Cancel a Subscription](https://docs.vindicia.com/bundle/Subscribe_Portal2_User_Guide/page/topics/subscriptionDelete.html) in the *Subscribe Rest API Guide*.

   **Sample Code:**

   [https://github.com/Vindicia/CashBoxRESTCodeSamples/blob/master/Autobill/subscriptionCancel.txt](https://github.com/Vindicia/CashBoxRESTCodeSamples/blob/master/Autobill/subscriptionCancel.txt)

* The Subscription is in the Pending Cancel state.
* Entitlements are valid until the end of current billing period.
* At the end of the current billing period, the Subscription transitions to the Canceled state.

**Parent topic:**[Enable Subscribers to Cancel a Subscription](../topics/2409_r_cancelSubscriptionEndPeriod#)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.