Selling plans represent how products can be sold and purchased. When you create a selling plan, you can determine the policies under which a product can be sold. For example, you can create a selling plan where a customer can purchase a subscription on a monthly billing cycle, and where you offer a 15% discount for weekly deliveries of the product. This guide shows you how to create a "Subscribe and save" and a "Prepaid" selling plan, and how to associate products with them. ## Requirements > Note: > > - Most subscriptions, pre-order and try before you buy apps need to request API access through the [Partner Dashboard](/docs/apps/build/authentication-authorization/access-tokens/authorization-code-grant#ask-for-permission). We give API access to apps that are designed according to our [principles for subscriptions, pre-order and TBYB apps] (/docs/apps/selling-strategies/purchase-options#shopifys-principles). > - Public apps that use subscriptions, pre-order or TBYB need to meet [specific requirements](/docs/apps/launch/app-requirements-checklist#purchase-option-apps) to be published on the Shopify App Store. > - Custom apps [created in the Shopify admin](/docs/apps/build/authentication-authorization/access-tokens/generate-app-access-tokens-admin) can't use subscriptions, pre-order or TBYB because these apps can't use extensions or request access to protected scopes. If you're building a solution for a single store, then build your custom app in the Partner Dashboard. - Your app can make [authenticated requests](/docs/api/admin-graphql#authentication) to the GraphQL Admin API. - Your app has the `write_products`, `read_customer_payment_methods`, `read_own_subscription_contracts`, and `write_own_subscription_contracts` [access scopes](/docs/api/usage/access-scopes). Learn how to [configure your access scopes using Shopify CLI](/docs/apps/build/cli-for-apps/app-configuration). - You've created [products](/docs/api/admin-graphql/latest/mutations/productcreate) and [product variants](/docs/api/admin-graphql/latest/mutations/productvariantcreate) in your development store. - To be eligible to use Shopify subscriptions, users need to meet the [qualifying criteria](https://help.shopify.com/en/manual/products/subscriptions/setup#eligibility-requirements). - You've familiarized yourself with the concept of [selling plans](/docs/apps/build/purchase-options/subscriptions/selling-plans). ## Step 1: Create a selling plan group > Caution: > Subscriptions, pre-orders, TBYB, and associated records, including `SellingPlanGroup`, `SellingPlan`, policies, and associations to products and variants, are deleted 48 hours after a user uninstalls a subscriptions, pre-orders, or TBYB app. Products and product variants aren't deleted. We recommend backing up Subscriptions, pre-orders, and TBYB records in case you need to restore them later. In the following example, a selling plan group is created using the [`sellingPlanGroupCreate`](/docs/api/admin-graphql/latest/mutations/sellingplangroupcreate) mutation. The input fields include `name` (the plan group name that customers see), `merchantCode` (the plan name that the merchant sees), `sellingPlansToCreate` (the individual selling plans to create), `options` (the selling plan options available in the drop-down list in the storefront), and `position` (how the options are sorted). Learn more about [GraphQL Admin API objects for purchase options](/docs/apps/build/purchase-options#graphql-admin-api-objects-for-purchase-options). For more information on input fields and values, refer to the following resources: - [`SellingPlanGroupInput`](/docs/api/admin-graphql/latest/input-objects/sellingplangroupinput) - [`SellingPlanInput`](/docs/api/admin-graphql/latest/input-objects/sellingplaninput) - [How subscriptions work](/docs/apps/build/purchase-options/subscriptions#how-do-subscriptions-work) > Note: > `SellingPlan` objects are grouped together in Liquid when they are created by the same app, and when they have the same `selling_plan_group.name` and `selling_plan_group.options` values. For more information, refer to the [`selling_plan_group` object](/docs/api/liquid/objects/selling_plan_group).
Within each individual selling plan, the billing, delivery, and pricing policies are set:
billingPolicy
: The schedule is based on a weekly, every two weeks, or monthly pay per delivery subscription.deliveryPolicy
: The schedule is based on the merchant offering delivery every week, two weeks, and one month.pricingPolicies(fixed)
: The pricing is set at 15% off for deliveries every week, 10% off for deliveries every two weeks, and 5% off for deliveries every month. Selling plan pricing policies also work in conjunction with price lists. For more information, refer to the Catalogs overview.The category
field should be set to SUBSCRIPTION
.
If you need to define more advanced delivery behaviors for subscriptions, such as specifying that fulfillment starts on a certain date each month, then you can include anchors in your API call. The following example sets billing and delivery anchor dates on Mondays or on the 15th of the month.
The following selling plan API properties display merchant-facing strings on the Product page in Shopify admin and on the storefront product page and checkout. The app populates the strings. To provide the best user experience, you can follow the Subscription UX guidelines and the Pre-orders and try before you buy UX guidelines.
Field | Content guideline | Description |
---|---|---|
SellingPlan.name |
Subscription, delivery every week | Display type and delivery frequency selected by the customer. |
Pattern: [Subscription type], delivery every [frequency] | ||
SellingPlanGroup.description (if field is set) |
SellingPlanGroup.summary |
Shopify will output the contents of SellingPlanGroup.summary directly. It will not add the Customer can choose string. |
SellingPlanGroup.description (if field isn't set) |
Customer can choose
|
Shopify will output Customer can choose: and loop through the selling plan group's associated selling plans, outputting SellingPlan.name. |
Within each individual selling plan, the billing, delivery, and pricing policies are set:
billingPolicy
: The schedule is based on a 12 week prepaid subscription.deliveryPolicy
: The schedule is based on the merchant offering delivery every week, two weeks, and three weeks.pricingPolicies(fixed)
: The pricing is set at 20% off for deliveries every week, 15% off for deliveries every two weeks, and 10% off for deliveries every three weeks. Selling plan pricing policies also work in conjunction with price lists. For more information, refer to the Catalogs overview.The category
field should be set to SUBSCRIPTION
.
If you need to define more advanced delivery behaviors for subscriptions, such as specifying that fulfillment starts on a certain date each month, then you can include anchors in your API call.
The following selling plan API properties display merchant-facing strings on the Product page in Shopify admin and on the storefront product page and checkout. The app populates the strings. To provide the best user experience, you can follow the Subscription UX guidelines and the Pre-orders and try before you buy UX guidelines.
Field | Content guideline | Description |
---|---|---|
SellingPlan.name |
3-month prepaid subscription, delivery every week | Display prepaid period, type, and delivery frequency selected by the customer. |
Pattern: [Subscription type], delivery every [frequency] | ||
SellingPlanGroup.description (if field is set) |
SellingPlanGroup.summary |
Shopify will output the contents of SellingPlanGroup.summary directly. It will not add the Customer can choose string. |
SellingPlanGroup.description (if field isn't set) |
Customer can choose
|
Shopify will output Customer can choose: and loop through the selling plan group's associated selling plans, outputting SellingPlan.name. |