Documentation
Subscription Bundles
Flex Bundles supports subscription bundles natively, through Shopify selling plans and the subscription app you already use: Shopify Subscriptions, Recharge, Loop, Skio, or any other app that sells through selling plans.
Flex Bundles is not a subscription app and does not replace yours. Billing, renewals, skips, pauses, failed payments, and the customer portal stay where they are. Flex Bundles takes care of the bundle: what the customer picked, what it costs, and the component line items your warehouse picks on the first order and every renewal.
Two ways to sell a bundle on subscription
There are two models, and the right one depends on what the customer should be subscribed to: the bundle, or the products inside it.
| One subscription for the bundle | A subscription per component | |
|---|---|---|
| What goes in the cart | The bundle's parent product on a selling plan | Each component as its own line, on a selling plan |
| Subscription contracts | One, for the whole bundle | One line per component |
| Price | The parent's price less the plan's discount | Each component's price on its plan |
| In the customer portal | The bundle is managed as one item | Each product can be skipped, swapped, or cancelled on its own |
| Cart and checkout | One line for the bundle | Every component listed |
| Components on the order | Added by an order edit shortly after checkout | There from the start |
| Selling plans live on | The parent product | Every component product |
| Flex Bundles setting | Expand bundle on order edits | None |
Choose one subscription for the bundle when the bundle is the product: a set box at a set price that renews as a unit. Choose a subscription per component when the bundle is a starting point and subscribers will go on to manage the items one by one, which is how most replenishment products (food, supplements, pet, coffee) behave.
Both work with fixed and flex bundles, and a store can use both for different bundles.
One subscription for the bundle
The customer subscribes to the bundle's parent product. Shopify does not run Cart Transform on cart lines that carry a selling plan, so the bundle goes through checkout as the parent line, and Flex Bundles expands it on the order instead:
- Your storefront adds the parent product with a
selling_plan. For a flex bundle, the same request carries the customer's picks in_components. - Checkout charges the parent variant's price less the plan's discount.
- Your subscription app creates one subscription contract for the parent, with its line item properties.
- Shortly after the order is created, Flex Bundles adds each component to it, removes and restocks the parent, and discounts the components so they total exactly what the customer paid.
- Every renewal is a new order from that contract, and Flex Bundles expands it the same way.
Fixed bundles
No theme code is needed.
- In Flex Bundles, open the bundle and turn on Expand bundle on order edits.
- In your subscription app, add a selling plan to the bundle's parent product.
- On the product page, use your subscription app's widget. It adds a
selling_planfield to the product form and the normal add to cart button does the rest.
Flex bundles
Turn on Expand bundle on order edits in the flex bundle editor, then send the selling plan with the request you already send for the bundle:
const item = {
id: 67577705791789, // the parent variant
quantity: 1,
selling_plan: 689596760365, // a plan on the parent product
properties: {
_components: JSON.stringify([
{ id: 67577705824557, quantity: 1 },
{ id: 67577706119469, quantity: 2 },
]),
// Visible properties, so the cart shows what is in the box
'Box contents': '1 x Chicken, 2 x Beef',
},
};
await fetch(`${window.Shopify.routes.root}cart/add.js`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ items: [item] }),
});
Three things differ from a one-time flex bundle:
- The plans come from the parent product. Read them from the parent variant's
selling_plan_allocations, not from the components. - The price is the parent price. Component Sum pricing and
_discountare applied by Cart Transform, which does not run on subscription lines. A subscription is charged the parent variant's price less the plan's discount, whatever the customer picked. Set the parent price to what the subscription should cost. - The cart shows one line. The bundle is not expanded until after checkout, so add the customer's picks as visible properties (no leading underscore) for the cart and checkout to display.
What the expanded order looks like, including its tags and what your 3PL should wait for, is covered in Orders expanded after checkout.
A subscription per component
The bundle page is where the customer builds the box, but what they subscribe to is the products inside it. Your storefront adds each chosen component to the cart as its own line on a selling plan, and does not add the bundle's parent product at all:
// The customer's picks, each on the chosen delivery frequency
const picks = [
{ id: 67577705824557, quantity: 1 },
{ id: 67577706119469, quantity: 2 },
];
const plan = 689596760365; // a plan every picked product is in
await fetch(`${window.Shopify.routes.root}cart/add.js`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
items: picks.map((pick) => ({
id: pick.id,
quantity: pick.quantity,
selling_plan: plan,
})),
}),
});
These are ordinary subscription lines, so everything your subscription app does works on them as it does on any other product: the cart lists each item, the order needs no editing after checkout, and in the portal the subscriber can swap a flavor, change a quantity, or skip one item without touching the rest.
The usual setup is a purchase choice on the bundle page. One-time adds the bundle through Flex Bundles as normal, with bundle pricing and expansion at checkout. Subscribe adds the components on their plans. The same step selectors or fixed component list feed both.
What to plan for:
- Selling plans go on the components. Every product a customer can pick needs to be in the selling plan group. The bundle's parent product does not.
- Offer only shared frequencies. A plan can only be sent for products that are in it. Show the delivery frequencies that every selected component can be bought on, and hide the subscribe option if there are none.
- The price is the plan's price. Each line is charged its component's price on the chosen plan. The bundle's own price or discount does not apply, so show the subscription total from the components'
selling_plan_allocations. - Volume discounts are set per tier. To reward a bigger box ("5 items, 10% off; 8 items, 15% off"), either create one selling plan per tier, each with its own discount, and add the lines on the plan that matches the box size, or keep one plan and apply a discount code per tier. A discount that is part of the plan carries through to every renewal; for a code, check how your subscription app applies it to renewals. If the cart lets customers change quantities, move the lines to the right tier there too.
- Flex Bundles does not process these lines. A bundle is recognized by its parent product in the cart, and here the parent is never added. The order holds ordinary product lines: it does not get the
flex-bundles-has-bundletag, it is not counted in bundle analytics, and bundle rules such as price floors and component limits are not checked, so any limits on the box have to be enforced by your storefront. One-time purchases of the same bundle get all three as usual. - The box can change after checkout. Because each item is its own subscription line, a subscriber can cancel one and keep the rest. That is the point of this model, and the reason to choose the other one when the box has to stay whole.
Limits
For one subscription per bundle:
- Subscribers cannot change the contents of a flex bundle in the subscription portal. The picks live in the
_componentsproperty, which portals do not edit. A new selection means a new subscription. - Line item properties stay on the parent line. Shopify's order editing cannot attach properties to the components it adds.
- Orders paid in a currency other than your store currency are left unexpanded.
- The bundle has to stay active in Flex Bundles for its renewals to expand.
For a subscription per component, the limits are the ones listed above: plan pricing instead of bundle pricing, and no bundle record on the order.
Related
- Subscription Bundles on Shopify: a full walkthrough of one subscription per bundle, with real orders and the pricing math
- Bundle Types: the Expand bundle on order edits setting
- Cart API Integration: the request format for flex bundles
- Order Data for 3PLs and ERPs: what an expanded order looks like to your systems