Limiting Discount Codes to First Time Purchasers Only

Is there a way to create a limit on discount codes used for a single customer over their lifetime? We have customers using the Honey App (the bane of our existence), and code hopping. I’d like to create a limitation that a customer can only use one discount code, once. Basically, only new customers can use coupon codes unless otherwise specified.

Hello ACR1225,

once you are in your discount code, you have the option here to set that the code can only be used once per customer.

Best regards
Sebastian

Hi ACR1225,

Your best bet is probably a three-step approach:

  1. Come up with a special tag to add to the account of customers who have used discounts. Maybe “has-used-a-discount”
  2. When an order is placed, if a discount has been applied, check if the customer has the tag.
  3. If they don’t have the tag, add it to their account. Otherwise, cancel the order.

You can use either Shopify Flow (a free app provided by Shopify) or a custom app with webhooks to set this up.

I considered other approaches, but they won’t work:

  • Shopify Cart/Checkout Validation Functions API: These would theoretically be the best way to block orders before they’re even placed, but the Shopify Functions API does not provide information about which discounts have been applied to the cart.
  • Checkout UI extensions: You could maybe combine this with the Validation Functions API to set a cart attribute and block orders with that cart attribute, but… This API is only for Shopify Plus. (Not sure if you’re on Plus, so I’m assuming you’re not).
  • Shopify Discount Functions API: You could create discounts that don’t apply to customers with a specific tag (for example, our app does this), but you’d still need a way to automatically add the tag to customer accounts.

Another possible idea is to create a customer segment that only contains customers without the “has-used-a-discount” tag. Then, use a script/custom app/etc. to modify all your discount codes to only be usable by that segment.

Hope this helps,

Tobe

Limiting one discount to one user per customer is straightforward for manual discount coupons. Here’s how you can find it in Shopify’s discount settings.

If what you mean is that they can only use one of a series of discount codes at any point - then that’s a bit more complex - but still doable easily through a combination of Shopify Flows + Dollarlabs Ultimate Discounts

  1. Setup the discount codes in the Ultimate Discounts app (instead of Shopify discounts) - here you can set the discount to only apply to the cart if the customer does not have X tag on them.
  2. In Flows - we setup a rule that adds a tag “used discount” if a customer places an order using any of your specified coupon codes.

Hope this helps - and if it does, do mark it as a solution so others who stumble into this thread / post can also find value.

Thank you

@ACR1225 , Since quite some time has passed since you raised this thread, I’m assuming you’ve already reached at a solution :slightly_smiling_face:

If so - can you please share the same and close this thread out so that others who stumble here might also find value.

Best,