Schedule a discount code to start and end in Shopify
A sale should open and close on its own, without someone watching the clock. This tutorial schedules SUMMER25, worth 25% off orders of $40 or more, to run 1 to 31 December 2026.
Written · Shopify admin, desktop steps · 5 minutes read
The worked example
| Code | SUMMER25 |
| Value | 25% off orders of $40 or more |
| Starts | 1 December 2026, 12:00 am store time |
| Ends | 31 December 2026 |
| Days active | 31 |
| $80.00 order | $20.00 off, pays $60.00 |
| 30 November, $80.00 | No discount |
Download the planner: discount-sale-calendar.csv (184 bytes).
A sale calendar for the three scheduled offers, with the days each one stays active. The 31-day December sale, a one-day flash sale, and a 7-day launch add up to 39 days.
1Open Discounts and start a new discount
From your Shopify admin, go to Discounts, then click Create discount. From the discount type menu, click Amount off orders. An amount off orders discount applies to the whole order.
2Choose the code method
Under Method, select Discount code. Then enter the code name in the Discount code section, or click Generate code for a random one. This tutorial uses SUMMER25.
3Set the value and minimum
In the Value section, select Percentage and enter 25. In the Minimum requirements section, select Minimum purchase amount and enter 40. The minimum counts product prices only.
4Set the start date
In the Active dates section, set the start date to 1 December 2026. The code starts at 12:00 am on 1 December in the time zone set in your Shopify admin, so set the start date in that time zone, not in the customer's.
5Set the end date
Click Set end date and set the end date to 31 December 2026. The code stops applying after that date. If you do not set an end date, the code does not expire and runs until you stop it.
6Know the two variants
If you want the code to be valid for only one day, select the same calendar day for both the start date and the end date. The New Year flash sale in the calendar file does exactly that: 1 January 2027 for both dates, one day active. If you want no expiry at all, leave the end date unset.
7Save
Click Save. The code appears on the Discounts page and starts on its own at 12:00 am on 1 December in your store's time zone.
The arithmetic
The discount applies to the order total before tax and shipping, while the code is active.
| Order | 25% off | Customer pays |
|---|---|---|
| $80.00 | $20.00 | $60.00 |
| $40.00, the minimum | $10.00 | $30.00 |
| $200.00 | $50.00 | $150.00 |
On 30 November, before the start date, the same $80 order pays $80: the code does not apply outside its dates. On 1 January, after the end date, it pays $80 again.
Held at the counter
Start and end follow your admin time zone. A start date of 1 December means the code starts at 12:00 am on 1 December in your store's time zone. A customer in another time zone may see the sale open or close hours earlier or later than midnight their time.
No end date means no expiry. A sale discount saved without an end date keeps applying to every qualifying order. Set the end date before you save it, or diary the stop date for the day the sale ends.
Same day for start and end means one day only. Picking the same calendar day for both dates gives a one-day code, not a code that never starts. Use it for a flash sale, not by accident.
Sources
- Amount off discounts — Shopify's help pages: the Active dates section, the time zone note, the one-day rule, and the no-end-date rule.