website logo
⌘K
Introduction
PORTAL
Agency Whitelabelling
PAGES
Pages - Accessing Page Data
Pagination Layouts
Page Templates
FORMS
Form Confirmation Pages
Adding a Progress Bar
Adding Custom CSS To Show Form Submit Process
Dynamic Content in Workflow and Autoresponder Emails
How to output Custom Field Set fields in a Form's Custom Layout
Custom JavaScript Validation for Forms
File Upload Previews
FAQ
CATEGORIES
Filtering WebApps and Modules by Categories
Outputting Categories on WebApp / Module / eCommerce Layouts
Outputting Category Fields in any Location
Category Detail Layouts
FAQ
COMPANY INFORMATION
Company Information
SITE SEARCH
Site Search
PUBLIC API/ZAPIER
Zapier - Formatting arrays correctly
Public API/Zapier Changelog
MODULES
Module Marketplace
Building Custom Modules
Siteglide Modules
Front-end Submit Modules
DATA STRUCTURES
Automations
Creating WebApps from the CLI
Field Types
WEBAPPS
Front-end Submit WebApps
Layouts
Search and Filtering
Understanding Custom Field Names and IDs
FAQ
CRM
User Details
User Secure Zones
Storing User's Favourite WebApp / Module Items
User's Form Submissions (Cases)
How Users Edit their Email and Password Front End
Editing a User's CRM record Front End with Custom Field Sets
CLI
Introducing Siteglide CLI
CLI Changelog
Secure Zones with CLI
Page Templates with Siteglide CLI
Pages with Siteglide CLI
Includes with Siteglide CLI
Managing Email Templates
Migrate - Manual Form setup
Migrate - Convert existing Forms
Liquid
Accessing Assets
Liquid Dot Notation
Using WebApp Collections- Tutorial
Using the current_user object with Secure Zones
Preventing Duplicate Content with Query Parameters- Canonical URL and Robots.txt
FAQ
GraphQL
Tutorial Overview
About GraphQL
Tutorial 1- Your First Query
Tutorial 2 - Pagination
Tutorial 3 - Filtering the Results
Tutorial 3 - Answers to the First Filtering Challenge
Tutorial 4 - Advanced Filtering
Tutorial 4 - Challenge Answers
Tutorial 5 - Using Liquid to run GraphQL queries on your Site
Tutorial 6 - Variables
Tutorial 6 - Answers to the Variables Challenge
Tutorial 7 - Sorting
Tutorial 8 - Building a Liquid API GET Endpoint Page powered by GraphQL queries
Best Practice and Performance
Module/WebApp Caching
Getting Started with Liquid Caching - to Reduce Server Response time and Improve Performance
Includes
ecommerce/checkout_standard
Frequently Asked Questions
Using Liquid Logic to Check if a field exists, or is empty on the Front End
How do I learn more about Liquid?
How to setup a multi domain start page
Docs powered by archbee 
7min

Cancelling Subscriptions

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.

HTML
|

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.

HTML
|

Both buttons could be combined in the logic as follows:

HTML
|

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.

Updated 10 Mar 2021
Did this page help you?
Yes
No
UP NEXT
Components
Docs powered by archbee 
TABLE OF CONTENTS
Introduction
Front-end cancellation
Un-scheduling the Cancellation before it happens
Cancelling Immediately
Stripe's Webhook