How to set up Shopify discount codes in 2026

When a Shopify offer uses a code, set its eligibility and limits. Check combinations, basket changes and customer answers before the campaign starts.

Create a Shopify discount code in Discounts > Create discount, choose the offer type and set its eligibility before saving. Use an automatic discount when eligible customers must receive the offer without entering a code. Then check the basket and checkout against the saved rules.

This guide helps merchants create their own store promotions. A code you create discounts your merchandise or shipping. It is separate from a coupon for the merchant’s Shopify subscription.

Choose the discount type and method

Choose the discount type by what the customer receives. Shopify’s discount types include amount off products, amount off orders, Buy X get Y and free shipping.

A product discount targets selected merchandise. An order discount reduces the order’s qualifying subtotal. Either amount-off route can use a fixed amount or a percentage. Shipping needs its own discount type.

A discount code asks customers to enter the code at checkout. Choose it when an offer needs a named code in your campaign. An automatic discount applies when the customer and basket meet its conditions.

Automatic discounts still require every qualifying item in the basket, including a promotional reward. They do not add a missing reward item. For Buy X get Y, decide both what customers must buy and what receives the saving before creating the promotion.

Set eligibility and usage limits

Create the discount with an account authorised to manage promotions. Start with a written offer so the saved settings and customer message describe the same deal.

For example, this fictional offer uses code LINEN15: 15% off selected linen shirts when the basket contains at least two eligible shirts. It is limited to the Australian market, with one redemption per customer and 100 redemptions overall.

Follow Shopify’s amount-off creation procedure for this code.

  1. Open Discounts, select Create discount, then choose Amount off products.
  2. Select Discount code and enter LINEN15.
  3. Set the value to Percentage, then enter 15.
  4. Select the eligible products or collections. Review included variants.
  5. Set Minimum quantity of items to 2. Only eligible items count.
  6. Set customer and market eligibility for the campaign.
  7. Set the total-use and per-customer limits. Configure permitted discount combinations.
  8. Set the active period and save the discount.

In Eligibility, Shopify supports all customers, specific customers, customer segments and markets. Its eligibility settings distinguish region markets from other market types. Select the intended market instead of assuming your store’s home currency restricts who qualifies.

A total-use limit caps redemptions across the store. A per-customer limit controls repeat use by the same customer. Set both when the offer needs both restrictions. Record the start and end settings in the store’s configured time zone. An offer without an end setting continues until another limit or deactivation stops it.

For free shipping, use the shipping-discount procedure. Set countries and any excluded shipping-rate threshold separately from customer eligibility. A rate cap limits the shipping charge covered, while a minimum purchase requirement controls the basket needed to qualify.

For Buy X get Y, set Customer buys and Customer gets, including quantities and the discounted value. Shopify’s Buy X get Y procedure also supports a maximum number of uses per order. Customers must add the discounted item themselves. Keep that instruction in the offer message.

Check combinations and basket changes

Check each discount’s combination settings before promising that two offers work together. Shopify requires permission on both discounts. Product and order combinations depend on store eligibility, and combining product discounts on the same item requires Shopify Plus.

Shopify’s combination rules apply product discounts before order discounts and shipping discounts last. When incompatible offers compete, Shopify selects the best available discount or combination. Multiple shipping discounts cannot stack.

Use fictional baskets to define the expected result before testing your configured campaign. In these examples, each eligible linen shirt has an original price of $80. A non-eligible cotton shirt costs $60. Merchandise totals below exclude shipping and tax.

Fictional basketOriginal merchandise totalExpected discountMerchandise after discount
Two eligible linen shirts$160LINEN15: $24$136
One linen shirt and one cotton shirt$140None: only one eligible item$140
Two eligible shirts with an incompatible $20 product code$160Better saving: LINEN15 at $24$136
One eligible shirt after removing the second$80None: quantity requirement fails$80

For the conflicting-code example, assume both codes target these shirts and neither permits combination. The expected saving is $24, not $44.

Now replace one linen shirt with an excluded variant. Only one item qualifies, so the two-item requirement fails. Confirm the selected variant’s price and eligibility after the change instead of carrying the previous saving forward.

For a separate fictional Buy X get Y offer, let two eligible shirts qualify for one free $10 pair of socks. The basket needs both shirts and the socks. If the socks are out of stock and unavailable to add, the reward cannot be assumed. Offer an available replacement only if the saved promotion includes it.

Run these cases through your store’s supported checkout. Discount combinations work through the Online Store, Storefront API and Shopify POS, with type-specific restrictions. Buy X get Y at a physical location requires POS Pro. Its online-store checkout route remains available with POS Lite.

Give shoppers the same offer explanation

Write the offer explanation from the saved discount settings, then use that explanation wherever customers encounter the promotion. Include the qualifying products and quantity beside the code. Put the active period and redemption limits where customers can find them before checkout.

For the fictional linen offer, the product message can say, “Use LINEN15 for 15% off when you buy two eligible linen shirts.” The basket explanation must identify which items qualify. An excluded cotton shirt must not count towards the two-shirt requirement.

Give shoppa the approved promotion document alongside your catalogue and store policies. shoppa helps customers find, compare and buy products in the chat using your store’s information. Keep its promotion explanation consistent with the checkout rules.

A fictional customer asks, “Do two cotton shirts qualify?” The expected explanation names the eligible linen shirts and says the cotton shirts are excluded. The customer then asks for two eligible linen shirts in navy. The resulting basket must contain eligible variants before anyone promises the saving.

If the customer removes one shirt, explain that the remaining shirt no longer meets the quantity requirement. Check the revised basket in the supported checkout and show the actual applied discount beside the original merchandise prices. A correct conversational explanation must lead to the same eligibility result at checkout.

After editing the promotion, update the approved document and repeat this conversation with the revised basket. An old offer document must not keep promising a saving that the checkout has stopped applying.

Diagnose a code that does not apply

Open the existing discount and compare its saved settings with the failing basket before recreating the offer. Start with the condition the basket fails.

  • For an inactive offer, compare the active period with the store’s time zone and status.
  • For an eligibility failure, check the customer or market and each selected product variant.
  • For an unmet minimum, count qualifying items or qualifying spend using that discount type’s rules.
  • For exhausted usage, check both the total redemption limit and the per-customer restriction.
  • For a competing offer, compare the permitted classes on both discounts and the actual saving at checkout.
  • For a missing gift, confirm the customer added an eligible reward and that it can be purchased.

Preserve the code, configured rules and exact checkout message. Give the staff member responsible for promotions the basket’s product and variant IDs, quantities and expected calculation. Use a test basket to reproduce the problem without editing a customer’s live order.

If the settings match the intended offer but checkout still differs, send Shopify Support the combination settings and reproduction steps. For an app-created promotion, route the app’s behaviour to its developer. Remove customer identifiers from evidence that does not need them.

Older instructions that tell you to edit Shopify Script Editor no longer provide a working route. Shopify has retired Scripts and Script Editor, and scripts no longer run on any store. Use an app with functions under Shopify’s extensions and functions guidance.

Shopify’s Functions documentation distinguishes public apps from custom apps. Public apps containing functions are available across plans. Custom apps containing Shopify Function APIs require Shopify Plus, and some capabilities have additional Plus restrictions.

After the correction, rerun the same failing basket and one eligible basket. Confirm the original prices, saving and payable total agree with the saved offer before restoring its customer message.

Give your store its own shopping agent

Customers ask in their own words. Your agent finds, compares and checks out from your catalogue, right on your site.

See it in actionFree trial · Simple setup