> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/tutorials/more/use-locksmith-and-seal-subscriptions-to-grant-access-based-on-subscriptions.md).

# Use Locksmith and Seal Subscriptions to grant access based on subscriptions

You can use Locksmith with Seal Subscriptions to control access based on a customer’s subscription status. Seal Subscriptions supports auto-tagging customers depending on whether their subscription is active or inactive. Here’s how it works:

#### How Seal Subscriptions tags customers

* Seal Subscriptions can automatically tag customers when they have an active subscription.
* When a subscription becomes inactive (expired or cancelled), Seal doesn’t remove the active tag. Instead, it applies an additional tag for inactive subscribers.

Reference: <https://www.sealsubscriptions.com/articles/frequently-asked-questions/can-i-tag-customers-with-active-and-inactive-subscriptions-6y>

#### Setting things up in Locksmith

1. Make sure Seal Subscriptions is configured to add both active and inactive tags to your customers.
2. Create a lock on the content you want to restrict (products, collections, pages, etc.). Guide:\
   [Creating locks](/basics/creating-locks.md)
3. Add a key condition: **Permit if the customer is tagged with...** and enter your active subscription tag. This is a regular (non-inverted) condition.
4. Now turn this into a combo key by adding the second condition *inside the same key*:
   * Click **Edit** on the key you just created.
   * Scroll to **+ Add key condition** and add **Permit if the customer is tagged with \<active subscriber tag>**
   * Enter your inactive subscription tag and (if needed) check [**invert**](/keys/more/inverting-conditions-in-locksmith.md) so the condition reads **Permit UNLESS the customer is tagged with \<inactive subscriber tag>**
   * Save the lock. You now have a single combo key that requires both conditions at once. See:\
     [Combining key conditions](/keys/more/combining-key-conditions.md)\
     [Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith.md)
5. Result: customers must have the **active** tag, and must **not** have the **inactive** tag, to get access. The keys should look like the following example once setup:<br>

<figure><img src="/files/YIgExhGFBsNPB27BRUpw" alt=""><figcaption></figcaption></figure>

#### Helpful resources

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys.md)
{% endcontent-ref %}

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith.md)
{% endcontent-ref %}

{% content-ref url="/pages/ZcLkHf2n32p0GJzwXZME" %}
[Combining key conditions](/keys/more/combining-key-conditions.md)
{% endcontent-ref %}

#### Summary

Because Seal Subscriptions doesn’t remove active tags, you’ll need to use both a regular (non-inverted) condition (active tag) and an inverted condition (inactive tag) in Locksmith. This setup ensures that only customers with a current subscription can access your locked content.


---

# 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 dynamically by asking a question.

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

```
GET https://www.locksmith.guide/tutorials/more/use-locksmith-and-seal-subscriptions-to-grant-access-based-on-subscriptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
