Create discount codes
Percentage off, dollar off, free shipping, BOGO, and tiered codes. Plus the rules that prevent abuse and stacking.
Last updated 2026-05-10
Discount codes are the most-used marketing tool on the platform. Used right, they drive conversion. Used wrong, they erode margin.
Marketing → Discounts → New
Pick the type:
- Percentage off: 20% off everything, or off a category, or off products tagged "sale"
- Dollar amount: €10 off orders over €50
- Free shipping. Waives shipping costs in matching zones
- BOGO. Buy one of X, get one of Y (or another of X) free or discounted
- Tiered: 10% off €50+, 15% off €100+, 20% off €200+
Restrictions worth setting
- Min order value. Prevents people stacking the discount on a €5 sticker
- Max uses total. Total redemptions across all customers
- Max uses per customer. Usually 1; prevents one person from claiming repeatedly
- First-purchase only. Auto-restrict to customers with 0 prior orders
- Date range. Start, end, and timezone
- Customer segments. Only segment X can use this code
The atomic CAS rule (count < max_uses) means simultaneous redemptions can't oversubscribe a code. This is enforced server-side.
Stacking
By default, only one code per order. Settings → Discounts → Allow stacking changes this if you want %-off + free-shipping codes to combine. Stacking with BOGO is always disallowed (math gets weird).
Auto-discounts (cart-rule discounts that apply without a code) stack with code discounts in the order: cart rule → code → tax. So 10% auto-discount + WELCOME20 (20% off) on €100 = €100 × 0.9 × 0.8 = €72.
Tracking which codes work
Marketing → Discounts → click a code → Stats. Shows redemptions, attributed revenue, AOV with vs without, repeat rate of users who used it. The codes with the worst ROI are usually:
- Generic 10% for everyone (cannibalises full-price sales)
- Codes shared on coupon-aggregator sites (DealCatcher, RetailMeNot)
- Long-running codes (over 90 days; lose urgency)
Time-limited and segment-targeted codes tend to outperform.
Hidden codes
Generate Codes → Hidden → uncheck "Show on storefront". The code only works if the customer types it manually. Useful for influencer campaigns and one-off VIP offers. The code never appears in your public discount list.
API
POST /v1/discounts to create programmatically. Useful for tying codes to email signups, completion of a survey, or a milestone in a referral program.