Selling Plan
Requires access scope.
How a product can be sold and purchased through recurring billing or deferred purchase options. Defines the specific terms for subscriptions, pre-orders, or try-before-you-buy offers, including when to bill customers, when to fulfill orders, and what pricing adjustments to apply.
Each selling plan has billing, delivery, and pricing policies that control the
purchase experience. The plan's options and category
help merchants organize and report on different selling strategies. Plans are
grouped within a
that associates them with
Product and objects.
Selling plans and associated records are automatically deleted 48 hours after
a merchant uninstalls the
App that
created them. Back up these records if you need to restore them later.
Selling plans and associated records are automatically deleted 48 hours after
a merchant uninstalls the
App that
created them. Back up these records if you need to restore them later.
Caution: Selling plans and associated records are automatically deleted 48 hours after a merchant uninstalls the <a href="https://shopify.dev/docs/api/admin-graphql/latest/objects/App"><code>App</code></a> that created them. Back up these records if you need to restore them later.
Learn more about selling plans.
Anchor to FieldsFields
- billingPolicy (SellingPlanBillingPolicy!)
- category (SellingPlanCategory)
- createdAt (DateTime!)
- deliveryPolicy (SellingPlanDeliveryPolicy!)
- description (String)
- id (ID!)
- inventoryPolicy (SellingPlanInventoryPolicy)
- metafield (Metafield)
- metafields (MetafieldConnection!)
- name (String!)
- options ([String!]!)
- position (Int)
- pricingPolicies ([SellingPlanPricingPolicy!]!)
- translations ([Translation!]!)
- metafieldDefinitions (MetafieldDefinitionConnection!): deprecated
- Anchor to billingPolicybilling•Selling
Policy Plan Billing Policy! non-null A selling plan policy which describes the recurring billing details.
- Anchor to categorycategory•Selling
Plan Category The category used to classify the selling plan for reporting purposes.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the selling plan was created.
- Anchor to deliveryPolicydelivery•Selling
Policy Plan Delivery Policy! non-null A selling plan policy which describes the delivery details.
- Anchor to descriptiondescription•String
Buyer facing string which describes the selling plan commitment.
- •ID!non-null
A globally-unique ID.
- Anchor to inventoryPolicyinventory•Selling
Policy Plan Inventory Policy When to reserve inventory for a selling plan.
- Anchor to metafieldmetafield•Metafield
A custom field, including its
namespaceandkey, that's associated with a Shopify resource for the purposes of adding and storing additional information.- •String!required
The key for the metafield.
- Anchor to namespacenamespace•String
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
Arguments
- •String!
- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to keyskeys•[String!]
List of keys of metafields in the format
namespace.key, will be returned in the same format.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to namespacenamespace•String
The metafield namespace to filter by. If omitted, all metafields are returned.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to namename•String!non-null
A customer-facing description of the selling plan.
If your store supports multiple currencies, then don't include country-specific pricing content, such as "Buy monthly, get 10$ CAD off". This field won't be converted to reflect different currencies.
- Anchor to optionsoptions•[String!]!non-null
The values of all options available on the selling plan. Selling plans are grouped together in Liquid when they're created by the same app, and have the same
andvalues.- Anchor to positionposition•Int
Relative position of the selling plan for display. A lower position will be displayed before a higher position.
- Anchor to pricingPoliciespricing•[Selling
Policies Plan Pricing Policy!]! non-null Selling plan pricing details.
- Anchor to translationstranslations•[Translation!]!non-null
The published translations associated with the resource.
- Anchor to localelocale•String!required
Filters translations locale.
- Anchor to marketIdmarket•ID
Id Filters translations by market ID. Use this argument to retrieve content specific to a market.
Arguments
- Anchor to metafieldDefinitionsmetafield•Metafield
Definitions Definition Connection! non-nullDeprecated - Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to namespacenamespace•String
Filter metafield definitions by namespace.
- Anchor to pinnedStatuspinned•Metafield
Status Definition Pinned Status Default:ANY Filter by the definition's pinned status.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators.
name type description acceptable_values default_value example_use default string Filter by a case-insensitive search of multiple fields in a document. - query=Bob Norman
-query=title:green hoodiecreated_at time Filter by the date and time when the metafield definition was created. -
-
-id id Filter by idrange.- id:1234
-id:>=1234
-id:<=1234key string Filter by the metafield definition keyfield. - key:some-keynamespace string Filter by the metafield definition namespacefield. - namespace:some-namespaceowner_type string Filter by the metafield definition field. - type string Filter by the metafield definition typefield. - updated_at time Filter by the date and time when the metafield definition was last updated. -
-| You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Metafield
Key Definition Sort Keys Default:ID Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Arguments
Anchor to InterfacesInterfaces
- HasMetafieldDefinitions
- HasMetafields
- HasPublishedTranslations
- Node
- •interface
- •interface