# subscription-cancel

> Form that cancels the contract of its wrapper and reloads the page.

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/elements/subscription-cancel  
Updated: 2026-10-13

## Where it can go

- **Inside any of:** [`customer-subscription`](https://www.smootify.io/docs/reference/elements/customer-subscription), [`subscription-page`](https://www.smootify.io/docs/reference/elements/subscription-page).
- **Must contain** `form`.
- **Out of place,** Smootify removes it from the page: also removed when the contract status does not allow it.

## What it requires

- Shopify’s **customer accounts**, and `newCustomerAccountsPublicKey` in [`SmootifyUserOptions`](https://www.smootify.io/docs/reference/options).

## Fields in the form

It reads no field of yours: the contract comes from the wrapper’s `data-contract-id`.

## Attributes on the element

- It reads `data-contract-id` on [`customer-subscription`](https://www.smootify.io/docs/reference/elements/customer-subscription), [`subscription-page`](https://www.smootify.io/docs/reference/elements/subscription-page).

## Loading

Its code loads only on pages that have `subscription-cancel`.
