"Has purchased..." key
Granting access to content in your store only after the appropriate purchase has been made
Locksmith allows you to check for a purchase of a specific product and only grant access to your locked content if an applicable purchase has been made.
This key condition can only account for a customer's latest 50 orders (and in some cases only the latest 25). Learn more about this in the Limitations section.
Setup
Once you create a lock that covers the content that you want to require a purchase for, click the "+ Add key" button. In the condition selector that appears, select "if the customer has purchased...".

Locksmith will examine the customer's order history for products matching what you enter.
Important: Whether you choose to enter the SKU, title (shown above), variant ID, or product tag, they are all case sensitive!

Options
Maximum quantity purchased
Sets a maximum allowed purchase amount. When used, Locksmith will only grant access if the customer has not yet purchased this many units of the product
Only look at orders in the last...
Allows to you specify how far back, in days, you would like Locksmith to check for the purchase of the specified product. E.g. you may want to only allow access for 30 days after purchase.
Ignore cancelled orders
When ON - Cancelled orders will not fulfill the requirements for access. Default: ON.
Ignore unfulfilled or partially fulfilled orders
When ON - Unfulfilled orders will not fulfill the requirements for access. Default: OFF, most merchants will want to leave it this way.
Ignore orders that are not fully paid
When ON - Only orders with a payment status of "Paid" will fulfill the requirements for this lock. Default: ON.
Caution: This setting often causes issues for merchants who are testing out their locks. Consider turning this setting OFF while testing, but back ON for general use.
Inverting this key condition
Like all key conditions, this one can be inverted. This is useful to verify that a customer has NOT yet purchased a specific product:
Inverting conditions in LocksmithOn its own, the inverted "unless the customer has purchased..." key will grant access to anyone who has not purchased the product, including non-signed in customers. To require customers sign in, you'll want to combine the "unless the customer has purchased..." key with the "is signed in" key:
Combining key conditionsLimitations
This key condition can only account for the 50 most recent orders for the current customer. In some cases, it can only account for the most recent 25 orders instead.
The stricter 25-order limit comes into play when a customer navigates to a URL that includes a page number, e.g. a URL with "?page=2" in it. This is because a page number in the URL limits Locksmith's ability to ask Shopify for the maximum number of orders possible (i.e. 50), leaving Locksmith to work with the default number of orders (i.e. 25).
Related articles
Customer account keysSelling digital content on ShopifyLast updated
Was this helpful?