MODULES
...
eCommerce
Subscriptions

Cancelling Subscriptions

5min
the customer can schedule their subscription to end, while continuing to use services until the end date introduction ending a subscription is not as simple as deleting most database objects the customer may wish to arrange for their subscription to end, but they may wish to continue using the services they've paid for until the end of the billing period! front end cancellation when a user "cancels" a subscription front end, we send an api call to stripe, instructing them to mark the subscription to be cancelled at the end of the current billing period subscription orders marked for cancellation will have the field "cancel at period end" ("module field 14/subscription order 9") marked as "true" this corresponds to the equivalent property on stripe the following liquid can be added within a user subscriptions list layout {% include 'ecommerce/subscription cancel', orderid this id %} you may wish to use logic to only show the button when it can be used {% if this cancel at period end != 'true' %} {% include 'ecommerce/subscription cancel', orderid this id %} {% endif %} un scheduling the cancellation before it happens until that time, we'll allow users to change their mind and choose not to cancel the subscription after all this removes the property from the stripe subscription cancel at period end and the subscription will remain in its current state {% include 'ecommerce/subscription reactivate cancelled', orderid this id %} you may wish to use logic to only show the button when it can be used {% if this cancel at period end == 'true' %} {% include 'ecommerce/subscription reactivate cancelled', orderid this id %} {% endif %} both buttons could be combined in the logic as follows {% if this cancel at period end != 'true' %} {% include 'ecommerce/subscription cancel', orderid this id %} {% elsif this cancel at period end == 'true' %} {% include 'ecommerce/subscription reactivate cancelled', orderid this id %} {% endif %} cancelling immediately the option to cancel a subscription item immediately is available on the stripe dashboard stripe's webhook when the actual change of status to canceled takes place on stripe, either because of an action on the dashboard, or because siteglide queued it to happen at the end of the billing period, stripe will send a customer subscription deleted event to siteglide we'll then also remove the database object from your site, and stop provisioning the secure zone access