Create a discount code
Build a discount your shoppers unlock with a code at checkout — set the code, the value, the schedule, and the products it covers.
A discount code only applies when the shopper types it at checkout, which makes it the right type for campaigns, newsletters, and influencer partnerships.
The editor is the same as for an automatic discount, with two differences: there is a Discount code field, and there is no New price display option — a code does not exist until it is entered, so the price on the product page cannot be changed in advance.
Set the discount value
Below the code, pick a Discount value type and enter the number:
Percentage (%)
Takes that percentage off each matching item. Maximum 100%.
Fixed amount
Takes that amount off each matching item, in your store currency.
New price
Sells each matching item at the price you type, instead of its own price.
Then choose a Purchase type: One-time purchase, Subscription, or Both one-time purchase and subscription.

(Optional) Add a minimum purchase requirement
Open the Requirement selector in Minimum purchase requirements and choose No minimum requirements, Minimum purchase amount, or Minimum quantity of items. The last two add a Requirement value field, counted only across the products this discount applies to.

Choose which discounts it can combine with
Combinations starts with Product discounts, Order discounts, and Shipping discounts all allowed. Click the x on a row to stop this code from stacking with that type; the pencil icon in the section header reopens the full list of checkboxes.
Click the counter on a row to see which active discounts of that type your store already has.

Choose which products the code applies to
Switch to the Product conditions tab and pick All products, Specific products, or Matching conditions.
For Specific products, search in the field or click Browse to open the Shopify product picker, then use Edit on a row to narrow the selection down to individual variants.

Save and share the code
Click Save in the bar at the top of the screen. Errors, if any, appear in a red banner and the editor jumps to the tab that owns the first one.
Back on the Discounts page, the row shows Discount code as its type with the code beside it — use the copy button to put the code on your clipboard before sharing it.

Show the code on your product pages
A discount code cannot change the price shown on your storefront, but a badge can advertise it. After saving, click Create badge on the Don't let this discount go unnoticed card and write the code into the badge text with the {sami_discount_code} variable.
Next steps
Use matching conditions — match products by collection, title, or tag instead of picking them one by one.
Create an automatic discount — a discount that applies itself, with no code to share.
Discounts overview — statuses, plan limits, and how discounts connect to badges.
Last updated
Was this helpful?




