# Subscription sets

> How a bundle set sells on a selling plan, line by line, how the Luxe cart changes a line's plan, and how checkout, orders and billing treat them.

Source: https://www.luxesets.com/docs/subscription-sets

> **For developers and agencies.** Merchants set subscription sets up in the app with no code: see the help article
> [Subscription sets](https://www.luxesets.com/help/subscription-sets). This page explains how they work, for anyone building around them.

## Two paths for one set

A bundle set sold on subscription keeps two purchase paths:

| Purchase option | What goes into the cart                                                                        | What prices it                                                   |
| --------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| One-time        | The set product, with `_luxe_kit` and `_luxe_slots`, expanded into its items at checkout       | Luxe's Cart Transform, as for every Build-your-own and Fixed set |
| Subscription    | Each item as its own line on the shopper's selling plan, tied by `_luxe_kit_group` (line mode) | The plan's price on each line, then the Luxe Rewards discount    |

**Why line mode.** Shopify rejects a Cart Transform `lineExpand` on a line with a selling plan, and bundles cannot be sold with selling plans. A set product bought on a plan would reach checkout unexpanded, at its own price, with no items to fulfil. So Luxe never sells the set product on a plan: a subscribed set goes into the cart as its items, exactly like a Collection set, and the subscription app creates one subscription for those lines.

Never give the set product a selling plan. Luxe refuses to activate a set whose set product requires or offers one, and flags a live set if one is added later. The plan belongs on the products inside the set.

## Cart contract

The Bundle set builder adds a subscribed set in **one** `/cart/add.js` request: one line per item (a repeated pick is one line with its quantity), each with the same `selling_plan` and these properties:

| Key               | Value                                                                                                                                                                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_luxe_kit_group` | `<set id>~<instance>`. For a Build-your-own or Fixed set, the set product's numeric id; for a Collection set, the set's id. `instance` is a short random token per build (Luxe uses 8 letters and digits), so two builds of one set stay separate |
| `_luxe_src`       | Where the set was added, for analytics only: `kit_block`, `tray` or `edit` from Luxe's own surfaces                                                                                                                                               |

```json title="POST /cart/add.js"
{
  "items": [
    {
      "id": 44120000000101,
      "quantity": 1,
      "selling_plan": 15929082046,
      "properties": { "_luxe_kit_group": "8123456789012~Xa7k2Pq9", "_luxe_src": "kit_block" }
    },
    {
      "id": 44120000000102,
      "quantity": 1,
      "selling_plan": 15929082046,
      "properties": { "_luxe_kit_group": "8123456789012~Xa7k2Pq9", "_luxe_src": "kit_block" }
    },
    {
      "id": 44120000000103,
      "quantity": 1,
      "selling_plan": 15929082046,
      "properties": { "_luxe_kit_group": "8123456789012~Xa7k2Pq9", "_luxe_src": "kit_block" }
    }
  ]
}
```

The ids above are illustrative. Every line carries the same plan and the same group value.

**Adding a subscribed set from your own code** (a headless storefront, a quiz, a landing page): send the same request.

- Use variants the set can hold, each with a selling plan Shopify offers on that variant (`variant.selling_plan_allocations` in Liquid, or `sellingPlanAllocations` in the Storefront API). Shopify refuses a plan that is not on the variant.
- Put every line of the build on the same plan, with one fresh `instance` per build, and add them in one request.
- Leave `_luxe_src` out: its codes are Luxe's own surfaces, and it only feeds analytics. `_luxe_kit_group` is what checkout prices and what billing reads.
- Never put the set product in the request.

Checkout re-validates every group against the set's published configuration: a group with an item the set cannot hold, or too few picks, is priced as ordinary lines at their plan prices, never at the set's price. The storefront predicts; only the Luxe Rewards discount changes the price.

## Pricing order

A subscribed set's first delivery is priced in this order:

1. **The plan's price adjustment**, inside each line's price. Shopify prices a line on a plan at its allocation price, so the line reaches checkout already at the plan's price (confirmed on a development store: three lines on a 10% plan reached the Function at their plan prices).
2. **The set's price**, from the Luxe Rewards discount function, as a product discount on top of the plan's price. Luxe compiles each Build-your-own or Fixed set sold on subscription into the discount's configuration as a line set: Percent off items as a percentage, Save more with more as tiers, a set price as a fixed amount (with the subscriber set price, when the merchant sets one).
3. **Rewards ladders**, on what remains, as for any cart. A store setting can keep lines with a selling plan out of the ladder's count entirely.

The discount applies to the first order only: the Luxe Rewards node applies to subscriptions with `recurringCycleLimit` left at Shopify's default of 1, which Luxe never changes. **Renewals are priced by the subscription app's plan.** If the node does not apply to subscriptions, the merchant's next save of a subscribed set switches it on.

**Mixed purchase options.** When only some lines of a group are on a plan (a theme cart with its own plan selector can do this; Luxe's surfaces never do), the group is priced by the one-time rule: a set price set keeps its one-time set price, never the subscriber set price, so a mixed group is never cheaper than a one-time set. The Luxe cart says part of the set is on a different purchase option.

**Worked example** (live test, USD): three coffees with a store price of 54.00, on a plan at 10% off (48.60 at the plan's prices), in a set at Percent off items 10%. The first delivery is 43.74 and each later delivery 48.60. Checkout lists each coffee with "Deliver every 4 weeks, 10% off" and the set's discount, named after the set.

## Which pricing can subscribe

| Set type           | Subscribes with                                                                                         | Stays one-time with                                                                                                                           |
| ------------------ | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Build-your-own set | One slot group with Percent off items, Save more with more, or a set price with a fixed number of picks | Two or more groups, fixed components, Per-slot rules, Cheapest item free, Amount off the set, premium picks, a set price for a range of picks |
| Collection set     | Any pricing                                                                                             |                                                                                                                                               |
| Fixed set          | A set price or Percent off items, every product at its own price                                        | Amount off the set, or a product that is free or at a fixed amount                                                                            |

The reason is the same throughout: a subscribed set reaches checkout as separate lines already at the plan's price, and a discount can lower a price but never raise one. A premium pick's surcharge or a fixed-price product can need a line to cost more than its plan price; per-slot rules, cheapest-item rules and several groups need slots, which separate lines on a plan do not carry; no line set takes a fixed amount off its items yet. A Fixed set's group is priced only as its exact contents (or a whole multiple of them), so a theme's quantity box cannot move the set's price onto other units.

A set price above the plan's prices takes nothing, since a discount never raises a price. Subscription-only products (`requires_selling_plan`) cannot be set items, and only plans that charge each delivery are offered: prepaid, pre-order and try-before-you-buy plans are not.

## Storefront

- **Purchase option.** On a set offered on subscription, the Bundle set builder shows the purchase option above Add, as Shopify's subscription guidelines ask: native radios for One-time purchase and each plan group (Shopify's group name, the saving, the first delivery's price), then the group's frequencies, "$43.74 for the first delivery, then $48.60 each delivery." and the shop's subscription policy link. Subscription only sets show the plans alone. The Collection set tray has the same choice as a compact switch. Plans are read live from Liquid, so a shopper can never subscribe an item to a plan it no longer has; items the chosen plan does not cover show One-time only.
- **One price.** Subscribing, the builder's price is luxe-core's quote of the build as checkout will price it: the picks at Shopify's per-variant plan prices, then the set's line set.
- **Events.** `luxe:kit:added` carries `{ kitId, source }`, plus `sp: true` when the set was bought on subscription: its items went into the cart as lines on a selling plan. See [Events](https://www.luxesets.com/docs/storefront-api#events).
- **Edit set keeps the plan.** From the Luxe cart, Edit set opens the set's page with `#luxe-edit=<set id>~<instance>`; the builder or tray loads the group's lines from the cart on their plan, and Update set replaces the old lines, putting them back if the add fails.
- **Without JavaScript or the app embed**, and for AI shopping agents, a set sells one-time through the block's form, which sends no `selling_plan`, even when the set is Subscription only. See [How it degrades](https://www.luxesets.com/docs/how-the-storefront-works#degrade).
- **The Luxe cart** shows the set as one group with the plan once, the price of each later delivery ("Then each delivery") and "Subscriptions renew at the plan's price." under Checkout. Its lines never get the cart's per-line purchase option ([Subscriptions in the cart](https://www.luxesets.com/docs/subscription-sets#cart-subscriptions)). With a theme's own cart, each line shows its plan as Shopify shows any subscription line.

## Subscriptions in the cart

Any product a shopper buys on a selling plan from its own product page reaches the cart as an ordinary line: a `selling_plan_allocation` and no `_luxe_*` property. The Luxe cart drawer names the plan on every such line. The merchant setting **Cart > Subscriptions in the cart** adds two options, both off by default; while both are off the drawer renders exactly as before and loads nothing new.

- **Plan details.** A renewal mark beside the plan's name; for a plan whose first price lasts several deliveries (`price_adjustments[0].order_count` above 1, with a second adjustment), a row such as "$16.20 from delivery 4", the price being Shopify's second adjustment times the quantity, never computed by Luxe; and the renewal note under Checkout. Line prices stay Shopify's `final_line_price`.
- **Purchase option in the cart.** A Purchase option button on the line opens One-time and the plans the line can switch to. The merchant chooses the lines: lines on a plan only, or also one-time lines whose product has a plan.

**Which lines.** Ordinary lines only. The purchase option is never offered on set lines (`_luxe_kit`, `_luxe_kit_group`: a per-line change would split a set across purchase options, so Edit set is the path), gift lines (`_luxe_gift`), checkout-offer and upsell lines (`_luxe_addon`) or lines hidden with [`hideLines`](https://www.luxesets.com/docs/storefront-api#members). A line with fewer than two choices gets no button.

**Reading the plans.** A cart line does not say which other plans its variant has, or whether it may be bought one-time, so the drawer reads the product after it paints: `GET {root}products/<handle>.js` for eligible lines whose product it does not know yet, in parallel, at most 10 products per render, once per product per visit (cached in `sessionStorage` as `luxe:plans:<handle>`). The choices are One-time, left out when the product or the variant has `requires_selling_plan`, then the plans in the **variant's** `selling_plan_allocations`, in Shopify's group and plan order, since a plan can cover some variants only. A failed read leaves the line without the button; the plan's name still shows.

**Changing the plan.** One tap sends one request, the line identified by its 1-based position, as Shopify requires with `selling_plan`, and its current quantity, which Shopify would otherwise reset to 1:

```json title="Onto a plan"
{ "line": 2, "quantity": 1, "selling_plan": 15929082046 }
```

```json title="Back to one-time"
{ "line": 2, "quantity": 1, "selling_plan": null }
```

Both go to `POST {root}cart/change.js` as JSON, with the theme's `sections` as every drawer change sends them. The request never carries `properties`, which would replace the line's own, so Luxe adds nothing to the line. Before it sends, the drawer finds the line by its key in the freshest cart it holds; a line that has gone closes the panel.

**After the change.** The cart Shopify returns goes through the drawer's usual path: no price shows until Shopify has priced it, the gift rules run on the new subtotal (a lower subtotal can lose a reward), `luxe:cart:updated` fires and the theme's sections refresh. There is no event of its own. Shopify gives a changed line a new `key`, and can merge it into an identical line already on that plan, so code that tracks lines should re-read them on [`luxe:cart:updated`](https://www.luxesets.com/docs/storefront-api#events) rather than keep a key. If Shopify refuses the change, the drawer reads `/cart.js`, renders the cart Shopify holds and shows its error on the open panel.

**Where it does nothing.** With the theme's own cart no Luxe code runs: the theme shows the plan its own way, and any plan control there is the theme's or the subscription app's. Company buyers (Shopify B2B) get the theme's cart unless the merchant treats them like everyone else.

**Billing.** An ordinary line carries no `_luxe_kit`, `_luxe_kit_group` or `_luxe_addon` and the change adds none, so its order is not a Luxe order, before or after a switch. The merchant guide is [Subscriptions in the cart](https://www.luxesets.com/help/the-luxe-cart#subscriptions-in-the-cart).

## Orders, analytics and billing

- **First orders.** Each line of a subscribed set carries `_luxe_kit_group`, so its first order is a Luxe order, like any Collection set: one Luxe order however many sets or lines it holds. Luxe's order ledger records which set lines were bought on a selling plan, from the order line's selling plan.
- **Renewals.** A renewal order is a Luxe order when a line still carries a Luxe marker, which happens only when the subscription app copies the first order's line properties onto the subscription contract and from there onto each renewal. Luxe never writes to subscription contracts or renewal orders. Such a renewal is billed like any Luxe order: the same included orders, rates and monthly ceiling, and a full refund credited. Luxe labels a recorded renewal **Renewal** from the order's `source_name` (prefix `subscription_contract`) or a subscription app's renewal tag; the label never decides billing, the marker does. Whether Shopify Subscriptions copies the marker onto renewals is being verified.
- **Analytics.** The **Bundle sets by purchase option** card splits bundle set orders and revenue into One-time, Subscription first orders and Subscription renewals. A renewal's revenue is what the plan charged.

The definition of a Luxe order is on [What counts as a Luxe order](https://www.luxesets.com/guides/what-counts-as-a-luxe-order); the properties are on [Line properties](https://www.luxesets.com/docs/line-properties#props).

## Mobile apps and the bundle set endpoint

`PublicKit` from the [bundle set endpoint](https://www.luxesets.com/docs/http-api#objects) has a `subscription` field on sets sold on subscription, absent for a set sold one-time:

| Value  | Meaning                                           |
| ------ | ------------------------------------------------- |
| `BOTH` | The online store offers one-time and subscription |
| `ONLY` | Subscription only, in the builder and the tray    |

A client that sells without selling plans should sell a `BOTH` set one-time, as the theme's no-JS form does, and should not offer an `ONLY` set. The [Tapcart blocks](https://www.luxesets.com/docs/tapcart) sell one-time and show an `ONLY` set as available on the online store.

## Compatibility

| Subscription app                         | Status                                                                                                                                                      |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Shopify Subscriptions                    | Verified: first orders price, check out and count as Luxe orders. Renewals are being verified                                                               |
| Recharge, Skio, Loop, Appstle and others | Compatible in principle: Luxe adds plain cart lines with a selling plan, which any app whose plans Shopify shows on the products can take. Not verified yet |

Luxe never creates, edits or cancels plans, contracts or subscriptions. Uninstalling Luxe leaves existing subscriptions renewing at the plan's price.
