You can turn a Rebuy Checkout Extensions Product Recommendations widget (also called a checkout offer widget) into a Gift With Purchase (GWP) offer on a Shopify Plus store using the Treat as Gift with Purchase setting. Turning it on makes every item a customer adds from that widget behave as a Gift With Purchase item: Rebuy re-checks the widget's Data Source rules inside Shopify checkout and removes the gift automatically if the customer no longer qualifies for it.
Note: This setting is available to Shopify Plus merchants only, because Rebuy Checkout Extensions run on Shopify checkout extensibility, which is a Shopify Plus feature.
Treat as Gift with Purchase is a setting on a Checkout Extensions widget, separate from the Gift With Purchase widget, and with it the customer sees the gift offer inside Shopify checkout and chooses to add it. To add a gift automatically on your storefront with no customer action, use the Gift With Purchase widget instead. To compare every way to offer a gift with Rebuy, see Ways to Create a Gift-With-Purchase Offer with Rebuy.
What Treat as Gift with Purchase changes
On a Shopify Plus store, Treat as Gift with Purchase changes the following about a Checkout Extensions Product Recommendations widget. The widget's Data Source, discount, and styling work exactly as they do with the setting off.
Items added from the widget are tagged as Gift With Purchase items. Without the setting, Rebuy tags them as checkout offer items. This tag is what lets Rebuy validate the gift and hide the widget.
The gift is validated inside Shopify checkout. Rebuy re-runs the widget's Data Source rules against the live checkout cart and removes the gift if the cart no longer qualifies, or if the gift lost its discount.
The widget hides itself once the customer has taken its gift. The entire widget disappears from checkout as soon as the cart contains a gift line from that widget, so one widget delivers one gift per order.
When to use this setting
Enable Treat as Gift with Purchase on any Checkout Extensions Product Recommendations widget that gives the customer a free or discounted gift tied to cart conditions on your Shopify Plus store. Leave it off for ordinary upsell and cross-sell offers, where the customer is paying for the item.
The setting supports the following gift patterns. Each uses the same toggle, and the difference between them is how the Data Source is configured:
A single-product gift. The Data Source returns one product, and that gift is offered at checkout once the cart conditions are met.
A selectable gift. The Data Source returns several eligible products, and the customer chooses one of them at checkout.
A single-product gift Data Source needs one qualifying condition and a RETURN of the specific gift product.
Without this setting, items added from a checkout offer widget are not validated at checkout at all. A customer can qualify for the gift, add it, then remove the items that qualified them, and still keep the gift. Rebuy does not remove it, and because the Rebuy discount applies based on which widget added the line rather than on the Data Source rules, the gift can stay free even though the cart no longer qualifies. Enabling the setting closes that gap.
Where to find the setting
Treat as Gift with Purchase is in the Advanced Settings tab of the widget editor, directly below Enable Attribution Tracking.
To reach it, open Rebuy Admin > Checkout Extensions, open the Product Recommendations widget you want to change, and open the Advanced Settings tab in the left-hand sidebar.
The setting appears only on Product Recommendations widgets. The table below lists each Checkout Extensions widget type and whether it has the Treat as Gift with Purchase setting.
Checkout Extensions widget type | Has Treat as Gift with Purchase |
Product Recommendations (checkout offer) | Yes |
Content Block | No |
Checkout Progress Bar | No |
Switch to Subscription (line item editor) | No |
Button | No |
How to enable Treat as Gift with Purchase
To enable Treat as Gift with Purchase on a Checkout Extensions Product Recommendations widget:
Open the widget in Rebuy Admin and go to the Advanced Settings tab.
Confirm Enable Attribution Tracking is on. Treat as Gift with Purchase is greyed out until it is, and the tooltip reads "Requires Attribution Tracking to be enabled."
Toggle Treat as Gift with Purchase on.
Save the widget.
Important dependency: If you turn Enable Attribution Tracking off after enabling Treat as Gift with Purchase, Rebuy turns Treat as Gift with Purchase off with it. The toggle stays greyed out until Enable Attribution Tracking is turned back on.
Configure the discount before you enable the setting
On a Shopify Plus store, a widget with Treat as Gift with Purchase on needs a discount on the gift. A gift that reaches checkout carrying no discount at all, at a price above $0, is removed automatically, since Rebuy treats it as a gift the customer is about to be charged for.
To configure the discount, open the widget's Discount tab and:
Turn on Use Shopify Functions (Recommended). This applies a real discount to the line in the customer's cart. With it off, Rebuy shows a visual-only discount that never reaches the cart, so the gift is removed at checkout every time.
Set Discount Type to Percentage and Percentage Discount to 100 to make the gift free.
Note: A discount below 100% is supported. The gift stays in the cart at its discounted, non-zero price, since Rebuy only removes a gift line that carries no discount at all.
How the gift is validated at Shopify checkout
On a Shopify Plus store with Treat as Gift with Purchase on, the gift is validated at checkout by Rebuy's GWP Watcher, the same validation logic that protects gifts added by a standard Gift With Purchase widget. The Watcher re-checks the checkout cart after each cart change and decides whether each gift from that widget stays or goes.
The table below lists each situation Rebuy checks for at checkout and what happens to the gift in that situation.
Situation at checkout | What happens to the gift |
The cart still matches the Data Source rules and the gift still carries its Rebuy discount | The gift stays |
The Data Source rules ran and nothing matched, so the cart no longer qualifies | Every gift from that widget is removed |
The gift's product is no longer among the products the Data Source returns | That gift is removed |
The gift line carries no discount at all and costs more than $0, for example because the customer applied a discount code that cannot combine with the gift's discount | The gift is removed, so the customer is not charged full price for it |
Rebuy cannot get a validation answer, for example the response is empty or the request fails | Nothing is removed, since Rebuy keeps the gift rather than deleting a legitimate one |
The Data Source uses a URL rule or an Order Tag rule | Validation is skipped and the gift stays |
The checkout is a draft-order checkout | Validation is skipped, because Shopify does not allow removing lines there |
Gift removal at checkout is silent, and Rebuy never adds a removed gift back on its own. No banner or notice is shown to the customer when a gift is removed. If the cart qualifies again, for example because the customer restores the qualifying items, the widget shows the offer again and the customer can add the gift from it.
Gift qualification on a Treat as Gift with Purchase widget uses the subtotal before order level discount codes. A gift condition such as Cart Subtotal is greater than $50 is checked against the subtotal your customer sees before any order level discount code reduces it, so a discount code cannot pull a qualifying cart below the gift threshold and remove a gift the customer already earned.
Note: Rebuy matches gifts at the product level, not the variant level, so any variant of a returned product counts as a valid gift.
One gift per widget
On a Shopify Plus store, a Checkout Extensions widget with Treat as Gift with Purchase enabled hides itself completely as soon as the cart contains a gift line from that widget. The customer cannot add a second gift from the same widget, and the widget appears again only if the gift leaves the cart.
The hide is unconditional. It does not depend on how many products the Data Source returns, and there is no separate setting for it.
This differs from the standard Gift With Purchase widget, which adds every product its Data Source returns as soon as the cart qualifies. On a checkout offer widget with Treat as Gift with Purchase, a Data Source that returns several products shows the customer each of them as an option and lets them keep one.
To offer more than one gift at checkout, create another Checkout Extensions widget with its own Data Source and enable Treat as Gift with Purchase on that one too.
Set up a selectable gift at Shopify checkout
Because the widget hides after one gift is taken, a Data Source that returns several eligible products produces a selectable gift: the customer sees the options at checkout, adds the one they want, and the widget disappears.
A selectable gift at Shopify checkout uses a Checkout Extensions widget and requires Shopify Plus. To let customers choose their own free gifts on your storefront instead, in Rebuy's Smart Cart, on a product page, or store-wide, use the Selectable Gift with Purchase widget.
To set up a selectable gift at Shopify checkout:
Create or open a Checkout Extensions Product Recommendations widget.
In the Discount tab, turn on Use Shopify Functions (Recommended) and set a 100% discount so the gift is free.
In the Data Source tab, add the qualifying cart condition, most commonly a Cart Subtotal rule, and set the RETURN to the specific gift products the customer can choose from.
In the Advanced Settings tab, confirm Enable Attribution Tracking is on, then toggle on Treat as Gift with Purchase.
Save and test in a real checkout.
Important: Do not add an exclusion condition that filters out the gift products. This is the most common way this setup breaks, as explained under Do not exclude the gift products in the Data Source.
A correctly configured Data Source for a selectable gift at checkout has a single qualifying condition and a RETURN of the specific gift products.
Do not exclude the gift products in the Data Source
On a Shopify Plus store, the Data Source for a Treat as Gift with Purchase widget must not contain a condition that stops matching once the gift is in the cart. If it includes an exclusion condition that filters out the gift products, the gift is repeatedly added and then removed from the cart and never stays.
Incorrect setup example: The most common cause is an AND condition such as Products Does Not Contain Any [the gift products], usually carried over from an onsite Gift With Purchase widget setup to stop the customer taking a second gift. It cannot do that on a Checkout Extensions widget, and it creates the following loop instead:
The cart qualifies and no gift is in it yet, so the Data Source matches and the widget shows.
The customer adds a gift product.
The exclusion condition now fails, because the gift is in the cart, so the Data Source no longer matches.
Rebuy sees an unmatched Data Source and a gift in the cart, and removes the gift.
With the gift gone, the exclusion condition passes again, the Data Source matches, and the widget reappears. The cycle repeats.
To correct the Data Source, open it and delete the exclusion condition. A correctly configured Data Source for this widget contains only the qualifying condition, for example Cart Subtotal, and the RETURN list of gift products. Nothing needs to guard against a second gift, since the widget hides itself the moment the customer takes one.
Requirements and limitations
Treat as Gift with Purchase depends on Shopify checkout extensibility and on Rebuy's Shopify Functions discounting, and both place limits on what it can do.
Shopify Plus is required. Rebuy Checkout Extensions run only on Shopify Plus plans.
The Data Source must return specific products or variants. Any non-deterministic product source, such as an AI-recommended endpoint or any rule whose output is not a fixed set of products, gives the Watcher nothing to match the gift against, so it treats the gift as unqualified and removes it at checkout.
URL rules and Order Tag rules are not supported. Neither is reachable inside a Shopify checkout extension. When a Data Source uses one, Rebuy skips validation for that widget rather than evaluating it incorrectly, and the gift is never auto-removed.
Validation runs on the checkout page only. It does not run on the thank you page, the order status page, or in customer accounts. If a customer returns to the cart from checkout, the gift may still be there.
The checkout widget never adds a gift on its own. On a Shopify Plus store, the checkout offer widget validates and removes gifts at checkout, but it does not add one. The customer adds the gift from the widget.
Rebuy does not check that the discount is the right amount. It checks only that the gift line carries a discount. A misconfigured discount that leaves the customer paying part of the price is not caught. Test a real checkout and confirm gift lines reach the price you intend.
Draft-order checkouts skip validation. Shopify blocks line removal on draft-order checkouts, so gifts are neither validated nor removed there.
Shopify Markets fixed prices can shift the threshold. Rebuy converts money thresholds into the buyer's currency using the ratio between a cart variant's localized price and its base price. If that variant has a fixed per-market price override rather than an automatically converted price, the ratio is not the real exchange rate and the threshold drifts, so a customer can qualify in the cart and fail at checkout, or the reverse. If you use fixed market prices, test your threshold in each currency where you run the offer.
The same gift offered by a Gift With Purchase widget can be added twice. When a checkout offer widget and a storefront Gift With Purchase widget give away the same gift product, a customer who adds the gift at checkout and then returns to your store receives a second copy from the Gift With Purchase widget. The Gift With Purchase widget only recognizes gifts it added to the cart itself. It's recommended to offer each gift product from one widget only. See Creating A Gift With Purchase Offer for how to choose between the widgets.
How the gift is reported
Items added from a widget with Treat as Gift with Purchase enabled are attributed to Rebuy Gift with Purchase, not to Rebuy Shopify Checkout Extensions.
Turning the setting on therefore moves that widget's accepted-offer revenue from your Checkout Extensions attribution into your Gift With Purchase attribution. Expect the change when comparing reports across the date the setting was enabled.
In the Shopify order, the gift line from a Treat as Gift with Purchase widget carries the line item property _attribution: Rebuy Gift with Purchase, along with the widget's ID in _widget_id.
Frequently asked questions
Do I need Shopify Plus to use Treat as Gift with Purchase?
Yes, Treat as Gift with Purchase requires Shopify Plus. The setting lives on a Checkout Extensions widget, and Rebuy Checkout Extensions run on Shopify checkout extensibility, which Shopify offers only on Plus plans.
Why is the Treat as Gift with Purchase toggle greyed out?
The Treat as Gift with Purchase toggle is greyed out because Enable Attribution Tracking is off. Enable Attribution Tracking sits directly above the toggle in the Advanced Settings tab. Turn it on and the toggle becomes available.
Can one checkout offer widget with Treat as Gift with Purchase give more than one gift?
No, one checkout offer widget with Treat as Gift with Purchase gives one gift per order. The widget hides itself as soon as the cart contains a gift from it, whatever its Data Source returns. To offer another gift, build another Checkout Extensions widget with its own Data Source and enable Treat as Gift with Purchase on it as well.
Does Treat as Gift with Purchase work without Shopify Functions discounting?
No, Treat as Gift with Purchase requires Use Shopify Functions (Recommended) to be on in the widget's Discount tab. With it off, Rebuy shows a visual-only discount that never applies to the cart line, so the gift arrives at checkout undiscounted and is removed automatically.
Why is my gift removed immediately after the customer adds it?
A Treat as Gift with Purchase gift that is removed right after the customer adds it almost always has one of the following causes. Check them in the order listed:
Use Shopify Functions (Recommended) is off in the Discount tab, so the gift is never actually discounted.
The Data Source contains an exclusion condition that stops matching once the gift is in the cart.
The Data Source returns an AI-recommended endpoint instead of specific products.
Why does the gift keep getting added and removed over and over?
A Treat as Gift with Purchase gift that cycles in and out of the cart means the Data Source stops matching once the gift is in it. The usual cause is an exclusion condition such as Products Does Not Contain Any [the gift products], or a Product Equals rule that breaks when the cart contents change. Remove the exclusion condition, and use Products Contains Any rather than Product Equals.
Can the gift come back if the customer re-qualifies at checkout?
Yes, the customer can add a Treat as Gift with Purchase gift again once the cart qualifies again, but Rebuy never re-adds a removed gift on its own. When the customer restores the qualifying items at checkout, the widget shows the offer again and the customer chooses whether to add the gift.
Can I use a discount below 100% instead of a free gift?
Yes, a discount below 100% works with Treat as Gift with Purchase. The gift stays in the cart at its discounted, non-zero price. Rebuy removes a gift line only when it carries no discount at all, so a deliberately partial discount is preserved.
Can I use a product that is already priced $0 as the gift?
Yes, a product priced $0 in Shopify works as a Treat as Gift with Purchase gift, and Rebuy does not remove it at checkout. The removal check asks whether the customer is about to be charged for the gift, and a $0 product never is, so it stays whether or not a discount is applied to it.
Rebuy recommends against it anyway. A $0 product can be added to a cart and bought for free by anyone who reaches its product page, whether or not they qualify for your offer. The safer setup is to give the gift a real price and let Use Shopify Functions (Recommended) discount it to $0 only for customers who qualify.
If you do use a $0 product, set its Shopify product status to Unlisted. Unlisted keeps the product out of collections, search, and recommendations while Rebuy can still return it as the gift, though the product page is still reachable by direct link. See Using Unlisted Products for Gift With Purchase Offers.
Does Treat as Gift with Purchase run on the thank you page or the order status page?
No, Treat as Gift with Purchase gifts are validated and removed on the Shopify checkout page only. The thank you page, the order status page, and customer account pages have no editable cart, so Rebuy cannot remove a gift from them. Once the order is placed, whatever is in it stays in it.








