Zum Inhalt springen
DocumentationCode expiry

How code expiry works

Set an expiry date when you generate a batch and every code stops working after that day. Expiry is fixed for the batch, and you choose between two ways to enforce it at checkout.

When you generate a batch of codes, you can give the whole batch an expiry date. Every code in that batch stops working after that day, so a code you hand out for a launch or a seasonal drop does not keep discounting long after the promotion is over.

Expiry is set once, at generation

You set the expiry in the Generate codes dialog: choose "No expiry", or "Expire on a date" and pick the date. The expiry date and how it is enforced are baked into the batch the moment you generate it, and they cannot be changed afterward. If you need a different expiry, generate a new batch.

Note

Expiry works by day. A code with an expiry of July 20 is valid through the end of July 20 in your store timezone and stops the next day. Usage limits are separate: they are set on the campaign and apply to every code, whether or not the batch has an expiry.

Two ways to enforce it

Once you set an expiry date, the dialog shows a "How expiry is enforced" choice with two options. They reach the same result, a code that stops working, by different routes, and each has a trade-off.

Inside the code (no extra discounts)

The expiry date is built into each code and enforced by Stackable at checkout. No extra Shopify discounts are created, so this keeps your discount list tidy even across many expiry dates. An expired code is turned away at checkout with the message "This code expired on ..." so the shopper knows why.

Watch out

This mode needs a live automatic campaign to enforce

Because the expiry is checked by Stackable’s discount logic running at checkout, this mode needs at least one live automatic Stackable campaign on your store to do the checking. If none is live, the app warns you, and codes with this mode are not rejected after their expiry until an automatic campaign is live again. If you republish the campaign, the enforcement finishes on the next sync.

Separate discount per date (exact end time)

The codes for each expiry date go onto their own Shopify discount that Shopify ends at the exact end of that day. The code stops at precisely that moment, enforced by Shopify itself, with no dependency on a live automatic campaign. The trade-off is that this creates one extra discount per expiry date in your Shopify Discounts list.

If you want...Choose
The fewest extra discounts, and you already run a live automatic campaignInside the code (no extra discounts)
Enforcement to the exact end of the day, with no reliance on an automatic campaignSeparate discount per date (exact end time)
Choosing a mode

Set a store-wide default

You do not have to pick a mode every time. In Settings, "Default code expiry mode" sets which mode new batches start with when you give them an expiry date. You can still change it per batch in the Generate codes dialog.

Expiry in the CSV export

When a batch has an expiry, the exported CSV fills its expires_at column with each code’s end date, so you can see the expiry alongside the code in a spreadsheet. Batches with no expiry leave that column blank. See Share and distribute codes for the full column list.

Wir verwenden essenzielle Cookies für den Betrieb dieser Website und, nur mit Ihrer Erlaubnis, Analyse-Cookies, um den Traffic zu verstehen. Lesen Sie unsere Cookie-Richtlinie.