Merchants Answered
Operations answers for working Shopify merchants

Shopify Discount Codes Explained: Where the Math Quietly Breaks

A customer stands at the till with a gift card that shows a balance online and an error in the shop. Most gift card problems on Shopify are not fraud and not bugs. They are the handful of mechanics nobody explained to the staff: how balances are checked, what deactivation really does, and which expiry rule belongs to the state, not the platform.

A Shopify discount code does what its settings say, and the surprises come from interaction: a code meeting an automatic discount, a product specific code applied to a cart with excluded items, a buy X get Y where the cheapest item is not the one you meant to give away. Set the combination rules deliberately, then test the five carts your customers will actually build, before the sale starts.

The four discount shapes

Shopify Help Center documentation groups discounts into percentage, fixed amount, free shipping, and buy X get Y, each creatable as a code customers enter or an automatic discount applied at checkout when conditions are met. The shapes sound interchangeable and are not. A percentage code scales with cart size, which rewards your best customers and your margin differently than a fixed amount code that is worth the same on a small cart and a large one.

Buy X get Y is the shape with the sharpest edges. The get item, its quantity cap, and whether the discount takes the cheapest eligible item are settings, not defaults to trust. A promotion designed as buy two shirts get a third free can, with careless eligibility settings, give away the most expensive item in a mixed cart. The documentation describes the mechanics plainly; the failures happen when nobody reads their own promotion the way the checkout engine will.

Stacking is a policy, write it down

Shopify lets you control whether discounts can combine, and combinable discounts are where margin goes to be surprised. A 20 percent code that combines with an automatic 15 percent sale discount and free shipping over a threshold is not a 20 percent promotion. It is a deeper, unplanned one that will be discovered by a coupon site within a day and by your accountant at month end.

Decide the policy in one sentence before building anything: codes never combine with automatic discounts, or they combine up to a stated ceiling. Then set each discount's combination toggles to match the sentence. The merchants who get hurt are not the ones with the wrong policy. They are the ones with no policy, whose settings were chosen promotion by promotion by whoever built that week's sale.

Test the carts, not the code

A discount that works on a single item test cart proves almost nothing. Test the carts that break promotions: the mixed cart with an excluded product, the cart just under and just over the minimum spend, the buy X get Y cart where the free item is the priciest, the cart where the customer enters two codes, and the subscription or draft order case if your store uses them. Five carts, ten minutes, and every embarrassing screenshot a customer would otherwise send you is pre empted.

Keep a dated note of what each live promotion is supposed to do, in the same place the team looks during a sale. When a customer writes in claiming a code failed, the note turns a debugging session into a lookup, and during a busy sale weekend that difference is the whole game.

Keep reading: Shopify Gift Cards, Explained: Balances, Expiry Rules and the POS Detail Stores Miss, Shopify Markets, Explained: Selling Into a Second Country Without a Second Store, and Shopify Abandoned Checkout Explained: What Counts, What Recovers, What Does Not cover the nearby cases in this series.

Frequently asked questions

Can two Shopify discount codes be used together?

Only if their settings allow combining. Shopify lets each discount be set to combine with other codes or automatic discounts, or not. Unplanned stacking is a common cause of margin loss during sales.

What is the difference between a code and an automatic discount?

A code must be entered by the customer at checkout. An automatic discount applies by itself when its conditions are met. Both come in percentage, fixed amount, free shipping, and buy X get Y forms.

Why did my buy X get Y promotion discount the wrong item?

Eligibility and selection settings decide which item is discounted. If the get item pool is broad, checkout may discount the most expensive eligible item. Narrow the eligible products and set quantity caps.

How should I test a discount before a sale?

Build the carts that stress it: mixed eligible and excluded items, carts just under and over the minimum, two codes entered, and a buy X get Y cart where the free item is the priciest. Test the carts, not just the code.