Merchants Answered
Operations answers for working Shopify merchants

Shopify discount codes explained: the stacking rules that eat your margin

The promo that doubled sales and lost money

A merchant runs a 20 percent off code for a weekend, and sales double. The weekend feels like a win, until the books close and the gross profit is lower than a normal weekend. The margin was 35 percent, and at that margin a 20 percent promo needs 133 percent more orders to hold gross profit. The merchant got 100 percent more orders, which is a lot, and still lost money. That is the discount code math, and it is the part most merchants never do before they launch the promo.

The math gets worse at higher discounts. At 35 percent margin, a 30 percent promo needs 600 percent more orders to hold gross profit, which is a number almost no store can hit. A discount code is a margin decision before it is a marketing decision, and the merchant who does the math first is the one who does not lose money on a successful promo.

Three classes, one fixed order

Shopify has three discount classes: product discounts, order discounts, and shipping discounts. They apply in a fixed order: product first, then order, then shipping. That order matters, because a product discount reduces the price the order discount is calculated on, and an order discount reduces the price the shipping discount is calculated on. A merchant who stacks all three is giving a discount on a discount on a discount, and the total is more than the sum of the percentages.

The other rule is that one product discount applies per line item. A product cannot get two product discounts at once, unless the store is on Shopify Plus, which has allowed same-item stacking since July 15, 2026. On any other plan, the second product discount on the same item is ignored, which is the rule that surprises merchants who set up two product codes for the same collection.

Combinations, and the opt-in nobody reads

Combinations must be opted into on both sides, which is the rule that causes the most confusion. A discount code has a combinations setting, and the other discount has to have the matching setting too, or the combination does not apply. A merchant who enables combinations on the code and not on the automatic discount will watch the checkout apply one and ignore the other, and the reason is buried in a setting panel, not in the error message.

The limits are hard: at most 5 product or order codes plus 1 shipping code per checkout. Usage limits exist only on codes, not on automatic discounts, which means an automatic discount runs until someone turns it off, while a code can be capped at a number of uses. A code cannot give multiple savings types natively, so one code cannot give a percentage off and free shipping at the same time. That needs an app, or two codes, and the two codes count against the limit.

Codes versus automatic discounts, and when to use each

Automatic discounts suit public offers: bundles, BOGO, and sitewide sales, where the discount should apply without a code. Codes suit private audiences: a welcome offer, a win-back, an influencer code, or a wholesale price, where the discount should only apply to the people who have the code. A merchant who uses a code for a public sale is making the customer type something that could have been automatic, and a merchant who uses an automatic discount for a private offer is giving the discount to everyone.

Discounts can also be assigned to specific markets since May 2026, which means a merchant can run a promo in one country and not another. That is the feature that makes discount codes work with Shopify Markets, and it is the one that most merchants have not found yet. The margin math still applies in every market, and the 133 percent number does not change because the customer is in Brazil.

Related reading

If this topic is useful, these earlier guides go deeper on connected questions: Shopify metafields explained, Shopify customer segments explained, and Shopify Flow explained: the automations that run your store while you sleep.

Frequently asked questions

How many discount codes can a customer use at checkout on Shopify?

At most 5 product or order codes plus 1 shipping code per checkout. One product discount applies per line item, unless the store is on Shopify Plus, which has allowed same-item stacking since July 15, 2026. Combinations must be opted into on both sides, or the second discount is ignored.

In what order do Shopify discounts apply?

Product discounts first, then order discounts, then shipping discounts, in that fixed order. A product discount reduces the price the order discount is calculated on, so stacking all three gives a discount on a discount on a discount. That is why the total is more than the sum of the percentages.

How much extra volume does a discount need to break even?

At 35 percent margin, a 20 percent promo needs 133 percent more orders to hold gross profit, and a 30 percent promo needs 600 percent more orders. Do that math before launching the promo, because a sale that doubles orders can still lose money if the discount is too deep for the margin.

Should I use a discount code or an automatic discount?

Use an automatic discount for public offers like bundles, BOGO, and sitewide sales, where the discount should apply without a code. Use a code for private audiences like a welcome offer, a win-back, or an influencer code, where only the people with the code should get it. A code cannot give multiple savings types natively, so a percentage off plus free shipping needs an app or two codes.