Skip to main content

Add selling plans to draft order line items with the Admin GraphQL API

Admin GraphQL API version 2027-01 adds selling plan support to draft orders. You can now apply a selling plan to a draft order line item and read back the applied plan. These fields are additive, so no action is required to keep your app working.

What's added

On the GraphQL Admin API, three new fields let your app work with selling plans on draft orders:

The following example applies a selling plan to a line item and reads back the applied plan:

mutation {
draftOrderCreate(input: {
lineItems: [{
variantId: "gid://shopify/ProductVariant/1",
quantity: 1,
sellingPlanId: "gid://shopify/SellingPlan/1"
}]
}) {
draftOrder {
lineItems(first: 1) {
nodes {
sellingPlanApplication { sellingPlanId name }
}
}
}
userErrors { field message }
}
}

Behavior to account for

  • Only recurring and prepaid subscription plans are supported. Fixed-billing plans, such as pre-orders and try before you buy, aren't.
  • B2B draft orders, custom line items, and price overrides on selling plan lines aren't supported.
  • draftOrderComplete is not yet supported: calling draftOrderComplete on a draft that has a selling plan line item returns a user error and creates no order. You can send the draft order invoice to checkout via draftOrderInvoiceSend.

Learn more about this change in our product changelog and help docs.

Was this page helpful?