Selling plans represent how products can be sold and purchased. For example, a product can be configured to enable it to be billed and delivered on a monthly basis at a 15% discount.
Two common selling plan types include the "Subscribe and save" and "Prepaid" options. "Subscribe and save", also known as "pay per delivery", is a selling method where a customer pays for goods or services per delivery. "Prepaid" is a selling method where a customer makes a single payment upfront.
RequirementsAnchor link to section titled "Requirements"
- Your app can make authenticated requests to the GraphQL Admin API.
- Your app has the
write_own_subscription_contractsaccess scopes. For more information on requesting access scopes when your app is installed, refer to Getting started with OAuth.
- You've created products and product variants in your development store.
- To be eligible to use Shopify subscriptions, merchants need to meet the qualifying criteria.
Selling plansAnchor link to section titled "Selling plans"
Selling plans are organized into selling plan groups, which represent a selling method or purchase option. The following diagram shows the object relationships between selling plan groups, products, variants, selling plans, and policies.
|Selling plan group||Represents a selling method. For example, "Subscribe and save" or "Prepaid" subscriptions.|
|Products||Represents the products that are associated to the selling plan group.|
|Variants||Represents the product variants that are associated to the selling plan group.|
|Selling plans||Represents an alternative way to buy a product or variant. Selling plans are organized into a selling plan group. For example, individual selling plans might be named "Deliver weekly" or "Deliver monthly".|
|Policies||Each selling plan is associated with the following policies:
Selling plans-related webhooksAnchor link to section titled "Selling plans-related webhooks"
Your app can subscribe to webhooks that are related to selling plans. The following examples show the JSON responses from each of the available webhooks.
To learn how to set up and consume webhooks, refer to the Webhook configuration overview.
Subscription shipping and deliveryAnchor link to section titled "Subscription shipping and delivery"
Customers can buy one-time purchases and subscriptions when both are offered by a merchant. Some merchants might want to offer custom shipping rules for subscription purchases. You can use the
DeliveryProfile object to create shipping profiles and associate them with selling plan groups. Here are some example scenarios where delivery profiles can be useful to implement custom shipping rules for subscription purchases:
- A merchant wants to offer free or discounted shipping on subscriptions.
- A merchant wants to limit subscription purchases to certain shipping destinations.
- A merchant wants to offer local pickup for one-time purchases of a product, but require shipping for subscription purchases.
Delivery profilesAnchor link to section titled "Delivery profiles"
By default, a product has the same shipping rate whether it's bought as a one-time purchase or as part of a subscription. To calculate subscription shipping separately from one-time purchases, you can associate a
DeliveryProfile object with the selling plan group using the
When one-time purchases and subscriptions are in the same delivery profile, coming from the same location, shipping for one-time purchases is calculated and combined with the subscription purchases. Subsequent subscription shipping rates are calculated separately.
Shipping rates that are specific to a selling plan group don't display in the Shipping and delivery settings in the Shopify admin. You need to configure shipping rates for selling plan groups in your app.
Delivery method display at checkoutAnchor link to section titled "Delivery method display at checkout"
If the rate is inherited from your delivery profile, then the rate name is Subscription shipping. If you define a subscription-specific rate using the API, then the specified name is used.
When multiple subscriptions are in the cart, shipping rates are consolidated if they share the same selling plan billing and delivery policies.
Customers can select a shipping rate for one-time purchase products in the cart if more than one rate is available. They can also view the total cost of shipping for their subscriptions and the total cost of shipping for one-time purchases:
Local delivery and local pickupAnchor link to section titled "Local delivery and local pickup"
When choosing local delivery or pickup methods, the chosen method applies to the entire order. Mixed delivery methods aren't supported.
For example, if the customer has a one-time purchase and subscription on the same cart, and they select local pickup at checkout, then they can't choose shipping or local delivery for the subscription. All items would be fulfilled as local pickup.
Updating shipping and delivery for contractsAnchor link to section titled "Updating shipping and delivery for contracts"
Shopify automatically creates subscription contracts when products with selling plans are purchased through checkout. Subscription contracts are detached from the original selling plan. Updates to the original selling plan don't modify pre-existing subscription contracts.
When querying a shipping rate for a subscription draft, the returned shipping rate depends on whether the subscription contract has a selling plan ID and variant ID:
- If the subscription contract doesn't have a selling plan ID, then the shipping rates from the delivery profile associated with the variant ID are displayed.
- If the subscription contract doesn't have a selling plan or variant ID, then the shipping rates from the shop's general delivery profile are displayed.
For more information on contracts, refer to Subscription contracts.
Anchors define the date when fulfillment is completed by a merchant or when delivery occurs for the customer for a given time cycle. You can also define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who start their subscription inside the cutoff period.
If you need to define more advanced delivery behaviors for subscriptions, then you should use anchors. Here are some example scenarios where anchors can be useful to implement advanced delivery behavior:
- A merchant starts fulfillment on a specific date every month.
- A merchant wants to bill the 1st of every quarter.
- A customer expects their delivery every Tuesday.
Billing anchor behaviorsAnchor link to section titled "Billing anchor behaviors"
If something occurs that delays a billing attempt past an anchor date, then fulfillment is also delayed to the next anchor date. You can prevent this by providing an appropriate
originTime value when you create a new billing attempt.
An example is a subscription with anchor billing and fulfillment dates for the 15th of every month. If a customer's payment fails and doesn't go through until the 16th, then their order won't be fulfilled until the 15th of the next month. Providing an
originTime value on or before the 15th allows the fulfillment to take place on schedule, regardless of whether the billing attempt was successful past the anchor date.
Delivery cutoff behaviorsAnchor link to section titled "Delivery cutoff behaviors"
You can use the
preAnchorBehavior properties of the recurring delivery policy on a selling plan to define the behavior for when customers are eligible to enter a delivery or fulfillment cycle:
||Specifies the date when delivery or fulfillment is completed by a merchant.|
||Specifies a buffer period before the anchor date for orders to be included in a delivery or fulfillment cycle.|
||Defines whether an order that is placed can be delivered or fulfilled immediately, or at the next anchor date. Valid values are
The following table shows some example scenarios of what the expected next billing and delivery dates are for a subscription with billing and delivery anchor dates at the 15th of each month, given different first billing dates (when a subscription starts),
|First billing date||
||First delivery date||Next billing and delivery date|
|On the anchor date:
|Before the anchor date, and before the cutoff period:
|Before the anchor date, and within the cutoff period:
For an example implementation of anchors, refer to the "Subscribe and save" example in the Create and manage selling plans guide.
- Learn how to create and manage selling plans to determine the policies under which products can be sold.