How to require customers to log in before checkout on Shopify
Short answer: Only allow signed-in customers to complete checkout — common for members-only stores and private sales. In Checkpost, choose “Require login to check out” from Templates, adjust the values, test it, then save and enable the rule.
The problem
Members-only stores, private sales and trade portals need to know who is buying. Guest checkout lets anyone with the link place an order.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Require login to check out.
- No changes needed.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when all of these conditions is true:
- Customer is not logged in
Shoppers see: “Please log in to your account to complete your order.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Members only",
"match": "all",
"conditions": [
{
"kind": "boolean",
"field": "customer_logged_in",
"value": false
}
],
"message": "Please log in to your account to complete your order.",
"target": "cart",
"runOn": "always"
}Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Check this in the cart as well as at checkout, so guests see the message before entering details.
- Add product conditions if only some products are members-only.
Can you do this without an app?
Shopify's customer account settings can require sign-in for all checkouts on some account configurations. A rule lets you require it only for specific products, collections or markets.
FAQ
Does it work with Shop Pay?
Yes. Validation runs for express checkouts too, so a guest can't bypass it with an accelerated button.
Can I require an approved account, not just any account?
Yes. Use the Customer tags condition (has none of approved) instead of the login condition.
Related rules
Products for tagged customers only
Allow certain products to be purchased only by customers with a tag such as "vip", "member" or "approved".
Limit first-time customer orders
Cap the order value of brand-new customers (zero previous orders) to reduce chargeback risk while still welcoming new buyers.
Products unavailable in a market
Block checkout when the buyer's market country is one where certain products can't be sold due to regulation or licensing.