> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.hoppyapps.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 🎟️ How to Show a Discount Code on a Countdown Timer

Want to give customers a discount at the exact moment your countdown creates urgency? 🎟️

Hoppy Countdown Timer can show a **coupon code badge** inside your countdown. Customers click the badge to copy the code, and Hoppy also tries to apply it to their cart automatically.

This guide shows you how to attach a Shopify discount to a countdown, style the coupon badge and test it on your storefront.

---

# **⚠️ Before You Begin**

Make sure:

* The **Hoppy Countdown Timer** app is installed and the **Countdown Timers** app embed is enabled in your theme
* You have already created a discount code in **Shopify Admin → Discounts** (or you are ready to create one)
* The discount is **Active** in Shopify

ℹ️ The coupon option is available for Product Page, Top/Bottom Bar, Landing Page, Cart Page, Cart Drawer, Custom Position and Campaign-based countdowns. It is **not available for Checkout Page countdowns**.

---

# **🛠️ Step 1 — Open the Countdown**

Open the **Hoppy Countdown Timer** app from your Shopify Admin, then:

➡️ Click **Create new countdown**, or open an existing countdown from your list

➡️ Stay on the **Content** tab (for Campaign-based countdowns, this is the **Timer Content** tab)

---

# **🎟️ Step 2 — Turn On the Coupon Code**

Scroll down to the **Coupon Code** card.

➡️ Tick **Show coupon code**

Three things appear:

* A **Select Discount from Shopify** button
* A note: *Discount will be applied automatically when user clicks on copy icon on storefront.*
* A **Create new Discount** link

---

# **🔎 Step 3 — Select the Discount**

➡️ Click **Select Discount from Shopify**

A **Select Discount** window opens and lists your active discounts.

➡️ Use the **Search discounts** field to find a discount by its title

➡️ Click the discount you want to attach

After you select it, the card shows **Selected discount:** followed by the discount title (with the code in brackets when it differs from the title). To pick a different one later, click **Change Discount**.

## **What appears in the list**

* Only **active** discounts are shown
* Only **discounts that use a code** can be selected. Automatic discounts do not have a code to copy, so they are not listed
* If you have no active code discounts, the window shows **No discounts available** with a **Create discount** button. You can also use the **Create new Discount** link in the Coupon Code card. Both open the Shopify discounts page in a new tab. Create the code there, then come back, click **Select Discount from Shopify** again and select it

⚠️ If the list does not load, the window shows an error message (for example **Failed to load discounts.**) instead of the list. Reload the app and try again. If it still fails, contact support through the in-app chat.

---

# **🎨 Step 4 — Style the Coupon Badge**

Open the **Design** tab (for Campaign-based countdowns, open each placement tab, make sure the placement is switched on and scroll down to its design settings). When **Show coupon code** is on, a **Coupon Code Style** section appears. You can adjust:

* **Border Style** (Dashed, Solid or Dotted)
* **Coupon Text Color**
* **Coupon Border Color**
* **Background Color**
* **Font Size** (in px)

💡 Match the badge colors to your timer background so the code stands out without clashing.

For the full design walkthrough, see **🎨 Countdowns — Design & Styling**.

---

# **💾 Step 5 — Save and Publish**

➡️ Click **Save**

➡️ Click **Publish**

If you left the discount unselected while **Show coupon code** is ticked, the app asks you to **select a discount or disable "Show coupon code"** before you can save.

---

# **🧪 Step 6 — Test on Your Storefront**

1. Open your store in an **Incognito or Private** window
2. Go to the page where the countdown appears
3. Click the coupon badge

## **Expected Result**

✅ The code is copied to the visitor's clipboard
✅ The badge text briefly changes to **Applied!** for about two seconds, then returns to the code
✅ Hoppy asks Shopify to apply the code to the visitor's session and cart, so it shows up at checkout when it is valid for the items in the cart

---

# **📊 Tracking Coupon Clicks**

Each click on the badge is recorded as a coupon copy event. See **📊 Countdown Timers — Analytics** to learn what the dashboard shows.

---

# **⚠️ Important Notes**

* The coupon badge shows the code stored with the countdown. If you later rename or change the code inside Shopify, open the countdown, click **Change Discount**, reselect it and save so the badge shows the current code
* If the discount expires or is deactivated in Shopify, the badge still displays, but customers will not get the discount. Unpublish the countdown or pick another discount
* Whether the discount actually applies depends on your Shopify discount rules (eligible products, minimum spend, customer eligibility, combinations)

---

# **🔧 Troubleshooting**

**The Coupon Code card is missing**
You are probably creating a Checkout Page countdown. Coupon codes are not supported there.

**My discount is not in the list**
Check that it is Active in Shopify, that it uses a code (not an automatic discount) and try searching by its title.

**The code is copied but not applied at checkout**
Check the discount's eligibility rules in Shopify. Test with products that qualify and make sure the cart meets any minimum requirement.

**The badge does not appear on the storefront**
Confirm the countdown is published and the app embed is on. See **⏱️ Countdown is Not Showing on My Store [Fixed]**.

---

# **🎉 Final Result**

✅ Your countdown shows a clickable coupon badge
✅ Customers copy the code in one click and Hoppy tries to apply it for them
✅ You can style the badge to match your store