Shopify

How to Create Discount Codes on Shopify (Without Killing Your Margin)

Step-by-step guide to creating discount codes on Shopify, the types available, and how to run promotions that boost sales without destroying your profit margin.

Muaadh Updated Sep 28, 2026 4 min read

Discount codes are one of the fastest ways to boost sales on Shopify — but they're also one of the fastest ways to erase your profit if you don't run the math first. This guide shows you exactly how to create discount codes on Shopify, the types available, and how to discount profitably instead of just cutting prices.

Quick answer: In your Shopify admin, go to Discounts → Create discount, choose a type (percentage, fixed amount, buy X get Y, or free shipping), set the value, conditions, and dates, then save. Before you launch, check that the discount still leaves a healthy margin after your product cost and fees.

How to create a discount code on Shopify (step by step)

  1. In your Shopify admin, click Discounts in the left menu.
  2. Click Create discount.
  3. Choose a discount type:
    • Amount off products (percentage or fixed amount)
    • Amount off order
    • Buy X get Y
    • Free shipping
  4. Enter a discount code (e.g., SAVE10) or let Shopify generate one.
  5. Set the value and any conditions (minimum purchase, specific products/collections, customer eligibility, usage limits).
  6. Set the active dates (start and optional end date).
  7. Click Save.

Your code is now live and ready to share. (Shopify updates this UI periodically — confirm the exact steps at help.shopify.com if your screen differs.)

The 4 types of Shopify discounts (and when to use each)

Type Best for Watch out for
Percentage off Storewide sales, first-order incentives % off high-cost items can wipe out margin
Fixed amount off Predictable, controlled discounts Can over-discount low-priced items
Buy X get Y (BOGO) Moving inventory, raising units per order You give away a full product's cost
Free shipping Reducing cart abandonment You absorb the full shipping cost

Automatic discounts vs discount codes

  • Discount codes require the customer to enter a code — great for email/social campaigns and tracking which promo drove sales.
  • Automatic discounts apply at checkout with no code — great for storewide sales and threshold offers ("Spend $50, get 10% off").

Use codes when you want attribution; use automatic when you want frictionless, sitewide promotions.

The part most sellers skip: discount profitably

A 20% off code feels harmless — until you realize it can eat most of your profit on a thin-margin product. Here's the math to run before you launch any discount:

After-discount profit = (Price − Discount) − Product cost − Fees − Shipping

Example: a $30 product with $12 cost, ~$2 in fees, and $5 shipping earns ~$11 profit. Apply a 20% code (−$6) and your profit drops to ~$5 — less than half. Push to 30% off and you may be selling at breakeven or a loss.

Rules of thumb for profitable discounting:

  • Know your margin per product before setting a discount ceiling.
  • Set minimum purchase thresholds so discounts lift average order value.
  • Use usage and time limits to create urgency without permanent price erosion.
  • Avoid stacking discounts with free shipping unless the margin clearly covers both.

See exactly what each discount does to your profit

The danger with Shopify discounts is that the admin shows you revenue, not profit — so a "successful" sale can actually lose money once product cost, fees, and shipping are counted. Before you run your next promo, you need to know your real margin on every product.

Syncost tracks your true net profit — after COGS, fees, shipping, and ad spend — so you can set discount levels that boost sales without selling at a loss, and see exactly how each promotion affected your bottom line.

Try Syncost free and discount with confidence.

FAQ

How do I create a discount code on Shopify? Go to Discounts → Create discount in your admin, pick a type, set the code, value, conditions, and dates, then save.

What types of discounts can I create on Shopify? Percentage off, fixed amount off, buy X get Y (BOGO), and free shipping — as either code-based or automatic discounts.

Can I limit how many times a discount code is used? Yes — set usage limits (total uses and/or one per customer) when creating the discount.

What's the difference between a discount code and an automatic discount? A code must be entered by the customer (good for tracking campaigns); an automatic discount applies at checkout with no code (good for sitewide sales).

How do I make sure a discount is still profitable? Subtract the discount, product cost, fees, and shipping from the price before launching. Tools like Syncost show your real per-product margin so you know your safe discount ceiling.

Sync Ads spend cost from Facebook, meta, google ads, and tiktok ads in one profit tracker for your shopify store

Related articles