All articles
Shopify Development13 min read20 August 2026

Shopify Selling Plans API: Building Native Subscriptions Without Third-Party Apps

Replace expensive subscription apps with Shopify's native Selling Plans API — selling plan groups, delivery policies, billing policies, and the customer portal architecture.

Selling Plans APISubscriptionsShopify PlusStorefront API

Most Shopify subscription setups rely on third-party apps — ReCharge, Bold, Skio — that charge £200–£800/month and sit between Shopify and your customers. Shopify's native Selling Plans API, available since 2021, lets you build subscriptions that live entirely within Shopify. No middleware, no third-party data access, no monthly SaaS fee.

What the Selling Plans API actually is

The Selling Plans API is a set of Admin API and Storefront API endpoints that let you create subscription products natively in Shopify. Selling plans define how often a product is delivered, how billing works, and what price the subscriber pays. Plans are grouped into selling plan groups — these are what appear on the product page.

The data model

  • SellingPlanGroup — a named group (e.g. 'Subscribe & Save') that contains one or more plans
  • SellingPlan — a specific subscription option (e.g. 'Deliver every 4 weeks, 15% off')
  • DeliveryPolicy — defines the delivery frequency (weekly, monthly, custom intervals)
  • BillingPolicy — defines when and how charges happen (charge same day as delivery, prepaid, etc.)
  • PricingPolicy — defines the subscriber price (percentage off, fixed price, or no discount)

Creating a selling plan group

graphql
mutation CreateSellingPlanGroup {
  sellingPlanGroupCreate(input: {
    name: "Subscribe & Save"
    merchantCode: "subscribe-save"
    options: ["Delivery frequency"]
    sellingPlansToCreate: [
      {
        name: "Deliver every 4 weeks"
        options: ["4 weeks"]
        billingPolicy: {
          recurring: {
            interval: WEEK
            intervalCount: 4
            anchors: []
          }
        }
        deliveryPolicy: {
          recurring: {
            interval: WEEK
            intervalCount: 4
            anchors: []
          }
        }
        pricingPolicies: [
          {
            fixed: {
              adjustmentType: PERCENTAGE
              adjustmentValue: { percentage: 15.0 }
            }
          }
        ]
      }
    ]
  }) {
    sellingPlanGroup { id name }
    userErrors { field message }
  }
}

Associating plans with products

Once a selling plan group exists, you associate it with products and variants using the sellingPlanGroupAddProducts or sellingPlanGroupAddProductVariants mutations. Products must be associated before they show up as subscribable on the storefront.

The Storefront API side

On the storefront, selling plans appear in the product query. You query sellingPlanGroups to display subscription options and pass the selectedSellingPlan to the cart when adding a subscription item. The Storefront API handles the rest — recurring billing is managed entirely by Shopify.

Unlike third-party subscription apps, native Selling Plans use Shopify's own billing system. This means subscription orders go through Shopify's payment processor directly — no additional payment gateway fees or PCI scope for subscription billing.

Building the customer portal

The customer portal — where subscribers manage frequency, skip, pause, or cancel — requires custom development. Shopify provides the subscriptionContract APIs to query and mutate active subscriptions. You build the UI; Shopify handles the billing state.

Dunning logic

When a recurring charge fails, Shopify fires a subscription_billing_attempt_failure webhook. Your integration should implement dunning: retry the charge after 3, 7, and 14 days with automated emails at each attempt. After the final retry, pause or cancel the subscription automatically.

Dunning logic is not built into the Selling Plans API — you must implement it yourself. This is the most common reason merchants end up back on a subscription app: they underestimate the operational logic required.

When native subscriptions make sense

  • You have a reliable development resource to build and maintain the integration
  • You're spending £300+/month on a subscription app
  • Your subscription logic is relatively standard (subscribe & save, prepaid boxes)
  • You want subscriber data inside Shopify, not in a third-party system
ShareLinkedInX / Twitter
Arslan
Shopify developer specializing in B2B, Shopify Plus, and custom app development. 6+ years building on Shopify.
About

Building something like this on Shopify?

I build exactly what I write about. If you need help implementing this, get in touch — I respond within 24 hours.

Discuss your project

Get new Shopify guides by email

Practical, technical articles on Shopify development — no fluff, no sales emails.

No spam. Unsubscribe anytime.