# Duplicate Subscription Check Plugin

The **Duplicate Subscription Check** plugin helps prevent users from purchasing a subscription if they already have an active subscription for the same product. This ensures that customers do not accidentally purchase duplicate subscriptions.

## How It Works

* The plugin integrates into the **order processing flow** and depends on the **Salesforce V3 plugin** running first.
* This allows it to work across **authenticated, unauthenticated, and** [**anonymously authenticated**](https://docs.limio.com/product/authentication/authentication-provider-per-page/configuring-anonymous-authentication-for-your-checkout-flow) checkout flows.

## Checking for Existing Subscriptions

* In **unauthenticated or** [**anonymously authenticated**](https://docs.limio.com/product/authentication/authentication-provider-per-page/configuring-anonymous-authentication-for-your-checkout-flow) checkouts, the Salesforce V3 plugin first determines if the user already has an account.
* If a matching account is found, based on the set duplication rules, it passes the **crmID** forward.
* The Salesforce V3 plugin then checks if the account associated with this `crmID` has an existing subscription in Limio.
* For Express Apple Pay, the next expected step would be for the [**Transfer Ownership**](https://docs.limio.com/integrations/populating-salesforce-data/limio-updates-salesforce) to then run.

## Blocking Duplicate Subscriptions

* If an **active, matching subscription** is found the Duplicate Subscription Check plugin will **throw an error**.
* The user will not be able to complete the order and will see an error message in the checkout or express checkout offer page.

This functionality is supported for **Express Apple Pay** and the **standard checkout flow**.

To enable this plugin email <support@limio.com>.
