Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Shopify/subscriptions-reference-app/llms.txt
Use this file to discover all available pages before exploring further.
Selling Plans
Selling plans define the terms and pricing for subscription products. They specify how often customers are billed, delivery frequencies, and any discounts applied to recurring orders. Selling plans are grouped together in selling plan groups, which are then attached to products.Selling Plan Groups
A selling plan group is a collection of related selling plans that can be applied to products. Each group contains:- A unique merchant code for identification
- One or more selling plans with different billing frequencies
- Associated products or product variants
The
merchantCode is a human-readable identifier you can use to reference the selling plan group in your code or external systems.Selling Plans Structure
Each selling plan within a group defines specific subscription terms:Recurring Policies
Both billing and delivery use recurring policies to define frequency:- Every month:
{ interval: 'MONTH', intervalCount: 1 } - Every 2 weeks:
{ interval: 'WEEK', intervalCount: 2 } - Every 3 months:
{ interval: 'MONTH', intervalCount: 3 }
Pricing Policies
Selling plans can include pricing policies that apply discounts to subscription purchases:Discount Types
- Percentage
- Fixed Amount
- Price
Applies a percentage discount to the product price.
Querying Selling Plans
The app uses GraphQL to fetch selling plan group details:Selling plans support up to 31 different billing frequencies per group, giving merchants flexibility in offering various subscription options.
Billing vs Delivery Policies
Selling plans can have different billing and delivery frequencies:Common Scenarios
Common Scenarios
Pre-paid subscriptions: Bill monthly, deliver monthlyQuarterly billing with monthly delivery: Bill every 3 months, deliver monthlyWeekly subscriptions: Bill and deliver weekly
Attaching Plans to Products
Selling plan groups can be attached to:- Entire products: All variants of a product get the selling plan
- Specific variants: Only selected variants have subscription options
productsCount and productVariantsCount fields help you understand the scope of each selling plan group.
Cycle Discounts
Selling plans support cycle-based discounts that change over time:Creating Selling Plans
Selling plans are created through the Shopify Admin API using thesellingPlanGroupCreate mutation. The reference app provides a UI for merchants to:
- Create a new selling plan group
- Define billing and delivery frequencies
- Configure pricing policies and discounts
- Select products or variants to attach the plan to
Best Practices
- Use descriptive merchant codes: Make it easy to identify selling plan groups in your code
- Limit plan options: Too many options can overwhelm customers - offer 2-4 frequency choices
- Align billing and delivery: Unless you have a specific reason, keep billing and delivery frequencies the same
- Test cycle discounts: Ensure your cycle-based pricing displays correctly to customers
- Consider margins: Make sure subscription discounts still maintain healthy profit margins
Common Use Cases
- Standard Subscription
- Subscribe & Save
- Prepaid Plan
Monthly billing and delivery with a 10% discount:
Related Resources
- Subscription Contracts - Learn how selling plans create contracts
- Billing Cycles - Understand how billing is scheduled