How to limit gift card purchases on Shopify
Short answer: Cap how many gift cards can be bought in one order — gift cards are a common target for fraudsters using stolen cards. In Checkpost, choose “Limit gift card purchases” from Templates, adjust the values, test it, then save and enable the rule.
The problem
Gift cards are a favourite target for fraudsters using stolen cards, because they convert straight into resellable value. Capping quantity limits the damage of a single fraudulent order.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Limit gift card purchases.
- Set the maximum gift-card quantity.
- 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:
- Combined quantity of products (products gift cards) is greater than 3
Shoppers see: “You can buy up to 3 gift cards per order.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Gift cards: max 3",
"match": "all",
"conditions": [
{
"kind": "line_number",
"field": "matching_quantity",
"op": "gt",
"value": 3,
"filter": {
"giftCardsOnly": true
}
}
],
"message": "You can buy up to 3 gift cards per 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
- Combine with "Customer's previous orders is exactly 0" to only restrict first-time buyers.
- Use "Combined subtotal of products" with gift cards selected to cap the value instead of the count.
FAQ
Does this include digital and physical gift cards?
Yes. Every product Shopify marks as a gift card is counted.
Will legitimate corporate buyers be blocked?
Tag trusted business customers and add a "has none of" condition so they can buy in bulk.
Related rules
Maximum quantity per product
Cap the quantity of a product per order — perfect for limited drops, launches and high-demand items that resellers target.
Minimum order quantity (MOQ) per product
Require a minimum quantity for selected products, so low-margin or bulk items can't be ordered in single units.
Sell in case packs / multiples
Only allow quantities in multiples of a pack size — e.g. 6, 12 or 24 — for case-packed goods like wine, beverages or wholesale stock.
Maximum items per order
Cap the total number of units per order — useful when packaging, couriers or inventory can't handle oversized orders.