This article is the single reference for diagnosing and resolving Gift With Purchase (GWP) and discounting problems in Rebuy. It covers how the discounting system works, a diagnostic checklist for where to start, the most common merchant-reported issues with their causes and fixes, a reference for specific error messages, debugging tools, what is and is not supported, and Shopify platform constraints that affect every Rebuy merchant.
In This Article
Acronyms Used in This Article
GWP — Gift With Purchase
TPB — Tiered Progress Bar
CE — Checkout Extensions (Shopify Plus checkout extensibility)
CE TPB — Checkout Extensions Tiered Progress Bar
PDP — Product Detail Page
BXGY — Buy X, Get Y (promotion type)
RGR — Revenue Generated by Rebuy (Rebuy billing metric)
Prerequisites at a Glance
Several Rebuy GWP and discounting features share the same underlying prerequisites. Rather than restate them in every section, confirm the following foundational items first — most 'it's not working' cases resolve back to one of these:
Latest Smart Cart version. Required for the Storefront API, multi-code stacking, real-time discount validation, auto-removal of non-qualifying gifts, the Selectable Gift With Purchase Widget, and the Checkout Extensions Tiered Progress Bar. Legacy Smart Cart does not access any of these.
Shopify Plus. Required for any feature that relies on the Shopify checkout editor or checkout extensibility — including the GWP Validation at Checkout (GWP watcher), the Checkout Extensions Tiered Progress Bar, and the Treat as Gift With Purchase setting on Checkout Offer widgets. Non-Plus stores cannot access any of these features at all.
Storefront API enabled in the Smart Cart. Required for real-time discount validation, multi-code stacking, and auto-removal of non-qualifying gifts when a discount code drops the subtotal below a threshold. Enabled via the Discount Code Input component in the Smart Cart footer (latest Smart Cart version only). See "How do I enable the Storefront API in the Smart Cart?" below.
Attribution Tracking enabled on Checkout Offer widgets. Required before the Treat as Gift With Purchase setting can be enabled. If Attribution Tracking is later toggled off, Treat as Gift With Purchase automatically turns off with it.
Both
Rebuy Product DiscountandRebuy Order DiscountActive in Shopify Admin. These two Rebuy-managed Automatic Discounts are the backbone of every Rebuy Functions discount — if either is missing, Paused, or Expired, no Rebuy widget discount will apply store-wide.
Shopify Functions discount enablement (per widget)
Each Rebuy widget that applies a discount has its own Shopify Functions toggle (or, in Bundle Builder's case, a dropdown). If Rebuy Discounting is being used on a widget, "Discounted By Functions" — or that widget's equivalent setting — must be enabled. This setting is one of the most frequently missed configurations, and the toggle is intentionally off by default on most widgets. If discounts are not applying as expected on a specific widget, this is the first place to check on that widget specifically.
The exact path and setting name varies by widget:
Widgets (Cross-Sell, Add-On, Dynamic Bundle, etc.): Widget editor → Discount tab → toggle Discounted By Functions on → set Discount Type and amount.
Gift With Purchase Widget: Widget editor → Discount tab → toggle Discounted By Functions on → set Discount Type to
Percentageat 100% for a free gift, or lower for a partial discount.Selectable GWP Widget (Cart Cross-Sell): Widget editor → Discount tab → toggle Discounted By Functions on.
Tiered Progress Bar: Smart Cart editor → Tiered Progress Bar → Advanced Bar Settings → toggle Use Shopify Functions on. Discounting then applies per tier type configured under Configure Tiers.
Buy More Save More: Smart Cart editor → Cart Items Settings → Buy More Save More → Discounts sub-section → toggle Use Shopify Functions on → set tiers with quantity thresholds and discount amounts.
Bundle Builder: Bundle Builder editor → Discounting tab → General Discounting → set Discount Mechanism to
Shopify Functions(orCart Transforms) → configure tiers with discount type and required quantity/subtotal.Checkout Extensions Widget: Widget editor → Discount tab → set Discount Type → enable Use Shopify Functions → set percentage. Optionally enable Treat as Gift with Purchase in Advanced Settings.
Smart Flows (Buy X Get Y step): Flow Editor → Add Step → Buy X Get Y → configure the Get Y section. Set Discount Type to
None,Free,Percentage Off, orFixed Amount, and choose a Fallback Behavior (whether to remove the gift item or leave it at full price if the customer no longer meets the Buy X conditions). The BXGY step uses Shopify Functions natively — there is no separate "Shopify Functions" toggle to enable, and no separate Shopify discount code is required. (Note: Smart Flows' standalone Discount step is different — it applies a pre-existing Shopify discount code to the cart, rather than running Shopify Functions natively. The BXGY step is the Smart Flows equivalent of "Discounted By Functions.")Post Purchase Widget — exception, no Shopify Functions toggle. Widget editor → Configure Settings → Discount → set Discount Type and Discount Amount From Price. Post Purchase discounting is handled natively via Shopify's order-edit API and does not require Shopify Functions enablement.
The Post Purchase Widget is the only exception. Every other Rebuy widget that applies a discount requires its Shopify Functions toggle (or Bundle Builder's Discount Mechanism dropdown) to be enabled or set correctly. Post Purchase does not.
How Rebuy Gift With Purchase (GWP) and Discounting Works
Rebuy's discounting system runs on Shopify Functions. Every discount Rebuy applies to a cart is a Shopify Automatic Discount that Rebuy creates and manages behind the scenes. There are exactly two of these in the Shopify Admin for any Rebuy store:
Rebuy Product Discount — applies all product-level discounts (including Gift With Purchase $0 discounts and widget-level percentage/fixed discounts).
Rebuy Order Discount — applies all order-level discounts (such as Smart Cart Tiered Order Discounts).
Each Rebuy discount is scoped by widget ID and line item attribution. When a customer adds a product through a Rebuy widget, Rebuy writes attribution properties onto that line item; the Shopify Function then reads those properties at cart and checkout and applies the discount only to items that carry the attribution.
Understanding this architecture explains most of the issues in this article. A discount that "is not applying" almost always means one of three things: the attribution did not get written, the Shopify Functions toggle is off, or the Rebuy-managed Automatic Discount in Shopify has been paused, expired, or overridden by a non-combinable discount.
Shopify Product Status and Rebuy Behavior
Rebuy evaluates each product's Shopify lifecycle status at datasource query time. The status set on the gift product in Shopify Admin directly determines whether Rebuy can return it through a widget — including for Gift With Purchase setups.
Shopify Status | Rebuy Behavior |
Active | Returned in all datasource responses. |
Draft | Blocked from all datasource responses, including explicit specific product returns. Draft products also cause a 422 error at Shopify checkout if they end up in the cart through any path. |
Archived | Blocked from all datasource responses. |
Unlisted | Filtered from any datasource response driven by AI, Top Sellers, collections, tags, or algorithmic ranking. Can be surfaced via an explicit specific product return — for example, in a GWP datasource that pins the gift directly. |
Why this matters for GWP setups. Shopify's Unlisted status is the cleanest native way to keep a gift product out of collections, storefront search, internet search, and Rebuy AI/recommendation surfaces — without any tags or metafield workarounds. The gift remains available to Rebuy when explicitly pinned in a GWP widget's datasource via a Specific Product return, and is invisible everywhere else. For most GWP setups, Unlisted has replaced older "hidden product" workarounds (such as the seo.hidden metafield and exclude_rebuy tag) — those are only needed for products that must remain Active. See the live Help Center article "Using Unlisted Products for Gift with Purchase Offers" for full setup, including the $0 pricing trade-off.
Setup path for Unlisted gift products: Shopify Admin → Products → [gift product] → Status → Unlisted → Publish to Online Store sales channel → Save. The product must remain published to the Online Store channel even when Unlisted (Unlisted controls discoverability, not channel availability). Without that, Rebuy cannot return it.
Datasource configuration for Unlisted gifts: in the GWP widget's datasource, the RETURN must be set to Specific Product with the Unlisted gift explicitly chosen. AI, Top Sellers, collection, tag-based, and algorithmically-ranked returns will never surface an Unlisted product, regardless of other configuration.
Gift With Purchase (GWP) Validation at Checkout (Shopify Plus only)
Rebuy's GWP validation logic (sometimes referred to as the GWP watcher — the two names refer to the same feature and are used interchangeably in Rebuy documentation and support) can run actively during the Shopify checkout process. When active, it monitors cart changes at checkout and re-evaluates the GWP widget's datasource rules to ensure that any gift items in the cart remain valid. If a customer removes qualifying items and no longer meets the gift conditions — or a discount code applied at checkout drops the subtotal below the threshold — the watcher automatically removes the gift from checkout.
This section covers how checkout GWP validation works, what requirements apply, how the automatic gift removal behaves at checkout, and a newer setting — Treat as Gift With Purchase — that extends this behavior to checkout offer (recommendation) widgets.
Shopify Plus only. All GWP validation at checkout requires Shopify Plus. This feature depends on Shopify checkout extensions, which are exclusive to Shopify Plus plans. Non-Plus stores cannot access this feature at all.
Requirements
For the GWP validation logic to run at checkout, all four of the following must be true:
The store is on Shopify Plus.
At least one active checkout widget is on the checkout page — a checkout recommendation widget, a checkout progress bar, or a checkout content block. Without at least one active checkout widget, the validation logic is not triggered, regardless of other settings.
The gift item in the cart carries GWP widget attribution — either from a standard Gift With Purchase Widget, or from a checkout offer widget that has Treat as Gift With Purchase enabled (see below).
The GWP widget's datasource must return specific products. The watcher can only evaluate eligibility against a datasource that resolves to a deterministic set of product IDs. Datasources that use the AI-recommended endpoint (or any non-deterministic / algorithmically generated product list) do not return a stable product set and are always treated as invalid by the watcher. The watcher will auto-remove the gift at checkout in that case, even if the customer still qualifies on subtotal and rule logic.
The GWP widget's datasource does not use URL conditions or order tag rules. These rule types are not accessible inside Shopify Checkout Extensions, so the watcher cannot evaluate them at checkout. When either is present, validation is skipped entirely — the gift will not be auto-removed at checkout even when every other requirement is met.
How GWP validation works at checkout
When a customer proceeds to checkout, the GWP watcher checks two things about every GWP item in the cart: (1) is the widget's datasource still valid (does the cart still satisfy the rules, and does the datasource resolve to a deterministic set of specific products), and (2) is there an active Rebuy discount still applied to the gift line item. The watcher then decides whether to keep or remove the gift based on the combination:
Datasource is valid AND a discount is applied to the gift → gift stays. The customer still qualifies and Rebuy's discount is still active on the line, so the gift remains at checkout for free (or at the widget's configured discount).
Datasource is invalid → gift is removed. "Invalid" includes: the cart subtotal no longer meets the GWP threshold, the customer removed the qualifying item(s), the widget's datasource uses the AI-recommended endpoint or any non-deterministic product source (those never resolve to a specific product set and are treated as invalid), or the datasource rule type is unsupported in checkout extensions (URL rules, order tag rules). In all of these cases, the watcher auto-removes the gift to prevent an unintended charge or an orphaned free item.
No discount is applied to the gift at all → gift is removed. If the Rebuy discount never attached to the line, or has since fallen off (for example because a non-combinable discount code was applied at checkout and overrode the gift's free status), the watcher removes the gift so the customer is not charged full price for an item they expected to receive for free. Because Shopify does not allow customers to manually remove items during checkout, this automatic removal is essential to prevent an unexpected charge.
Note: The auto-removal at checkout applies only at the checkout step itself. If a customer navigates back to the cart, the gift item may still be present there. Auto-removal also does not apply to gifts added through the Tiered Progress Bar — customers can remove those directly from the progress bar themselves, and TPB gifts follow the separate Checkout Extensions Tiered Progress Bar path.
Treat as Gift With Purchase (Checkout Offer Widgets)
Checkout offer (recommendation) widgets now include a Treat as Gift With Purchase setting in their Advanced Settings tab. When this setting is enabled, items added by that checkout offer widget are treated by the same GWP watcher as standard GWP items — meaning cart conditions are validated and the gift is automatically removed if those conditions are no longer met, exactly as it would be for a standard Gift With Purchase Widget.
This is useful for any Shopify Plus merchant using a checkout recommendation widget to deliver a GWP offer at checkout rather than a standard GWP widget.
To enable this setting:
Open the checkout offer widget you want to treat as a GWP widget.
Navigate to the widget's Advanced Settings tab.
Confirm that Enable Attribution Tracking is toggled on. The Treat as Gift With Purchase setting cannot be enabled without attribution tracking active.
Toggle Treat as Gift With Purchase to on.
Important dependency: If Enable Attribution Tracking is toggled off after Treat as Gift With Purchase has been enabled, the Treat as Gift With Purchase setting automatically turns off as well and cannot be re-enabled until attribution tracking is turned back on. These two settings are dependent on each other.
Once enabled, the checkout offer widget operates under the same GWP watcher validation as a standard GWP widget. All requirements and limitations in this section apply — Shopify Plus is required, at least one checkout widget must be active on the checkout page, and unsupported rule types (URL rules, order tag rules) are skipped.
Limitations
There are four known limitations to GWP validation at checkout:
Shopify Plus only. Checkout extension functionality is required for the GWP watcher to run, and checkout extensions are exclusive to Shopify Plus.
Unsupported rule types. Datasource rules using URL conditions or order tag rules are not accessible within Shopify checkout extensions. When these rule types are present, validation is skipped rather than evaluated incorrectly — so the gift will not be auto-removed at checkout even when other requirements are met.
Datasource must return specific products — AI recommendation endpoints are not valid. The watcher needs a deterministic product set to validate against. If the GWP widget's datasource uses Rebuy's AI-recommended endpoint or any other non-deterministic product source, the watcher treats the datasource as invalid and auto-removes the gift at checkout — even if the customer still qualifies on subtotal and rule logic. Use a datasource that returns specific products (for example, a product list, collection, or rule-based datasource that resolves to explicit products) for any GWP widget intended to work with checkout validation.
Shopify Markets + fixed pricing edge case. When products use fixed market pricing, the GWP watcher can behave inconsistently for customers shopping in a non-default currency. See the edge case details below.
Edge case: Shopify Markets with fixed pricing
When a store uses Shopify Markets with fixed market prices (rather than dynamic currency conversion), the GWP watcher may incorrectly remove gifts at checkout for customers shopping in a non-default currency. Shopify does not expose currency conversion rates at checkout, which causes the watcher's threshold calculations to use incorrect values.
Problem scenario (different currency + fixed pricing):
Setup: shop default currency is USD, GWP threshold is $10 USD, the customer switches to GBP. Shopify's underlying currency rate is approximately 0.755 (so the converted threshold is roughly £7.55).
Product A: USD price $8, GBP price fixed at £8 (fixed market pricing — not dynamically converted).
In the cart: the GWP calculation converts back to USD and evaluates as
8 × (1 / 0.755) = $10.59→ threshold met → the GWP is added.At checkout: the watcher references the checkout subtotal directly in GBP (fixed £8) → the subtotal appears below the £7.55 converted threshold → the GWP watcher removes the gift incorrectly.
Workaround: if the store uses Shopify Markets with fixed pricing across multiple currencies, test GWP threshold behavior in each currency where fixed prices are in use. Consider setting thresholds that account for the discrepancy, or switch to dynamic (non-fixed) pricing on the products involved in GWP promotions.
Diagnostic Checklist: Where to Start
Before diving into a specific symptom, work through this 5-step diagnostic. Roughly 80% of Rebuy Gift With Purchase (GWP) and discounting issues resolve somewhere in these five steps.
Confirm both Rebuy discounts are Active in Shopify. Go to Shopify Admin → Discounts and verify that both
Rebuy Product DiscountandRebuy Order Discountare in Active status (not Expired, Paused, or Scheduled). If either is missing or inactive, no Rebuy widget discount will apply.Confirm the widget's Shopify Functions discount is enabled. In the Rebuy Admin, open the widget → Discount tab → confirm Discounted By Functions is toggled on (or, for the Tiered Progress Bar, Use Shopify Functions under Advanced Bar Settings; for Bundle Builder, Discount Mechanism set to
Shopify Functions). Without this, Rebuy writes the product into the cart but does not apply a discount. See Prerequisites at a Glance → Shopify Functions discount enablement (per widget) for the exact path and setting name per widget type.Confirm the promotion is actually supported. Check the Supported and Unsupported Promotion Types section below. If what you're trying to build falls into the Not Supported column, the fix is scope correction, not troubleshooting.
Inspect the datasource rules. The majority of 'it is not working' cases resolve to datasource rule misconfiguration — for example, using
Equalsinstead ofContains Any, wrong AND/OR logic, wrong rule order, or rule thresholds that do not match the test cart.Rule out caching. Always test in a fresh incognito browser session — your own configuration changes should be visible immediately in a clean session, but an existing session may still carry stale GWP or attribution data.
If all five checks pass and the issue is still present, move to the specific symptom below.
Note on cache propagation and published changes. When you save a change to a widget, datasource, or Smart Cart configuration, the change is usually visible immediately in the Rebuy Admin but may take a short period to reflect on the live storefront and in active customer carts. Rebuy's cart.js stores session-level data (such as GWP state and cart attribution) on existing customer sessions. This does not affect how quickly your own configuration changes appear: Smart Cart template, CSS, settings, and datasource changes should be visible immediately in a fresh incognito browser session. Shopify's CDN may also serve cached theme assets for a few minutes after a theme update. Before reporting that a change did not take effect, always test in a fresh incognito window rather than an existing browser session.
Common Gift With Purchase (GWP) and Discounting Issues
Rebuy Gift With Purchase (GWP) item is flashing or disappearing from the cart
A Gift With Purchase item that flashes in and out of the Rebuy cart is almost always caused by one of two things.
Cause 1: Wrong datasource rule type. When the datasource rule is set to Equals instead of Contains Any, the rule evaluation can toggle between match and no-match as the cart updates, causing the gift to appear and disappear in a loop. Fix: open the GWP widget → Data Source → change the rule from Equals to Contains Any.
Cause 2: Cart caching. If a widget was recently modified or disabled, stale cached data can cause ghost gifts to appear. Fix: when deactivating a GWP, also set the widget's Shopify Functions discount to None (not just toggling the widget off), and always test in a fresh incognito browser session.
Rebuy Gift With Purchase (GWP) item is not being added (not showing) in the cart
Returning Draft Products: Ensure the gift item is published Active or Unlisted in Shopify. Resyncing may be required if the product's status was recently changed.
Out-of-Stock Products: If the gift product is out of stock and the data source filters out-of-stock items, the widget will not display. Add stock or disable the out-of-stock filter.
Installation Missing: Confirm the widget is installed in your Shopify theme. Without installation, the widget will not function.
Preview Mode Installation Requirement: The GWP widget must be installed into your Shopify theme before it can be previewed using Rebuy's storefront preview mode. Follow the widget's installation instructions by clicking the Installation link located at the top right of the header in the widget's editor.
If a Rebuy Gift With Purchase product is not showing up in the cart when you expect it to, work through these checks in order:
Is the gift product set to a status Rebuy can return, and is it published? Rebuy evaluates Shopify product status at datasource query time. Active products are returned in all datasources. Unlisted products are returned only when explicitly pinned via a Specific Product return in the widget's datasource (they will never surface through AI, Top Sellers, collections, tags, or algorithmic ranking). Draft products are blocked from all datasource responses (and cause a 422 error at Shopify checkout if they reach it). Archived products are blocked entirely. Confirm the gift product is set to Active or Unlisted in Shopify Admin → Products and is published to the Online Store sales channel — Unlisted controls discoverability, not channel availability, so the Online Store channel must remain on. See the Shopify Product Status and Rebuy Behavior table near the top of this article for the full matrix.
Are the datasource eligibility rules configured correctly? Review every rule in the GWP widget's datasource. Cart subtotal, product-in-cart, and quantity rules are the most common sources of misconfiguration. Temporarily simplify to a single rule to isolate the issue.
Does the cart actually meet every rule? The cart must match all rules (when using AND logic) or at least one (with OR logic). Confirm the exact subtotal, exact product, or exact quantity condition is met in the test cart.
Is the customer arriving via a social-media in-app browser? Gifts sometimes fail to add when a customer lands from a Facebook or Instagram link because the in-app browser strips session data. Fix: test the same flow in Safari or Chrome directly. This is not a Rebuy bug — it is an in-app browser limitation.
Duplicate Rebuy Gift With Purchase (GWP) items are being added to the cart
If the same Rebuy gift is being added twice, the cause is almost always one of two things.
Cause 1: Datasource rule misconfiguration. Overlapping rules — for example, two rules that both return the same gift under overlapping cart states — cause a double-add. Review the rules and consolidate.
Cause 2: Third-party app conflict. Another discount or upsell app (for example, Kaching, Discount Ninja, or a competitor GWP app) is adding the same gift. Audit your installed apps for overlap.
Recommended fix: disable the Product Form Redirect setting in the Smart Cart. When Product Form Redirect is enabled, the Smart Cart intercepts add-to-cart events from the theme, which can cause Rebuy to create a second, duplicate add event. Disabling it hands add-to-cart handling back to the Shopify theme and usually resolves the duplicate-gift issue on its own.
How to disable it:
In the Rebuy Admin, go to Smart Carts → [Your Smart Cart] → Global Settings (the gear icon).
Find Product Form Submission Behavior.
Set it to Disabled (Smart Cart does not manage).
Save.
A few safeguards to apply when making this change:
Test the change on a duplicated Smart Cart first if the merchant has a production promotion running.
After saving, confirm that adding a product from the product page still opens / renders the Smart Cart as expected — if it does not, the theme's add-to-cart behavior may need a small adjustment.
Clear the browser cache if the duplicate behavior does not change immediately.
Tiered Gift With Purchase: lower-tier gifts are being re-added at full price when a higher tier unlocks
Symptom: You've built a tiered Gift With Purchase using the Gift With Purchase Widget — a single datasource with multiple cart subtotal threshold rules, each returning a different, unique gift product per tier (for example: 1 free product at $50, 1 different free product at $100, 2 more different free products at $150, another different free product at $200). When the cart crosses into a higher tier (say, reaches $150), the lower-tier gift products that were previously free at the $50 and $100 tiers get re-added to the cart at full price alongside the new higher-tier gifts.
Important scope clarifications.
This applies to the Gift With Purchase Widget specifically — not the Tiered Progress Bar. (TPB tiers are configured under Configure Tiers and don't share this datasource-rule cascade behavior.)
The gift products are all unique per tier (not identical products repeated across data source rules). This is not the duplicate-identical-product behavior covered in the "Duplicate Rebuy GWP items" entry above.
Cause. The datasource's rules don't have "Exit If Matched" enabled. When the cart is at $150, it satisfies the $50+, $100+, AND $150+ rules simultaneously — every threshold condition evaluates true at the same time. Without "Exit If Matched," the datasource fires every matching rule and returns the gift products from each. The previous-tier gifts get added back to the cart, but because they weren't matched through a single qualifying path with attribution carried correctly, the Rebuy Shopify Functions discount does not apply to those re-added lines — so they appear at full price.
Fix. Enable "Exit If Matched" on each rule in the datasource so that only the first matching rule fires and returns its products.
Path: Rebuy Admin → Data Sources → [GWP datasource] → open each rule → enable the "Exit If Matched" toggle → Save.
Order the rules from highest threshold to lowest so the highest qualifying tier matches first and the datasource exits at that point. With "Exit If Matched" enabled and rules ordered top-down by descending threshold, the customer only ever receives the gifts for the highest tier they currently qualify for — no cascading from lower tiers, no full-price re-adds.
Selectable Gift With Purchase (GWP) popup is not appearing in Smart Cart
If the Selectable Gift With Purchase popup is not showing, this is almost always an installation issue. Verify all four of the following:
Installation Verification: Confirm the Selectable GWP popup widget is installed in the Smart Cart editor and enabled in live mode. Use the widget’s Preview Mode to test its behavior on the live site.
The Selectable GWP custom code has been added correctly per the setup guide (See also: "Rebuy Selectable Gift With Purchase Widget Setup Guide").
The store is on the latest Smart Cart version — Selectable GWP requires the latest Smart Cart version and does not work with Legacy Smart Cart.
There are no blocking JavaScript errors. Open the browser DevTools → Console and check for errors that reference Rebuy or the widget ID.
Selectable Gift With Purchase (GWP) popup appears on every page load
If the Selectable GWP popup is appearing on every page load rather than only at the intended qualifying moment, the datasource trigger rule is too broad. Fix: add a cart item count condition (for example, Cart Items Count > 0) to the datasource rule so the popup only fires when the cart actually contains qualifying items — not on every homepage or PDP load.
Rebuy free gift product is being charged full price at Shopify checkout
If a Rebuy Gift With Purchase product is being added to the cart but the customer is being charged full price at Shopify checkout, the Rebuy Shopify Functions discount is not actually being applied. Work through the causes below in order.
Cause 1: Shopify Functions discount is not enabled on the widget. Go to the GWP widget → Discount tab → toggle Discounted By Functions on. For other widget types, the path and setting name differ, and each one is listed under Shopify Functions discount enablement (per widget) in the Prerequisites at a Glance section of this article. Without this, Rebuy adds the product but does not apply the $0 discount.
Cause 2: Rebuy Product Discount is inactive in Shopify. Go to Shopify Admin → Discounts. Confirm Rebuy Product Discount exists and is in Active status. If expired, paused, or missing, the discount cannot fire.
Cause 3: Widget was created before the discount was configured (widget-before-discount trap). If the GWP widget was launched before its Shopify Functions discount was configured, the widget attribution works but the discount may never fire correctly. Fix: toggle the Shopify Functions discount off and on in the widget, or recreate the discount. Future widget work should always configure the discount before enabling the widget.
Cause 4: A third-party app is conflicting with Rebuy's discounting. Some third-party apps install their own Discount API that takes precedence over Rebuy's Shopify Functions discount, which blocks the $0 gift discount from applying. A common example is the FastBundle app, since FastBundle's Discount API overrides Rebuy's discount feature and the Rebuy Smart Cart does not integrate with FastBundle. Fix: audit installed apps for any tool that manages discounts through its own Discount API, and either disable the conflicting app or choose one discounting tool per promotion. If the third-party app is essential to your setup, the GWP will need to be delivered through that app instead of Rebuy.
Cause 5: The Rebuy discount metafield that stores the gift is over Shopify's 10 KB limit. Rebuy stores Gift With Purchase widget discounts in the product-discount-widget metafield and Smart Cart Tiered Progress Bar free gifts in the product-discount-tpb metafield, and Shopify Functions stop reading a metafield above 10,000 bytes. When that metafield is over the limit, the $0 gift discount stops applying with no error in Shopify or at checkout. Fix: go to Settings > Discount Functions Storage in the Rebuy admin and check that metafield's card. If it is over the limit, turn off the Discount section on widgets you no longer use or delete unused Smart Carts until it is back under 10 KB. Full steps are in [Discount Functions Storage: Keep Rebuy Discounts Under Shopify's 10 KB Limit](LINK_NEEDED: new SUPPORT-276 article URL).
Gift With Purchase (GWP) widget eligibility rules are not firing correctly
If the Gift With Purchase is firing when it should not, or not firing when it should, the cause is almost always inside the datasource rules themselves. Work through these checks:
Review every rule in the GWP widget's datasource. Confirm the logic matches the intended conditions — AND versus OR, correct thresholds, correct product IDs or tags.
Exact Product/Variant Matching: Ensure data source rules match exact product or variant IDs to avoid mismatches and ensure accurate rule evaluation.
Use the Datasource Previewer to simulate customer scenarios before making changes. The Datasource Previewer is a built-in testing tool that lets you simulate different carts and customer states and see exactly what products the datasource rules would return — before anything goes live. It is the fastest way to confirm a rule is failing to match. Find it in Rebuy Admin → Data Sources → select the datasource → Preview Ruleset (inside the datasource settings).
Temporarily simplify to a single rule to isolate which condition is the failure point.
Prefer
Contains AnyoverEqualsfor product and tag rules — it is more stable and avoids the flashing-gift failure mode.Use date scheduling inside the datasource rule for time-limited promotions rather than manually toggling the widget on and off. This prevents cache artifacts when promotions end.
Two concept-level points that regularly come up are worth restating on their own
Conditional discount rules in Rebuy datasources are visual only
The Discount Product and Discount Widget return rules inside a Rebuy datasource do not apply an actual checkout discount. They affect widget display only — the actual discount is always scoped to the widget's attribution and is applied by the Shopify Function, not by the datasource branch. If you expect the datasource rule itself to apply a discount, that expectation is wrong.
That said, the Discount Product and Discount Widget rules can be used intentionally as visual-only incentives. They will display the discounted price or incentive messaging inside the widget so the customer sees a promo — but for the actual discount to apply at checkout, the rule must be paired with a manually created automatic discount in Shopify that covers the same products or conditions. In that pairing, the Rebuy datasource rule handles the visual incentive inside the widget, and the manually created Shopify discount does the real discounting at checkout.
If you only need the actual discount to apply (not a separate visual), enable the widget-level Shopify Functions discount instead — it handles both the display and the checkout discount in one setting.
How discount codes affect the Gift With Purchase and Tiered Progress Bar threshold
How a discount code interacts with a Gift With Purchase (GWP) or Tiered Progress Bar (TPB) threshold depends on where the customer enters the code and whether the Storefront API is enabled in the Smart Cart.
Code applied in the Smart Cart's discount code box with Storefront API enabled (recommended setup). Discount codes are validated in real time inside the Smart Cart. If applying the code drops the cart subtotal below the GWP or TPB threshold, the gift is automatically removed from the cart. Multiple discount codes can also be stacked in this mode. This is the current, fully supported behavior and the reason Rebuy strongly recommends enabling the Storefront API.
Code applied in the Smart Cart's discount code box with Storefront API disabled (legacy/deprecated behavior). Discount calculation is deferred to Shopify's checkout, so products that no longer qualify for the gift are not automatically removed from the Smart Cart. Fix: enable the Storefront API in the Smart Cart's discount-input configuration (latest Smart Cart version only). See the live Help Center article "Smart Cart: Discount Codes and Storefront API Integration" for the full setup.
Code applied at Shopify's checkout page (not in the Smart Cart). Behavior at this stage depends on which widget the gift came from — the Tiered Progress Bar or the Gift With Purchase Widget. The two follow different auto-removal paths.
For Tiered Progress Bar (TPB) gifts: Behavior depends on whether you have the Checkout Extensions Tiered Progress Bar enabled. This is a Shopify Plus–only feature (it requires access to the Shopify checkout editor, which is gated to Shopify Plus) and also requires the latest Smart Cart version. Non-Plus stores cannot access it at all.
Without the Checkout Extensions Tiered Progress Bar (non-Plus stores, or Plus stores that have not enabled it): Rebuy cannot auto-remove the TPB gift if the code drops the cart below the threshold. Shopify does not share the updated subtotal with Rebuy at the checkout layer, so Rebuy has no way to detect that the cart no longer qualifies. This is unsupported regardless of the Storefront API setting.
With the Checkout Extensions Tiered Progress Bar enabled (Shopify Plus required, latest Smart Cart version required): the Tiered Progress Bar is mirrored into the Shopify checkout as a Rebuy Smart Component block. When a discount code is entered at checkout, the checkout-side bar recalculates against the new subtotal and TPB gifts are auto-removed if the cart drops below the threshold — unless the Tiered Progress Bar includes an "order discount tier," in which case the bar intentionally does not adjust for the discount code (to prevent stacking the checkout code on top of Rebuy's own order-level discount). Setup path: Rebuy Admin → Checkout Extensions → Progress Bar widget → configure → paste Widget ID in Shopify Checkout Editor as a Rebuy Smart Component block. See the live Help Center article "Using the Checkout Extensions Shipping Tiered Progress Bar" for the full walkthrough.
For Gift With Purchase (GWP) Widget gifts: Rebuy has a separate GWP watcher (GWP validation logic) that runs during Shopify checkout (a different mechanism than the TPB flow above). It monitors cart changes at checkout, re-evaluates the widget's datasource rules, and auto-removes any gift items that are no longer valid — for example, when a customer removes the qualifying product at checkout, or when a discount code drops the cart below the GWP threshold or overrides the gift's free status.
Important distinction: this is not a GWP Widget rendering on the checkout page. No GWP widget displays at checkout. The validation logic simply runs in the background. Only Rebuy Checkout Extension widgets (checkout recommendations, checkout progress bar, checkout content block) can be physically installed on the Shopify checkout page.
Requirements for the GWP watcher to run at checkout:
Shopify Plus only. The logic depends on Shopify's checkout extension framework, which is Plus-gated.
At least one checkout widget must be active on the checkout page. It can be any Rebuy checkout extension — a checkout recommendation, a checkout progress bar, or a checkout content block. Without any checkout widget active, the validation logic is not triggered.
Supported datasource rules only. The validation skips evaluation entirely if the GWP widget's datasource uses rules that are inaccessible inside Shopify checkout extensions — specifically URL rules and order tag rules. In those cases, Rebuy cannot evaluate eligibility at checkout and the gift will not be auto-removed.
Extends to checkout offer widgets via Treat as Gift With Purchase. Checkout offer (recommendation) widgets include a Treat as Gift With Purchase setting in their Advanced Settings tab. When enabled, items added by that checkout offer widget are validated by the same GWP watcher and auto-removed under the same conditions. Requires Enable Attribution Tracking to also be on (the two settings are dependent). See the GWP Validation at Checkout section near the top of this article for the full setup and edge cases.
Limitations of the GWP watcher's checkout auto-removal:
Checkout only, not cart. The auto-removal applies only at the Shopify checkout page. It does not remove the item from the Smart Cart or online store cart. If the customer returns to the cart from checkout, the GWP product may still be present.
Does not apply to TPB gifts. Gifts added by the Tiered Progress Bar are not covered by the GWP watcher — they follow the Tiered Progress Bar path described above. Customers are expected to manually remove TPB gifts from the progress bar if needed.
Shopify Markets + fixed pricing edge case. When products use fixed market pricing, the watcher can incorrectly remove gifts at checkout for customers in non-default currencies (Shopify does not expose conversion rates at checkout). See the GWP Validation at Checkout section for the full edge case.
Smart Flow/Smart Link caveat: If a Smart Flow or Smart Link sends the customer straight from PDP to Shopify checkout (bypassing the Smart Cart entirely), Rebuy's progress-based discounts will not apply — the cart never passes through the Smart Cart layer where the GWP/TPB logic lives.
Display note: The Tiered Progress Bar's "amount remaining" visual uses Shopify's native cart subtotal, which excludes discount codes. The displayed bar may not visually move backward when a code is applied, even though the gift itself is correctly auto-removed by the Storefront API's real-time validation.
Tiered Progress Bar stays completed in the Smart Cart after a discount code drops the cart below the threshold
Symptom: A discount code is applied in the Smart Cart, the cart subtotal drops below the Tiered Progress Bar's unlock threshold, but the TPB continues to display as completed and the gift tier remains unlocked.
This is almost always caused by the "Exclude Discounts from Subtotal" setting being enabled in the Tiered Progress Bar's Advanced Bar Settings. When this setting is on, the TPB calculates against the pre-discount subtotal and ignores discount codes entirely — so even when a code drops the cart below the threshold, the bar stays completed and the gift tier remains unlocked.
Fix: Disable "Exclude Discounts from Subtotal" in the TPB's Advanced Bar Settings.
Path: Smart Cart Settings → Tiered Progress Bar → Advanced Bar Settings → disable Exclude Discounts from Subtotal → Save.
Note: The "Exclude Discounts from Subtotal" setting is only intended for stores running legacy Shopify Scripts configurations. If the store is not using legacy Shopify Scripts, this setting should be off.
Decorative Tier + Selectable GWP Widget gift is not auto-removed when a discount code is applied at Shopify checkout
Symptom: You have the TPB Decorative Tier paired with a Selectable Gift With Purchase Widget. When a customer applies a discount code inside the Smart Cart and drops the subtotal below the threshold, the gift is auto-removed correctly. But when the same code is applied at Shopify's checkout page instead, only the discount falls off the gift line item — the gift product itself remains in the cart, and the customer is charged full price if they proceed without noticing.
This is a limitation of the Decorative Tier + Selectable GWP Widget configuration. The Selectable GWP Widget has no visibility into discount-code changes made at the Shopify checkout layer, so it cannot detect that the cart no longer qualifies and cannot auto-remove the gift. The Rebuy Shopify Functions discount drops off the line as expected, but the gift product itself stays put. This is specific to Selectable GWP Widget — the Selectable GWP configuration does not support checkout-level auto-removal regardless of any other settings.
How to fully resolve gift auto-removal at checkout (Shopify Plus required). Two changes are needed together:
Switch from the Decorative Tier + Selectable GWP Widget to the TPB's native Product Tier. The Decorative Tier setup is not compatible with the Checkout Extensions Tiered Progress Bar, so the Decorative Tier needs to be replaced with a Product Tier.
Enable the Checkout Extensions Tiered Progress Bar. This mirrors the TPB into the Shopify checkout as a Rebuy Smart Component block. When a discount code is entered at checkout, the bar recalculates against the new subtotal and the gift is auto-removed if the cart drops below the threshold.
Setup path: Rebuy Admin → Checkout Extensions → Progress Bar widget → configure → paste the Widget ID into the Shopify Checkout Editor as a Rebuy Smart Component block. See the live Help Center article "Using the Checkout Extensions Shipping Tiered Progress Bar" for the full walkthrough.
Shopify Plus required. The Checkout Extensions Tiered Progress Bar depends on Shopify checkout extensibility, which is only available on Shopify Plus plans. Non-Plus stores cannot access this option.
Trade-off to be aware of. Switching from a Decorative Tier + Selectable GWP Widget to a Product Tier means customers no longer choose their gift — the Product Tier auto-adds a specific gift product when the threshold is met. If gift selection is an important part of the promotion, the Decorative Tier + Selectable GWP Widget is the setup that supports it, but checkout-level auto-removal will not be available with that configuration. You'll need to choose between customer-selectable gifts (no checkout auto-removal) or checkout auto-removal (no customer-selectable gift).
Rebuy Gift With Purchase (GWP) is stuck in the cart and not auto-removing when the cart drops below the threshold
The Gift With Purchase (GWP) Widget is designed to automatically add gifts when its datasource rules match (for example, "cart subtotal ≥ $X") and automatically remove them when the rules no longer match (subtotal drops below the threshold). The catch: auto-add and auto-remove only fire where the GWP Widget is actually rendered and running.
Where the GWP Widget works correctly: product pages, PDP, the Smart Cart drawer, and any other surface where the GWP Widget is embedded and loaded. Add and remove both behave as expected on these surfaces.
Where it breaks — Shopify's native Cart Page and Shopify Checkout. Rebuy widgets do not run on these pages, so the GWP Widget's auto-remove logic has nowhere to execute. The result:
On the Shopify native Cart Page: if the customer removes the qualifying item, the gift stays stuck in the cart because Rebuy cannot re-evaluate the datasource rules without the widget active. If the GWP is configured with a Shopify Functions discount, the discount on the gift line item will drop off at checkout, but the gift product itself will not be auto-removed.
At Shopify Checkout: same behavior by default. No widget means no auto-removal. The Shopify Functions discount comes off, but the gift product remains in the cart — unless the GWP Widget checkout validation logic is running (see requirements below).
Solution 1 — Disable the Shopify native Cart Page so customers never bypass the Smart Cart. This is the cleanest fix in most setups. With "Use Cart Page" disabled, any attempt to navigate to the full cart page redirects the customer to the homepage and auto-opens the Smart Cart drawer instead. Path: Smart Carts → [Your Cart] → Global Settings (gear icon) → disable "Use Cart Page."
Solution 2 — Enable the GWP watcher (GWP validation logic) at checkout to cover the Shopify Checkout case. This lets Rebuy re-evaluate the GWP widget's datasource rules during checkout and auto-remove invalid gift items. Requirements:
Shopify Plus (the logic uses Shopify's checkout extension framework).
At least one Rebuy checkout extension widget must be active on the checkout page — a checkout recommendation, checkout progress bar, or checkout content block. Without a checkout widget, the validation logic is not triggered.
The GWP widget's datasource must not rely on URL or order tag rules (those are inaccessible inside checkout extensions, so validation is skipped).
The gift item must carry GWP widget attribution — either from a standard Gift With Purchase Widget or from a checkout offer (recommendation) widget with the Treat as Gift With Purchase setting enabled in its Advanced Settings (dependent on Enable Attribution Tracking also being on).
See the GWP Validation at Checkout section near the top of this article for the full explainer, including the Shopify Markets + fixed pricing edge case.
Even when running, the checkout validation only removes the gift at the checkout layer — if the customer returns to the Smart Cart or native cart, the gift may still appear. This is why Solution 1 (disabling the Cart Page) is recommended in combination whenever possible.
Customer removed the Rebuy gift and it will not re-add
When a customer manually removes a Rebuy gift, Rebuy stores that removal preference in a browser cookie and intentionally will not re-add the gift — even if the customer re-qualifies during the same session. This is the designed behavior of the Allow Customer to Remove Gift setting.
To override, either:
Disable the
Allow Customer to Remove Gifttoggle in the GWP widget (customers will no longer be able to remove the gift while they qualify). Path: GWP Widget's editor → Widget Settings tab → Gift Options → disable "Allow Customer to Remove Gift."Switch to a Selectable Gift With Purchase setup, which treats removal differently and allows the customer to re-select the gift.
Rebuy gift is still being delivered after the Gift With Purchase (GWP) widget was disabled
When a GWP widget is disabled, existing customer carts that already contain the gift will keep it until those carts are abandoned or cleared. This is expected behavior — Rebuy does not retroactively modify active customer carts when a widget is turned off.
To minimize the persistence window, set the GWP widget's Shopify Functions discount to None before disabling the widget (not just toggling the widget off). This clears the cache trigger and reduces how long the gift persists in active carts. Customers who already received the gift before the widget was disabled can still complete checkout with it — this is unavoidable given Shopify's cart storage behavior.
Rebuy Product Discount or Rebuy Order Discount is paused or inactive in Shopify
Symptom: Rebuy discounts have stopped applying to every Rebuy widget across the entire store at once, not just one widget.
If Rebuy discounts stop applying to any widget across the entire store, the first thing to check is whether the Rebuy-managed Automatic Discount was accidentally paused or deactivated in Shopify. Go to Shopify Admin → Discounts, locate Rebuy Product Discount and Rebuy Order Discount, and reactivate either that is not Active.
This is distinct from the widget-level Shopify Functions toggle. The Admin-level Automatic Discount is the parent and the widget's Functions toggle is the child. Both must be on for discounts to apply.
Important — do not disable or expire Rebuy discounts in Shopify Admin. The Rebuy Product Discount and Rebuy Order Discount entries in Shopify Admin → Discounts are the backbone of Rebuy's Shopify Functions integration. Disabling either, or setting either to "Expired," turns off all Rebuy discount functionality across the entire store — not just one widget. If this has already happened, the fix is to re-enable the discount in Shopify Admin and then clear the Smart Cart and Shopify function caches so the discount logic re-binds.
If you need to stop a specific Rebuy discount, do it at the widget level, not in Shopify Admin. Disable the Shopify Functions toggle inside the individual Rebuy widget's settings (GWP Widget, Tiered Progress Bar, etc.). This scopes the change to just that widget and leaves the global Rebuy discount integration intact.
Non-combinable Shopify discount is overriding the Rebuy discount
Symptom: A Rebuy discount is no longer applying when another Shopify discount is active in the cart, or only one of the two discounts applies when both should stack.
Rebuy's Shopify Functions discounts are set to combine with all other discounts by default. However, your own manually-created Shopify discounts must also be set to combinable for stacking to work. If another store discount is not combinable, Shopify will choose one and override the other — and Rebuy cannot force Shopify to combine discounts that Shopify has not been configured to combine.
Fix: in Shopify Admin → Discounts, open every active discount and enable the Combines with other product discounts and Combines with order discounts options as appropriate.
Before assuming the combinable flag is the problem, check whether both discounts are product discounts targeting the same product, because that pairing behaves differently by Shopify plan. On Shopify Plus, two product discounts can apply to the same product once each one carries a tag the other allows. On every other Shopify plan, Shopify applies one product discount per product and keeps the larger one, no matter how the combinable settings are set.
Marking a product discount as combinable lets it stack with product discounts targeting different products, and it does not by itself place two product discounts on the same product on any plan.
On Shopify Plus, to make a Rebuy product discount and one of your own product discounts both apply to the same product, turn on Enable discount stacking under Settings > Discount Combinations in the Rebuy admin, then tag that Shopify discount rebuy and set its Product discounts combination to Multiple per product allowing rebuy. Tag only the discounts you actually want stacking with Rebuy, since a free gift discounted 100% by Rebuy will also stack with a tagged store discount on that gift's line. Full steps are in Discount Combinations: Stack a Rebuy Discount and a Shopify Discount on the Same Product.
If your store is not on Shopify Plus, the fix is not a combinable-flag change, it is to restructure the promotion so only one product discount targets any given product at a time. You can convert one side to an order-level discount, which combines with a product discount on any plan, narrow one discount's product scope so the two do not overlap, or consolidate the two promotions into a single Rebuy Functions discount with the combined logic.
Shopify's 25-automatic-discount limit has been reached
Symptom: A new Rebuy discount is not generating when a widget is saved, or the Rebuy Admin surfaces a discount-limit warning.
Shopify caps active automatic function-based discounts at 25 per store. Rebuy's Functions-based discounts count toward this total. If a store is at or near the cap, new Rebuy discounts may not generate correctly, and the Rebuy Admin will show a warning.
Fix: audit and deactivate unused automatic discounts in Shopify Admin to get under 25. Rebuy recommends keeping active widget discount rules under 20 per datasource for performance, and keeping the total active automatic function discounts under 25 store-wide as a platform requirement.
Rebuy gift discount persists at checkout after the qualifying product is rapidly removed
If a customer removes the qualifying product and immediately clicks checkout, the gift and its discount can carry through because the cart has not had time to refresh. This is a known edge case of Rebuy's attribution-based discounting and is a Shopify-level timing issue, not a Rebuy bug.
The fix depends on which tool is delivering the gift:
For Gift With Purchase (GWP) Widget gifts (Shopify Plus — recommended): enable the GWP watcher (GWP validation logic) at checkout. When you have at least one Rebuy checkout extension widget active on the checkout page (a checkout recommendation, checkout progress bar, or checkout content block), Rebuy re-evaluates the GWP widget's datasource rules at checkout and auto-removes gift items that no longer qualify — which resolves this rapid-removal edge case directly. Requires Shopify Plus, and the GWP widget's datasource must not rely on URL or order tag rules (those are not supported inside checkout extensions). Also covers gifts added by checkout offer widgets with Treat as Gift With Purchase enabled. See the GWP Validation at Checkout section for full details.
For Gift With Purchase (GWP) Widget gifts (non-Plus Shopify stores, or Plus stores without a checkout extension widget active): add a Pre-Purchase Popup Widget to force a cart-update step before the customer reaches checkout. This is the recommended workaround when the GWP Widget checkout validation logic is not available — the popup interrupts the rapid click-through and gives the cart time to refresh and revalidate.
For Tiered Progress Bar gifts: enable the Checkout Extensions Tiered Progress Bar (Shopify Plus only), which mirrors the progress bar into checkout and re-validates cart contents there, clearing the gift if the cart no longer qualifies.
Without one of these, there is no way to guarantee the discount is removed in this rapid-action scenario.
Rebuy discount is still applied after the customer switches to a subscription
If a customer adds a product via a Rebuy widget with a discount applied, then clicks "Switch to Subscription" on that line item, the widget discount persists on the subscription variant. The Rebuy Shopify Function only checks widget-ID attribution on the line item and has no awareness of the Switch-to-Subscription event.
Workaround: hide the Switch to Subscription button via CSS on cart items that carry Rebuy widget attribution. This is a CSS-only fix, not a Rebuy-side fix — Rebuy cannot detect this event at the discounting layer.
Third-party discount app is overriding Rebuy's discount at checkout
When Rebuy discounts stop applying at Shopify checkout but look correct in the Smart Cart, a third-party discount app is often overriding Rebuy's discount at the checkout layer. Apps commonly involved: Kaching, Discount Ninja, FastBundle, and similar checkout-discounting or Discount API–based apps. FastBundle is a particularly common culprit because its Discount API blocks Rebuy's Shopify Functions discount from applying — only one discount tool can own the promotion in that pairing.
Fix: audit the installed apps for any tool that manages discounts through its own Discount API and confirm combinable settings across all discount-producing apps. If the third-party app does not support combinable discounts at all (FastBundle's Discount API is one example), only one of the two discounts will apply and you'll need to choose which tool owns that promotion — either disable the conflicting app or turn off Rebuy's Shopify Functions discount on the affected widget.
Gift With Purchase (GWP) widget and Tiered Progress Bar (TPB) are conflicting
Symptom: Gifts are being double-triggered, duplicated, or the discount is behaving inconsistently when both a GWP Widget and a Tiered Progress Bar are configured against the same promotion.
Running both the Gift With Purchase widget and the Tiered Progress Bar (TPB) against the same promotion at the same time can cause double-triggering of gifts and inconsistent discount behavior.
Best practice: use one tool per promotion. If running a spend-threshold GWP, configure it either in the GWP widget or in the Tiered Progress Bar — not both simultaneously. If a visual progress indicator is needed alongside a GWP, use the Tiered Progress Bar's Decorative tier type (which provides the visual indicator only) paired with a separate GWP widget that handles the actual discount logic.
Bundle Builder "Included Gift With Purchase" product stays in the cart but customer is charged for it after conditions are no longer met
This is an important scope-and-expectation gap worth flagging up front: the Included Gift With Purchase feature in Bundle Builder applies its discount through Shopify Functions, but it does not include the GWP watcher (GWP validation logic) that the standard Gift With Purchase Widget, Selectable GWP Widget, and Checkout Extensions (with Treat as Gift With Purchase) use. That means Bundle Builder GWP gifts do not auto-add or auto-remove based on cart conditions after the customer leaves the Bundle Builder page.
What actually happens when conditions change: the gift product stays in the cart, but the Shopify Functions discount tied to the bundle falls off the line item. The customer sees the gift in the cart at full price, and if they check out without noticing, they are charged full price for a product they expected to be free (or partially discounted).
Why: Bundle Builder's gift flow is built around the bundle-tier logic on the Bundle Builder page itself, not a continuous cart-state watcher. Rebuy's GWP watcher only runs for widgets that carry GWP-widget attribution — Bundle Builder gift items do not, so the watcher never evaluates them.
Recommended fixes / alternatives:
If auto-add/auto-remove is required, do not use Bundle Builder's Included GWP for that promotion. Use a Gift With Purchase Widget or Selectable Gift With Purchase Widget instead — both include the GWP watcher logic and will correctly remove the gift if conditions change. For Shopify Plus merchants who want the behavior at the checkout layer, a Checkout Extensions recommendation widget with Treat as Gift With Purchase enabled also provides this logic.
If Bundle Builder's Included GWP is the required tool (for example, you want the gift delivered inside the Bundle Builder flow specifically), plan your promotional messaging around the fact that the gift does not auto-remove. Customers may need to manually remove the gift if they change their bundle after leaving the Bundle Builder page. Monitor for full-price charges on gift SKUs as a sign that this gap is affecting customers.
Do not conflate "Shopify Functions is enabled" with "GWP auto-removal is working." The Shopify Functions discount is what brings the gift to $0 (or the configured partial discount) at the time of bundle completion. The GWP watcher is a separate feature that re-evaluates eligibility after the bundle is completed. Bundle Builder Included GWP has the first but not the second.
Smart Flows multi-tier Buy X Get Y (BXGY) popups are firing all at once instead of in sequence
When you build a multi-tier BXGY promotion in Smart Flows (for example: spend $100 to unlock Gift A, spend $200 to unlock Gifts A and B) and all of the selection modals fire at the same time, the cause is almost always that the tiers are stacked vertically in the flow.
Fix: rebuild the flow horizontally. In Smart Flows, build multi-tier BXGY offers as horizontal branches so each tier triggers its own modal in sequence as the customer crosses each threshold. Vertical multi-tier builds intentionally fire every downstream modal at once — that is not a bug, it is how the flow structure resolves. If the customer should see one modal per tier as they unlock it, the branches have to be horizontal.
Smart Flows Buy X Get Y (BXGY) gift variant selection modal always appears for gift products with multiple variants
If a Smart Flows BXGY gift product has multiple variants (for example, size or color), the variant selection modal will always appear to the customer before the gift is added. There is currently no setting to bypass or skip variant selection for BXGY gifts.
Workarounds: if variant selection must be avoided, either (a) use a gift product with only a single variant, (b) create a dedicated gift-only SKU with no variant options, or (c) switch to a standard Gift With Purchase Widget or Selectable Gift With Purchase Widget, which handle variant behavior differently. Smart Flows BXGY is not the right tool when silent variant selection is a requirement.
$0 Rebuy gift product is being exploited by customers on the product page
Symptom: A gift product priced at $0 in Shopify is being added to customer carts directly from the product page (PDP) — bypassing the Rebuy GWP widget entirely. Rebuy's discount attribution only applies to items added through the widget, not items added from the PDP, so customers can add unlimited copies for free.
There are two supported fixes, plus a Shopify Plus limitation to be aware of:
(Recommended) Assign the gift product a real price in Shopify and let the Rebuy Shopify Functions discount bring it to $0 when added through the widget. The PDP shows the real price, so customers cannot add the product for free from the PDP. This is the most robust fix and is also the only setup compatible with the GWP watcher (GWP validation at checkout) on Shopify Plus — see the limitation below.
(Alternative) Set the gift product to Shopify Unlisted status. Shopify's Unlisted status hides the product from collections, storefront search, internet search, and Rebuy AI/recommendation surfaces, while still allowing Rebuy to surface it via a Specific Product return in the GWP widget's datasource. This has replaced older "hidden product" workarounds (such as the
seo.hiddenmetafield andexclude_rebuytag), which are only needed for products that must remain Active. Unlisted is the cleanest setup for stores that want to keep the gift priced at $0 in Shopify and skip the Functions discount entirely. Path: Shopify Admin → Products → [gift product] → Status → Unlisted → Publish to Online Store → Save. See the live Help Center article "Using Unlisted Products for Gift with Purchase Offers" for the full setup.
Unlisted + $0 limitation: Unlisted does not eliminate the exploit risk completely. The product page remains accessible via direct URL even when Unlisted, so determined customers who find the URL can still add the $0 product to their cart from the PDP. Depending on the store's theme, app stack, and sitemap configuration, the URL may also surface in unexpected places. To reduce (not eliminate) this risk, follow the live Help Center article "Remove the Add to Cart Button on the Product Page" to strip the buy button on the gift's PDP. For a fully robust fix, use the recommended option above (real price + Shopify Functions discount).
Unlisted + $0 limitation: incompatible with the GWP watcher at checkout (Shopify Plus only). Rebuy's GWP validation logic at checkout (the GWP watcher) requires that an active Rebuy discount be applied to the gift line item before allowing it through. A $0 Unlisted gift has no Rebuy Functions discount on the line — by design, since no discount is needed to make a $0 product free — so the watcher sees no discount and auto-removes the gift at checkout. Shopify Plus stores that need the GWP watcher should use a real-priced gift with a Shopify Functions discount instead.
Why $0 Unlisted still has a use case. Stores running stacked promotions, seasonal sale discounts, loyalty discounts, or third-party Discount API apps can run into Shopify constraints that block a Rebuy Functions discount from applying — Shopify's same-product discount rule, the 25-automatic-discount cap, or third-party Discount API conflicts. The $0 Unlisted approach removes the need for a Rebuy Functions discount entirely (no Function consumed, no combinability conflict possible), at the cost of the GWP watcher compatibility called out above. Treat it as an intentional trade-off, not a default.
Error Messages Reference
"This discount code is no longer valid. The code has expired."
Cause: A discount code that was applied in the Smart Cart was later deactivated or expired in Shopify, but remains cached in the customer's browser local storage. The Smart Cart re-applies the cached code on page load, then errors when Shopify rejects it.
"Your cart does not contain the eligible items for this discount."
Cause: The Smart Cart is evaluating discount eligibility differently than Shopify checkout — usually because the Storefront API is not enabled, so the Smart Cart cannot perform real-time validation against Shopify's live cart.
Fix: enable the Storefront API in the Smart Cart's discount-input configuration.
"the specified cart does not exist" (Storefront API error)
Cause: The StorefrontDiscount key is missing from the discount payload when the product was added through a Rebuy Smart Cart widget rather than from the PDP. This is a known edge case and may indicate a Rebuy-side bug.
Fix: confirm the Storefront API is enabled in the Smart Cart configuration. If it is enabled and the error persists, reach out to Rebuy Support with your store URL and a reproducible cart link.
InstructionCountLimitExceededError (Shopify Functions)
Cause: The Shopify Functions discount is hitting Shopify's per-function execution resource limit. This is almost always triggered by unusually large carts (200+ line items), which in practice means bot traffic — legitimate customer carts do not hit this limit.
Fix: safe to ignore for legitimate customers. Rebuy's migration to the new Discount API (built in Rust for higher per-function performance) will resolve this class of error on large carts. If the error is affecting real customers, contact Rebuy Support.
"Access denied for discountAutomaticAppCreate" (on latest Smart Cart save)
Cause: Your Rebuy session does not have the write_discounts Shopify scope, so Rebuy cannot create the required Automatic Discount. Usually means the email on the Rebuy user does not match the Shopify admin email, or you're logged in as a non-owner staff account.
Fix: clear Shopify and Rebuy session cookies, re-log into Shopify as the store Owner account, and verify the email on the Rebuy user matches the Shopify owner email. Then re-save the Smart Cart.
Debugging Tools & Workflow
When the diagnostic checklist does not resolve the issue, work through these debugging steps to isolate the root cause.
Step 1: Verify Rebuy discounts are active in Shopify
Open Shopify Admin → Discounts. Confirm both Rebuy Product Discount and Rebuy Order Discount exist and are in Active status. Expired, Paused, or Scheduled discounts will not apply. This is the single most common root cause and is worth re-checking even if you already have.
Step 2: Use the Datasource Previewer to simulate the rule outcome
The Datasource Previewer is a built-in testing tool that lets you simulate different customer carts and scenarios and see exactly what products the datasource rules would return — before anything goes live. It is the fastest way to confirm whether a rule is actually matching the cart state you expect it to.
Where to find it: Rebuy Admin → Data Sources → select the datasource → Preview Ruleset (inside the datasource settings).
Use it to: verify that the intended products are being returned for a qualifying cart, reproduce the exact cart state you're investigating, and rule out rule misconfiguration before digging into cache, attribution, or Shopify Functions issues.
Step 3: Inspect the browser Network tab for failed discount calls
Open the store in an incognito browser with DevTools → Network tab open. Load the Smart Cart and add a test product. Look for POST requests to Rebuy's discount endpoints. A response body containing "successful": false indicates the discount is failing server-side — check the error payload for the specific reason.
Step 4: Check widget metafields and all live discounts in the Shopify Admin
Open the widget in Rebuy Admin and inspect the metafield data for malformed fields, missing widget IDs, or leftover configuration from a previous version. Malformed metafields cause attribution failures that look like "the discount just is not firing."
Then go to https://rebuyengine.com/admin/discounts/ in the browser to see all the live discounts running on the store — not just Rebuy's. Review each discount's metafield data for errors, missing discounts, or malformed data. This view is essential for catching conflicting third-party discounts, duplicate Rebuy discounts, or a missing Rebuy Product Discount / Rebuy Order Discount entry that Step 1 might have passed on a surface check.
Step 5: Inspect line item properties for widget attribution
In the browser DevTools Console on the storefront, run Rebuy.SmartCart.items() and inspect the properties object of the test line item. Confirm it contains a _rebuy_widget_id (or similar attribution key). Missing attribution means the product was added through a non-Rebuy flow, so the discount will never apply.
You can also check for Rebuy attribution after the order is placed by opening the order in Shopify Admin → Orders and expanding the relevant line item. When an item is purchased through a Rebuy widget, the Shopify order line item carries Rebuy attribution values (for example _rebuy_widget_id and related properties) that identify which specific widget delivered the gift or discount.
If the Shopify order line item does not contain a Rebuy attribution property, the issue is very likely not a Rebuy problem — the product was added through a non-Rebuy flow (PDP direct-add, a third-party app, a Shopify automatic discount, etc.), so Rebuy's discount logic was never in the path. Use this check to quickly rule Rebuy in or out before deeper debugging.
Step 6: Test in a fresh incognito browser session
Always re-test in a clean incognito session before escalating.
Note on cancelled orders: If you cancel an order in Shopify and the discount appears to have been stripped from the Admin line-item view, that is a Shopify display behavior — the original charge and discount data are preserved in the order payload and confirmation email. See the FAQ "Why does a Rebuy discount look stripped in Shopify Admin after I cancelled the order?" for the full explanation.
Rebuy Gift With Purchase (GWP) — Supported and Unsupported Promotion Types
For the full scope matrix with every edge case, see the internal reference "GWP & Discount Promotion Types — Full Reference". The summary below is current as of April 2026.
Supported
Standard Gift With Purchase triggered by a cart subtotal threshold
Tiered Gift With Purchase with multiple spend tiers and different gifts per tier
Selectable Gift With Purchase where the customer chooses their gift (requires the latest Smart Cart version)
B2XG2Y — Buy 2X, Get 2Y fixed, non-scaled, different product
Scaled BXGY where the gift product differs from the qualifying product
BXGX fixed (Buy X, Get same X, non-scaled) — requires
Product Contains X → Return XruleURL and UTM parameter-based GWP triggers (UTM recommended over URL for session persistence)
Mystery Gift via dummy product or Decorative tier on the latest Smart Cart version
Country and geo-targeted GWP via geolocation datasource rules
GWP that excludes gift cards, via
Cart Does Not ContainruleStacking multiple discount codes in the Smart Cart (requires Storefront API on the latest Smart Cart version)
Smart Flows Buy X Get Y with flexible qualifiers and built-in Shopify Functions discounting
Partially supported
GWP checkout validation — Shopify Plus only, requires ≥1 active checkout widget, and ignores URL and order-tag rules (those rules are skipped at checkout)
Gift With Purchase with subscription products — any subscription in the cart triggers the gift; you cannot target a specific subscription product
GWP used alongside the Tiered Progress Bar — possible but not recommended; use one tool per promotion
Bundle Builder discounting — supported, but there is no setting to cap the number of items eligible for the discount once the unlock threshold is met
Not supported
GWP unlocked via a checkout extension or a checkout recommendation widget — Rebuy JavaScript cannot run on the Shopify checkout page
Scaled BXGX same-item loops (Buy 1X Get 1X, Buy 2X Get 2X of the same product) — creates an infinite add loop
Scaled BXGY 1:1 with different products — workaround-only via custom JavaScript listeners
"Buy 3 Get 1 Scaled" where every 3 items unlocks another gift — the gift counts as a cart item and breaks the math
Variant-level GWP rules (for example, only "Pink" color triggers a gift) — Rebuy datasources operate at the product level
"Buy X from Collection A, Get Y from Collection A" — auto-removal breaks because the gift itself satisfies the collection rule
"Buy X from Collection, Get % Off" via Rebuy Functions — workaround: Dynamic Bundle Widget with Bundle Protection
Subscription products as gifts
Tiered Progress Bar gift auto-removal at Shopify checkout when a discount code drops the cart below the threshold — unsupported by default because Shopify does not share the updated subtotal with Rebuy at checkout. Exception: Shopify Plus stores running the latest Smart Cart version with the Checkout Extensions Tiered Progress Bar enabled do get auto-removal at checkout, except when the TPB contains an "order discount tier" (bar intentionally holds steady to prevent double-discounting).
GWP Widget gift auto-removal at Shopify checkout — supported on Shopify Plus when at least one Rebuy checkout extension widget (recommendation, progress bar, or content block) is active on the checkout page and the GWP widget's datasource does not rely on URL or order tag rules. Also extends to gifts added by checkout offer (recommendation) widgets that have the Treat as Gift With Purchase setting enabled in their Advanced Settings (requires Enable Attribution Tracking to also be on). Removal occurs at the checkout layer only; the gift may still appear if the customer returns to the Smart Cart. Unsupported on non-Plus stores, when no checkout extension widget is active, or when the datasource uses URL or order tag rules. Edge case: Shopify Markets with fixed market pricing can cause the watcher to remove gifts incorrectly in non-default currencies.
Maximum-use limits on Rebuy Functions discounts — use manual Shopify Discount Codes if a cap is required (Rebuy does not manage those)
Rebuy applying or controlling free shipping — the Shipping Progress Bar is visual only; shipping rules must be set in Shopify
Shopify Platform Constraints
These are not Rebuy limitations — they are Shopify-platform behaviors that every Rebuy merchant inherits.
Shopify's 25 automatic discount cap. The store cannot have more than 25 active automatic function-based discounts. Rebuy's Functions discounts count toward this total.
Shopify's 10 KB discount metafield limit. Shopify Functions stop reading a discount metafield above 10 KB (10,000 bytes), so every Rebuy discount stored in a metafield over the limit stops applying at checkout with no error. Check each Rebuy discount metafield's storage under Settings > Discount Functions Storage in the Rebuy admin.
Two product discounts on the same product depend on your Shopify plan. On Shopify Plus, Shopify applies two product-level discounts to the same line item when each discount carries a tag the other allows, which Rebuy configures on its side through Enable discount stacking under Settings > Discount Combinations. On every other Shopify plan, Shopify picks one product discount per line item, the one worth more to the customer, and ignores the other. The "combinable" discount setting is separate on every plan: it allows product discounts to stack with product discounts targeting different products. Where stacking on one product is needed and the store is not on Plus, one of the discounts has to be an order-level discount, or the product scopes have to be restructured so they do not overlap. See Discount Combinations: Stack a Rebuy Discount and a Shopify Discount on the Same Product.
Rebuy JavaScript cannot run on the Shopify checkout page. This is why GWP cannot be unlocked via a checkout widget — the JavaScript runtime is unavailable.
checkout.liquidis deprecated and is no longer an option.Legacy Smart Cart cannot access the Storefront API. Real-time discount validation, stacked discount codes, and auto-removal of non-qualifying gifts all require the latest Smart Cart version.
Rebuy Functions discounts do not support a max-use limit. There is no per-customer cap. If you need a cap, use manual Shopify Discount Codes — which Rebuy does not create or manage.
Cancelled orders visually strip the discount in Admin. The discount data still lives in the order payload and confirmation email; the Admin line-item view is misleading after cancellation.
Shopify has final say on discount combinability. Rebuy's discounts are set to combine by default, but if other store discounts are not combinable, Shopify — not Rebuy — decides which one applies.
Multi-currency and Shopify Markets. Shopify — not Rebuy — handles all currency conversion and rounding at the cart and checkout layer. On stores using Shopify's dynamic currency conversion, GWP subtotal thresholds are evaluated against the converted cart subtotal, which can cause small rounding differences to push a cart just above or below a threshold in non-default currencies. On stores using Shopify Markets with fixed market pricing (prices manually set per currency rather than dynamically converted), the GWP watcher can also behave inconsistently at checkout because Shopify does not expose currency conversion rates to checkout extensions — see the Shopify Markets edge case in the GWP Validation at Checkout section. When running a GWP across multiple currencies, always test threshold behavior in each active currency before launch.
Additional Frequently Asked Questions
Do free Rebuy Gift With Purchase items count toward RGR (Revenue Generated by Rebuy) billing?
Free Rebuy Gift With Purchase items do not count toward Revenue Generated by Rebuy (RGR) calculations or Rebuy billing tiers. Only items with a non-zero post-discount price are counted, and they are counted at their discounted price — not their original price. A $0 gift returns zero billable revenue.
Why does a Rebuy gift discount still appear in order confirmation emails after the gift was removed?
A Rebuy Gift With Purchase discount can still appear in Shopify's order confirmation email or order.json even after the gift was removed at checkout. This is Shopify's behavior — once Shopify writes a discount line into the order payload, the line persists in the stored order object. Rebuy cannot retroactively edit that record. This is cosmetic only and does not charge the customer.
How do I exclude gift cards from triggering a Gift With Purchase?
For Gift With Purchase (GWP) Widgets — use the built-in Exclude Items setting. The GWP Widget has a dedicated "Exclude Items" option in its settings that ignores gift cards (and digital items) from cart totals, line counts, and item counts — so they will not count toward the GWP qualifying threshold. Path: GWP Widget's editor → Widget Settings → General → Exclude Items → check Gift Cards (and Digital Items if also needed). This setting is available on GWP Widgets only — it does not appear on other widget types.
For the Tiered Progress Bar (TPB) — use the "Search Products to Exclude" setting (Shopify Functions only). The Tiered Progress Bar has its own exclusion setting that lets you exclude specific products or variants (including gift cards) from counting toward the TPB's unlock subtotal and from receiving the tier's Order Discount. It requires Rebuy's Shopify Functions to be enabled on the TPB.
Path: Smart Cart → Tiered Progress Bar settings → enable Use Shopify Functions (Recommended) → use the Search Products to Exclude input to select the products or variants to exclude → save.
Important TPB-exclusion behavior:
Exclusion applies across all three tier types. The excluded product is ignored by Free Shipping, Product Discount, and Order Discount tiers. There is no way to exclude a product from just one tier (for example, you cannot exclude it from Free Shipping but keep it eligible for Product Discounts).
Free Shipping tier — exclusion is "unlock-only." The excluded product will not contribute to the Free Shipping unlock subtotal (visually), but once the tier is unlocked, the excluded product will still receive Free Shipping. Exclusion prevents the product from helping trigger the tier, not from benefiting once the tier is active.
Order Discount tier — exclusion is full. The excluded product is blocked both from contributing to the unlock subtotal and from receiving the Order Discount.
For any other widget type, or for more granular control: add a Cart Does Not Contain rule to the widget's datasource that targets the specific gift card product. This auto-removes the free gift whenever a gift card is in the cart and works across widget types that do not have the built-in Exclude Items or Search Products to Exclude toggle.
Why does a Rebuy discount look stripped in Shopify Admin after I cancelled the order?
Shopify strips the discount from the Admin line-item view when an order is cancelled. This makes it look as though the customer was charged full price. The discount data is preserved in the order confirmation email and the order.json payload — the original charge was correct. This is Shopify behavior, not a Rebuy bug.
Why is my Gift With Purchase being removed at checkout even though the customer still qualifies?
If the GWP watcher (GWP validation logic) is auto-removing a gift at Shopify checkout even though the customer's cart still meets the widget's eligibility rules, the root cause is almost always one of the following. The watcher treats each of these as a reason to remove the gift as a safety measure — not because the customer failed to qualify on subtotal or product rules:
The GWP widget's datasource uses the AI-recommended endpoint (or any non-deterministic product source). The watcher can only validate against a datasource that resolves to a specific, deterministic set of product IDs. AI recommendation endpoints do not return a stable product set, so the watcher treats the datasource as invalid and removes the gift at checkout every time. Fix: switch the widget's datasource to one that returns specific products (a product list, collection, or rule-based datasource that resolves to explicit product IDs).
The GWP widget's datasource uses URL-based rules. URL rules are not accessible inside Shopify Checkout Extensions, so the watcher cannot evaluate them at checkout. When present, the watcher skips validation and may auto-remove the gift. Fix: switch to UTM parameter rules (which persist through session) or restructure the datasource to use product/collection/subtotal rules instead.
The GWP widget's datasource uses order tag rules. Order tag rules are also unavailable inside Checkout Extensions for the same reason. Fix: restructure the promotion to rely on cart-level rules that are evaluable in checkout.
The gift line item has no active Rebuy discount applied to it. The watcher requires both a valid datasource and an active Rebuy discount on the gift line. If no Rebuy Functions discount is on the line, the watcher removes the gift even when eligibility rules still pass. Common causes: the gift product is priced at $0 in Shopify with no Shopify Functions discount applied (for example, a $0 Unlisted gift — the Functions discount was intentionally skipped, but the watcher requires one); the Shopify Functions toggle is off in the widget; the
Rebuy Product Discountautomatic discount in Shopify Admin is paused or disabled; or a non-combinable discount or third-party Discount API has overridden the Rebuy discount on the gift line. Fix: give the gift a real price in Shopify and use the widget's Discounted by Functions / Shopify Functions setting to bring it to $0 (or the configured partial discount) for qualifying customers — this puts a Rebuy discount on the line and lets the watcher allow the gift through.
Other possibilities to rule out: the cart is being evaluated in a non-default currency on a Shopify Markets store with fixed pricing (see the Shopify Markets edge case in the GWP Validation at Checkout section), or the gift line item lost its Rebuy attribution somewhere in the flow (run Rebuy.SmartCart.items() in the console and confirm the _rebuy_widget_id property is present). See the GWP Validation at Checkout section for the full requirements and decision matrix.
What happens if a customer applies a discount code on top of a Gift With Purchase?
Whether a discount code stacks with a Gift With Purchase depends on Shopify's combinability rules, which Rebuy cannot override. Three scenarios cover the majority of cases:
The discount code stacks cleanly with the GWP. Both discounts are combinable, do not exceed Shopify's limits, and target different products (or one is product-level and the other order-level). The customer sees both discounts applied — the GWP stays free (or at its configured partial discount) and the discount code applies to the rest of the cart.
The discount code overrides the GWP. Your discount code is not set as combinable in Shopify Admin (either the "Combines with other product discounts" or "Combines with order discounts" option is off, depending on the discount type). Shopify will apply only one discount — typically the larger — and the GWP's $0 or partial discount is blocked. Fix: open the discount code in Shopify Admin → Discounts and enable the appropriate combinable options. Rebuy's Functions discounts are combinable by default, but every other store discount must also be explicitly set to combine.
The discount code and the GWP both target the same product. What happens here depends on your Shopify plan. On Shopify Plus, both product discounts can apply to that product once each carries a tag the other allows, which means turning on Enable discount stacking in the Rebuy admin and tagging the code
rebuywith its Product discounts combination set to Multiple per product allowingrebuy. Because a Rebuy gift is itself a product discount, a code tagged this way stacks on the gift's line too, so tag only the codes you want behaving that way. On every other Shopify plan, Shopify applies one product-level discount to the product regardless of the combinable setting, keeping the one worth more to the customer and ignoring the other. The fix on those plans is to restructure so only one product discount targets the same product, by converting one side to an order-level discount, by narrowing product scopes so they do not overlap, or by consolidating into a single Rebuy Functions discount. Setup steps for Plus stores are in Discount Combinations: Stack a Rebuy Discount and a Shopify Discount on the Same Product.
Additional edge cases to watch for:
Code drops the cart below the GWP threshold. If the discount code reduces the subtotal below the GWP's unlock amount and the Storefront API is enabled in the Smart Cart (latest Smart Cart version), the gift is auto-removed in real time. If the code is applied at Shopify checkout instead of in the Smart Cart, the GWP watcher (Shopify Plus only) handles the auto-removal. See "How discount codes affect the Gift With Purchase and Tiered Progress Bar threshold" for the full behavior matrix.
Shopify's 25-automatic-discount cap. Rebuy's Functions discounts count toward Shopify's 25-active-automatic-discount limit. If a store is at the cap, new Rebuy discounts may fail to generate.
Can I trigger a Gift With Purchase with a specific discount code?
A specific discount code can trigger a Gift With Purchase by pairing the GWP widget with the IF Discount Code data source rule. In the GWP widget's data source, set the IF rule to Discount Code, choose Equals or Contains, enter the code, and set the RETURN to a Specific Product (the gift). The Discount Code data source rule reads only codes the shopper enters, so a Shopify discount set to apply automatically with no code is not captured, while the same offer distributed as a code that shoppers type in does fire the rule. The rule is not supported on Post Purchase Offer widgets. For the full rule reference and Buy One Get One setup steps, see Discount Codes as a Condition Input for Data Sources.
The discount code has to exist and be active in Shopify.
A code that has never been created in Shopify, or that is expired or deactivated, shows an error in the discount field and does not fire the Discount Code data source rule. A code that is active but does not yet apply to the cart, such as a Buy X Get Y code whose reward product has not been added, does fire the rule on a Gift With Purchase widget, so the widget adds the reward product and Shopify then applies the discount. When the Shopify code is what discounts the reward product, leave the GWP widget's Shopify Functions discount set to None, because two product discounts targeting the same line item is a Shopify combination conflict and Shopify applies one and ignores the other.
How do I enable the Storefront API in the Smart Cart?
The Storefront API is enabled through Smart Cart settings. It turns on automatically the moment a Discount Code Input component is added to the Smart Cart, and the "Use Storefront API" toggle becomes available on that component.
Path: Smart Cart editor → Footer section → Add + → Discount Code Input component → enable Use Storefront API → Save.
Note: The Storefront API is only available on the latest Smart Cart version. Legacy Smart Cart cannot access real-time validation, stacked discount codes, or auto-removal of non-qualifying gifts — so if the Storefront API toggle is not visible, confirm the store is on the latest Smart Cart version first.
Are Tiered Progress Bar tiers limited to cart subtotal thresholds?
Yes. Tiered Progress Bar tiers in Rebuy are triggered exclusively by cart subtotal thresholds, set via the Unlock Price on each tier. There is no built-in setting to change when a tier activates based on other conditions — TPB tiers do not support triggering by specific products in the cart, item count, customer tags, UTM parameters, URLs, or any other rule type.
If you need gift or reward logic that responds to conditions beyond cart subtotal, use a Gift With Purchase Widget (which supports the full Rebuy datasource rule set) or Smart Flows (which supports cart subtotal, item quantity, date ranges, UTM parameters, and more) instead. Both support a much wider range of trigger conditions than the TPB.
Can I offer a Gift With Purchase at a partial discount (for example, 50% off) instead of free?
Yes — partial discounting is broadly supported across Rebuy widgets. With the single exception of the Tiered Progress Bar's Free Product tier (which is fixed at 100% off), every Rebuy widget that applies a discount to a product can be configured with a specified discount amount — percentage off, fixed amount off, or 100% (free). That includes the GWP Widget, Selectable GWP Widget, Smart Flows BXGY, Post Purchase, Bundle Builder, checkout recommendation widgets, cross-sell and upsell widgets, and the Tiered Progress Bar's Product Discount and Order Discount tier types.
The important nuance: if you need a partial-discount gift product that also auto-adds and auto-removes based on cart conditions (the defining "gift with purchase" behavior — the item appears when the customer qualifies and is removed when they no longer do), that auto-add/auto-remove logic is specifically a feature of the Gift With Purchase Widget, the Selectable Gift With Purchase Widget, and Checkout Extensions recommendation widgets with the Treat as Gift With Purchase setting enabled (Shopify Plus only). Other widgets can apply a partial discount, but they do not include the GWP watcher's rule-based add/remove logic.
So the recommended paths depend on whether the auto-remove behavior is required:
Partial discount + auto-add/auto-remove GWP logic (most common ask): use a Gift With Purchase Widget or a Selectable Gift With Purchase Widget and configure the desired discount percentage in the widget's Shopify Functions discount setting.
Partial discount + GWP watcher behavior delivered at Shopify checkout (Shopify Plus only): use a Checkout Extensions recommendation widget with Treat as Gift With Purchase enabled in the widget's Advanced Settings. Configure the discount in the widget's Discount tab with Shopify Functions enabled. Once Treat as Gift With Purchase is on, the same GWP watcher that runs for standard GWP Widgets will validate the gift at checkout and auto-remove it if cart conditions are no longer met. See the GWP Validation at Checkout section for the full requirements.
Partial discount + a visual cart-progress milestone + auto-add/auto-remove: pair a Tiered Progress Bar Decorative Tier (display-only, no discount of its own) with a GWP Widget that handles the partial-discount logic and gift delivery.
Partial discount without the GWP watcher (simpler promotional mechanics): Smart Flows BXGY supports percentage-off and fixed-amount-off discount types on the gift product and is fine for promotions that do not need rule-based auto-removal.
Partial discount as a pre/post-cart offer: the Post Purchase Widget and Bundle Builder's native GWP both support partial-discount gift offers in their respective surfaces.
Do not use the Tiered Progress Bar Free Product tier for a partial-discount gift. That tier type is 100% off only — it cannot be configured with any other percentage. Use the Decorative Tier + GWP Widget pairing instead when both a progress-bar visual and a partial discount are required.
Which Rebuy GWP options work without the Smart Cart?
Work without the Smart Cart (standalone): Gift With Purchase Widget, Post Purchase Widget, Smart Flows, Bundle Builder's native Gift With Purchase feature, and Checkout Extensions (including the Treat as Gift With Purchase setting on checkout offer widgets).
Require the Smart Cart: All Tiered Progress Bar tier types (Free Product, Product Discount, Order Discount, Free Shipping, Decorative), the Selectable Gift With Purchase Widget (embedded and popup variants), and any pairing that uses a Decorative Tier.
Important — Rebuy no longer supports native Shopify carts as a cart UI. Before the Smart Cart existed, the Rebuy team helped merchants integrate Rebuy widgets into the native Shopify cart (the default cart drawer, flyout, or modal provided by the Shopify theme). That practice has been discontinued. The variation between themes created significant ongoing-support risk and complexity, so Rebuy now prioritizes and supports its own cart product, the Smart Cart. The Smart Cart offers full design customization to match the storefront, plus built-in Rebuy features like automatic discounts, product recommendations, upsells, Tiered Progress Bars, and Selectable GWP — all with full Rebuy support because Rebuy owns the code. Merchants still on a native Shopify cart are recommended to migrate to the Smart Cart. Developers who still need to integrate Rebuy widgets into a native cart flyout, drawer, or modal can follow this guide: How to Add Rebuy to a Native Cart Flyout, Drawer, or Modal. This integration is self-serve and is not supported by the Rebuy team.
Do I need to make the widget live to preview it?
Nope! But first, the widget needs to be installed on Shopify. To do that, click the Installation link at the top right of the widget editor and follow the installation instructions. Once installed, you can preview the GWP widget without publishing it live. Just toggle Live Mode OFF in the widget's editor, hit Save, then click the Preview link (also at the top right of the widget editor header). This will take you to Rebuy's Preview Mode on your live storefront, so you can test the widget in action without customers seeing it. See https://help.rebuyengine.com/en/articles/8688905-using-rebuy-preview-mode
Best Practices
Use the latest Smart Cart version as the foundation for every Gift With Purchase setup. Legacy Smart Cart cannot access the Storefront API, which powers real-time validation and auto-removal.
Enable the Storefront API in the Smart Cart discount input for real-time validation, multi-code stacking, and automatic gift removal when the cart stops qualifying.
Use date scheduling inside the datasource for time-limited Gift With Purchase campaigns. Automatic start and end dates avoid the cache artifacts created by manually toggling a widget on and off.
Use Shopify Functions for all actual discount application. Never rely on the datasource's
Discount ProductorDiscount Widgetreturn rules — those are visual only.Configure the Shopify Functions discount before enabling the widget. Launching the widget before its discount is configured can cause the widget-before-discount trap and force a reset later.
Test every Gift With Purchase behavior in a fresh incognito browser session to rule out
cart.jscache artifacts.Set the Shopify Functions discount to None before disabling a Gift With Purchase widget to minimize caching and gift persistence in active carts.
Prefer
Contains AnyoverEqualsfor all product and tag rules — it is more stable and prevents the flashing-gift failure mode.For complex conditional setups that native rules cannot cover, use Smart Flows before offering a custom-code workaround.
Keep active widget discount rules under 20 per datasource, and keep total active Shopify automatic function discounts under 25 store-wide.
Audit your installed apps for third-party discount tools (Kaching, Discount Ninja, competitor GWP apps) when discounts fail at checkout but look correct in the Smart Cart.