---
title: "How do I give a free gift only with a discount code?"
description: "Give a free gift only with a code: set the Free gift to Code, share a /discount/ link or cart code field, and why a code typed at checkout won't add it."
url: "https://smart-bundles.io/help/free-gifts/free-gift-with-a-discount-code"
updated: "2026-11-02"
product: "SMART Bundles App & Upsells"
section: "Help center / Free gifts"
---


# How do I give a free gift only with a discount code?

Create a Free gift and set **Application method** to **Code** before the first save, then enter the **Discount code**. The gift is added only while that code is on the cart: entered in a cart discount field, if your theme has one, or applied with a /discount/CODE link. A code typed only at checkout doesn't add the gift, because the gift can't be added to the cart from checkout.

## Step by step

1. In SMART Discounts, click **Create new discount** and pick **Free gift**.
2. Enter a **Discount name** and set **Application method** to **Code**. The method is fixed once saved. To switch later, click **Duplicate**, pick the other method on the unsaved copy, save it, then deactivate the original.
3. Type the **Discount code**, or click the **Generate** button (the refresh icon) next to it for a random 10-character code (it's copied for you). A code another discount in your store already uses shows "This discount code is already taken." You can change the code after saving.
4. In **Trigger**, choose **Cart value** or **Items in cart**. The card says "The gift is added only while the discount code is entered."
5. In **Gift tiers**, set up the one tier a code gift has. Leave the minimum empty to "give the gift for the code alone", or enter one so the code works only on bigger carts.
6. Optional: in **Maximum discount uses**, tick **Limit number of times this discount can be used in total** and enter a number, and/or **Limit to one use per customer**. Shopify tracks one use per customer by email address or phone number ([Shopify Help Center](https://help.shopify.com/en/manual/discounts/discount-types/percentage-fixed-amount)).
7. Set **Eligibility**, **Combinations** and **Active dates**, then click **Create**.

## How shoppers apply the code

- **In the cart.** If your theme's cart has a discount code field, the gift is added as soon as the code is on the cart.
- **With a link.** Share a link in the form your-store.com/discount/YOURCODE. Shopify applies a shareable link's code to the shopper's cart, and adding ?redirect=/collections/your-collection to the link lands them on another page ([Shopify Help Center](https://help.shopify.com/en/manual/discounts/managing-discounts)). Shopify admin doesn't offer a shareable link for codes created by an app, so write the link yourself.
- **Not at checkout only.** A code typed only at checkout can't add the gift, since nothing can be added to the cart from there. Ask shoppers to enter it in the cart or use your link.

## How the code is checked

Your gift's settings are printed on every store page, so they never include the code. Instead, when the cart holds discount codes, the app adds the gift and checks its price. If Shopify doesn't make the gift line free (or your gift price), that set of codes is ruled out for the browser tab and the gift is removed. So a shopper using a different code may see the gift appear for a moment and then disappear. That's expected. Removing your code from the cart removes the gift.

## Limits

- One tier per code gift. For a code that unlocks bigger gifts on bigger carts, use an automatic Free gift with tiers instead. See [Free gift tiers](https://smart-bundles.io/help/free-gifts/free-gift-tiers).
- One code per discount. There are no bulk, prefix or wildcard codes. See [Automatic or code, and schedules](https://smart-bundles.io/help/cart-discounts/automatic-or-code-and-schedules).
- If another discount on the cart doesn't combine with the gift, Shopify applies the best discount for the cart ([Shopify Help Center](https://help.shopify.com/en/manual/discounts/discount-combinations)), and the app then removes the gift instead of charging for it. Check **Combinations** on both discounts. See [Combine with other discounts](https://smart-bundles.io/help/troubleshooting/combine-with-other-discounts).
- A code Free gift doesn't count toward Shopify's 25 active automatic discounts.
- Like every Free gift, it never applies in Shopify POS and needs the SMART Discounts app embed on. See [Free gift not added to the cart](https://smart-bundles.io/help/free-gifts/free-gift-not-added-to-cart).

**Turn a code into a gift** With SMART Bundles, a code can add a gift to the cart by itself. Free on the Shopify App Store, with every feature included. [Install SMART Bundles App & Upsells on the Shopify App Store](https://apps.shopify.com/smart-automatic-discounts).

## Frequently asked questions

### A customer typed the code at checkout and got no gift. Why?

The gift is added to the cart before checkout, so the code must be on the cart: entered in the cart's discount field or applied with a /discount/CODE link.

### Can each customer use the gift code only once?

Yes. Tick Limit to one use per customer in Maximum discount uses. That setting exists only for code discounts.
