Skip to main content

Setting Up the Hosted Cancel Page

N
Written by Nawras Ganim
Updated today

The Hosted Cancel Page is a fully managed cancellation flow at flow.churn.io/your-org. Instead of embedding a widget on your site, you redirect customers to this URL when they want to cancel. This article explains how to configure and use it.

Your hosted cancel page URL

Your unique hosted cancel page URL is available in:

  1. Go to Flows and open your flow

  2. Click the Embed tab

  3. Select the Page tab

  4. Your full URL is shown at the top of the page

Creating a session token

To securely identify a customer when they land on your cancel page, you must generate a short-lived session token on your backend and append it to the URL. This prevents one customer from accessing another's cancellation flow.

The Embed tab provides server-side code samples in multiple languages showing exactly how to generate and sign the token. The token is a JWT signed with your Churn.io secret key.

⚠️ Always generate tokens server-side

Never generate session tokens in client-side JavaScript. Your secret key must stay on your server. Exposing it client-side would allow anyone to forge a cancel session for any customer.

Redirecting the customer

Once you have the signed URL, redirect the customer to it instead of processing the cancellation. The page handles the entire flow and redirects the customer back to your app when they are done, with a result parameter indicating whether they saved or cancelled.

βœ… Custom domain available

On Pro, you can serve your cancel page from your own domain instead of flow.churn.io. Read Setting Up a Custom Domain for Your Cancel Page to get started.

When to use the hosted cancel page

The hosted cancel page is the best choice when:

  • You want customers to cancel from a billing portal or email link where you cannot embed JavaScript

  • You prefer a full-page experience over a modal overlay

  • Your team does not have easy access to the frontend codebase to install a script tag


πŸ’¬ Questions or concerns?

Get help from our support specialists at Churn.io. Click the chat icon at the bottom of your screen to reach us directly.

Did this answer your question?