> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/components/component-library/standard-components/component-block-purchase-dialog.md).

# Component: Block Purchase Dialog

**Purpose:** Use this Enforcement Component to block multiple purchases of any products or the same product on the checkout.

{% embed url="<https://69c2cf3a42a094f3cd354b8d-hbwumtssfk.chromatic.com/?path=/story/shop-components-dialogs-block-purchase-dialog--default&full=1&shortcuts=false&singleStory=true&embed=true>" %}

Important consideration:

* **This component should only be used on the Limio Checkout.** If you are using it on other pages (e.g. offers Pages), please contact <support@limio.com>.
* This component will only work for Limio Products that have been set to **Block Multiple Purchases?** to True. If the customer purchased subscription has a product with Block Multiple Purchase? set to False, the component will not activate.
* If you want to prevent multiple purchases of one product but allow the purchase of other products, you must set **Allow Purchase Different Product?** to True.
* To display this Dialog, the checkout must be authenticated.
* The Dialog counts only the subscriptions that have the status **Active** in Limio. A cancelled or suspended subscription does not make it appear. The exception is **Always show the block?** with **Add subscription reference to URL, if present?** on, and no `subRef` parameter in the URL: then the Dialog counts subscriptions of all statuses. If Zuora cancels a subscription, the Limio status changes only after a [subscription sync](https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/sync-between-limio-subscriptions-and-zuora-subscriptions).

| heading                | Heading                                                                     | string      | You're already a subscriber                                                                      | Message visible to customers                                                                                                                                                                                                                                                                                                                                           |
| ---------------------- | --------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| body                   | Body                                                                        | richtext    | It looks like you're already a subscriber. Go to your account to edit your current subscription. | Message visible to customers                                                                                                                                                                                                                                                                                                                                           |
|                        | Minimum number of subscriptions for a dialog to appear                      | number      | 0                                                                                                | <p>This block will appear only if the customer has at least X subscription(s).<br><br>This can be helpful if you want to block all purchase for existing subscribers.<br><br>If set to 0, the modal will be displayed if the customer has 1 or more subscriptions. If set to 1, the modal will be displayed if the customer has 2 or more subscriptions and so on.</p> |
| addSubRef              | Add subscription reference to URL, if present?                              | boolean     | FALSE                                                                                            | <p>If enabled, if the customer has only one subscription, Limio will add the subscription reference as a query parameter to the URL<br><br>If the customer has multiple subscriptions, this setting is ignored and no query parameter is added.</p>                                                                                                                    |
| addPurchaseCountry     | Add purchase country URL, if present?                                       | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| showButton             | Show a button?                                                              | boolean     | FALSE                                                                                            | Show a button that allows you to redirect the customer, for example to the appropriate product or to their self-service portal                                                                                                                                                                                                                                         |
| alwaysBlock            | Always show the block?                                                      | boolean     | FALSE                                                                                            | Overrides the product requirement and block if someone has ANY active subscription                                                                                                                                                                                                                                                                                     |
| allowDifferentProducts | Allow to purchase different products?                                       | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| allowClose             | Always to close the dialog for subscriptions with 'Block Multiple' disabled | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| buttonLabel            | Button label                                                                | buttonLabel | Click here                                                                                       | Define button text                                                                                                                                                                                                                                                                                                                                                     |
| buttonUrl              | Button URL                                                                  | buttonUrl   | /mma                                                                                             | Define button URL                                                                                                                                                                                                                                                                                                                                                      |
| componentId            | Component Id                                                                | string      | block-purchase-dialog-limio                                                                      |                                                                                                                                                                                                                                                                                                                                                                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.limio.com/components/component-library/standard-components/component-block-purchase-dialog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
