> For the complete documentation index, see [llms.txt](https://help.recart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.recart.com/discounts/expiring-discount-codes.md).

# Expiring Discount Codes

Create expiring unique discount codes in Recart — seamlessly synced between popups and Welcome Flows.

### Table of contents:

* [What are expiring discount codes](#whatareexpiringdiscountcodes)
* [How it works](#howitworks)
* [How to set it up](#setup)
* [Countdown timer](#countdowntimer)
* [Limitations](#limitations)

### What are expiring discount codes?

An **expiring discount code** is a **unique, one-time code** that stays valid for a set duration (minutes, hours, or days).

#### In Recart:

* The code is generated **after a successful opt-in**
* It is displayed on the **popup success step**
* The same code is passed into the **linked Welcome Flow**
* The code is also synced to **Klaviyo** and **Postscript**

#### Why this matters

* \*\*One code across popup + SMS -\*\*No mismatch between what shoppers see vs. what they receive later
* **Urgency built-in** with an optional countdown timer on the popup
* **Less manual work -** discounts are created and managed directly in Recart (and synced to Shopify)

### How it works

1. Visitor opts in via your popup
2. Recart generates a **unique (or expiring unique)** code
3. Code is displayed on the popup success step (click-to-copy + auto-applied at checkout)
4. The same code is passed into your Welcome Flow so your first SMS can reference it

### How to set it up

**1. Create an Expiring Unique Discount**

* * Go to **Discounts → Create New**
  * Choose **Unique**
  * Choose **Automated flows**

![Discount\_Create](https://2167119381-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2I45aTZ733MBi8Vps3Ib%2Fuploads%2Fy7pA0v7r5IjGJhpdPCNH%2FDiscount_Create.png?alt=media)

* * Fill out relevant details for your discount code
* * Set **Expires after a certain time** (minutes / hours / days)

![Discount\_Expire Time](https://2167119381-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2I45aTZ733MBi8Vps3Ib%2Fuploads%2FMI7JsFvZ6uuJE9YvZZPn%2FDiscount_Expire%2520Time.png?alt=media)

* * Save / Activate

**2. Add the discount to your popup**

* * Open your popup editor
  * Go to the **Success step**
  * Click **Add discount code**
  * Select your **expiring unique discount**

![Discount\_Optin Tool Update](https://2167119381-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2I45aTZ733MBi8Vps3Ib%2Fuploads%2FxDsq9dAVRh2X97zuEXrN%2FDiscount_Optin%2520Tool%2520Update.png?alt=media)

**3. Connect your popup to a Welcome Flow**

* * Go to **Opt-in Tools → Edit popup → Settings**
  * Select your Welcome Flow and save

**4. Use the popup discount in the Welcome Flow**

* * In the Welcome Flow message, insert the **popup discount** variable
* * Make sure the discount selected in the popup and the flow match

![Discount\_ FlowEditor-1](https://2167119381-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2I45aTZ733MBi8Vps3Ib%2Fuploads%2FQDuird5vqZfvANh3FlzW%2FDiscount_%2520FlowEditor-1.png?alt=media)

#### Styling the discount on the popup

You can customize how the discount code appears on the popup success step.

Available styling options:

* * Border style: **Dashed / Dotted / Solid / None**
  * Border radius
  * Heading-style text

![Discount\_Opt-in Tool](https://2167119381-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2I45aTZ733MBi8Vps3Ib%2Fuploads%2FjPka6vQcSTr9OogXiwrU%2FDiscount_Opt-in%2520Tool.png?alt=media)

These options affect **visual presentation only** and do not change how the discount works at checkout.

### Countdown timer

When using an expiring unique discount:

* The countdown timer appears **automatically**
* It can be **shown** or **hidden** in the popup editor
* It is removed only if the discount code is replaced or removed
* Countdown timers are **not available for non-expiring discounts**

### Important limitations

* Expiring unique discounts **require a popup**
* Only **one expiring discount** per Welcome Flow
* Popup and welcome flow **should use the same code -** a mismatch triggers a warning
* Not available for **2-step (SMS Reply) popups**
* Shopify **segments are not supported** for this feature (if segmentation is modified in Shopify, the expiring code cannot be created)

#### Warning messages you may see

| **Warning**                        | **What it means**                                                                                        |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Discount Mismatch**              | The discount selected in the popup does not match the discount used in the connected Welcome Flow.       |
| **Active Discount Locked**         | The discount cannot be deleted because it is currently used in an active popup or Welcome Flow.          |
| **One Expiring Discount Per Flow** | Only one popup discount can be attached to a single Welcome Flow. Additional popup discounts are hidden. |

For more information, go to our Discount Codes in Recart Help Article. If you have any questions, you can also reach us at <support@recart.com>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.recart.com/discounts/expiring-discount-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
