MODULES
...
eCommerce
Subscriptions

Editing the "Subscription User Action Required" System Page and Email

9min
customise the email and landing page used to take updated payment methods and authorisation from subscription customers introduction when a stripe subscription changes status, a customer may need to update their payment details or carry out 3d secure authorisation the email and landing page used in this flow can be customised and branded the email you can find the system email under site manager > system emails with the name subscription user action required the purpose of this email is to inform the user that the subscription order needs action from them before it can continue to be processed adding a link to the landing page you must add a link to the landing page where your customer can take action you can use the liquid below {% include 'ecommerce/subscriptions/subscription system page link' button text "authorise payment details" button id "authorisepayment" %} parameters button text sets the text displayed on the button button id optional allows you to set the id of the button button class optional allows you to set the class of the button available fields subscription order fields {{data subscription order}} output all available fields as json (except the new subscription status see below) {{data subscription order\['user id']}} the id of the customer in siteglide {{data subscription order\['subscription id']}} the id of the subscription order in siteglide {{data subscription order\['status']}} the previous status of the subscription order before the update that triggered this email {{data new subscription status}} the new status of the subscription order this is the event which will have triggered the email {{data subscription order\['stripe subscription id']}} the id of the subscription in the stripe dashboard {{data subscription order\['cancel at period end']}} "true" or "false" if true, this subscription has been set by the user to be automatically cancelled at the end of the current billing period the user has a chance to change their minds until this date {{data subscription order\['stripe plan id']}} the stripe id for the plan this subscription order is using this may be an older plan than the current plan used by the subscription product {{data subscription order\['plan chargeable price']}} a snapshot of the price of this subscription order's plan this may be an older plan than the current plan used by the subscription product {{data subscription order\['plan display only price']}} a snapshot of the display only price of this subscription order's plan this may be an older plan than the current plan used by the subscription product {{data subscription order\['plan chargeable price formatted']}} a snapshot of the price of this subscription order's plan this may be an older plan than the current plan used by the subscription product formatted as a decimal (e g 1 00) {{data subscription order\['plan display only price formatted']}} a snapshot of the display only price of this subscription order's plan this may be an older plan than the current plan used by the subscription product formatted as a decimal (e g 1 00 {{data subscription order\['plan interval']}} a snapshot of the interval of this subscription order's plan this may be an older plan than the current plan used by the subscription product {{data subscription order\['plan interval count']}} a snapshot of the interval count of this subscription order's plan this may be an older plan than the current plan used by the subscription product subscription fields {{data subscription order subscription}} output all available fields as json {{data subscription order subscription name}} the name of the subscription product {{data subscription order subscription\['description']}} {{data subscription order subscription\['image']}} {{data subscription order subscription\['interval count']}} {{data subscription order subscription\['stripe product id (live)']}} the id of the product in stripe live mode {{data subscription order subscription\['stripe product id (test)']}} the id of the product in stripe test mode customer fields {{data subscription order related user}} output all available fields as json {{data subscription order related user id}} the id of the user in siteglide {{data subscription order related user name}} {{data subscription order related user first name}} {{data subscription order related user last name}} {{data subscription order related user email}} tip changes in the pricing plan it's possible to change the price and billing interval of a subscription this change will only affect new subscribers and existing customers will continue on the plan they signed up for originally you can read more about this here ecommerce subscriptions changing the price and billing interval when outputting fields in the email, subscription order fields beginning with the word "plan" will normally be the appropriate choice these will show the price that these users will be paying the original plan when they signed up the other price and interval fields stored against the subscription, could be used to show how much the user is saving on their current plan compared to the current price in the different context of the subscription detail page we give a different recommendation as here it may not always be possible to identify immediately if the user is subscribed to a different plan tip working with the interval fields as you can see below, there are multiple fields involved in storing the interval of charges, which you can use to display the interval in a user friendly way here's one example of using liquid to programmatically decide the format to display the interval {% if this\['interval count'] == "1" %} per {{this\['interval'] | pluralize 1}} {% else %} (every {{this\['interval count']}} {{this\['interval']}}) {% endif %} if the interval count is 1, it will use formatting like "per day" if the interval count is greater than 1, it will use formatting like "every 2 days" check out all the available liquid filters over on the platformos liquid docs the landing page you can find the system page under site manager > system emails with the name subscription user action required the purpose of this page is to provide a reliable url where the above email can send users to update their payment method we'll provide the url parameters to let the page know which subscription and subscription order to load we'll also provide security to check that the user owns that subscription order before continuing this page may function very similarly to the standard subscription detail page, however, you do have the option to use a different layout or logic if you prefer including the subscription detail layout the following liquid will include a subscription detail layout for the subscription referenced in the link from the above email note, this is different from the usual liquid for including a layout, because siteglide will in this case be setting some of the parameters for you automatically {% include "modules/siteglide ecommerce/ecommerce/subscription update payment" subscription detail page layout 'default' %} parameters subscription detail page layout this allows you to choose which detail layout will be used for the subscription detail view you can choose a different layout than you use on your subscription detail page if that detail layout contains a form, we'll use the url parameters to set the form to edit the payment details for the correct subscription order referenced in the link from the email you can add any other static content you like to this page, but we recommend you use the subscription detail layout itself to add any dynamic content and you can see available fields there