# Component: Block Final Term Cancel

### What is this component?

The **Block Final Term Cancel** component is used to prevent users from cancelling a subscription if they are within the final **N** days of the subscription term. This is useful for subscription policies that disallow cancellations too close to the renewal or end date.

It dynamically checks the subscription’s `termEndDate` and compares it to today’s date. If the user is within the configured minimum threshold (e.g., final 30 days), the component blocks the cancellation flow and optionally displays a message with a support contact button.

### How do I use it?

This component is designed for use in **Limio Self-Service flows**, such as Cancel or Cancel/Save. It overlays a modal if the cancellation is blocked or displays an inline box in the Limio Page Builder preview mode.

When a subscription is within the configured number of days from the end of term, the following are shown:

* An error icon and a heading message.
* Optional explanatory text.
* Rich text content describing the restriction.
* An optional button to redirect users (e.g., to Support).

The block is evaluated automatically using URL parameters (`subId` or `subRef`) or defaults to the first subscription if none are present.

### How do I configure it?

You can configure the component in the Page Builder using the following props:

| Prop            | Label                             | Type     | Description                                                      | Default                                                                           |
| --------------- | --------------------------------- | -------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `heading`       | Heading                           | string   | The main heading shown in the dialog.                            | Too late to cancel                                                                |
| `explanation`   | Explanation                       | string   | Optional explanatory text.                                       | Cancellations are not allowed during the final 30 days of your subscription term. |
| `body`          | Body                              | richtext | Rich HTML content shown in the dialog.                           | You're currently within the final 30 days...                                      |
| `minimumLength` | Final term block period (in days) | string   | Number of days before term end to start blocking cancellations.  | 30                                                                                |
| `showButton`    | Show button                       | boolean  | Whether to display a redirect button (e.g., to contact support). | true                                                                              |
| `buttonHeading` | Button label                      | string   | The text on the button.                                          | Contact support                                                                   |
| `buttonUrl`     | Button URL                        | string   | The URL the button should lead to.                               | /support                                                                          |
| `componentId`   | Component ID                      | string   | Internal identifier for the component.                           | block-final-term-cancel                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.limio.com/components/component-library/standard-components/component-block-final-term-cancel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
