Update selling plan for a subscription line item
Updates the selling plan associated with a specific product line item in a subscription contract. Selling plans define the delivery schedule, pricing rules, and billing policies for subscription products.
Full behavior, validation rules, and side effects
What are Selling Plans? Selling plans are Shopify’s way of defining subscription rules for products:
- Delivery Schedule: How often the product is delivered (e.g., ‘every 2 weeks’, ‘monthly’)
- Pricing Policy: Discounts and pricing tiers (e.g., ‘10% off’, ‘first order free’)
- Billing Policy: When and how often customer is charged
- Plan Name: Customer-facing description like ‘Deliver every month’
Key Features:
- Update by selling plan ID or name (name takes precedence if both provided)
- Validates line item exists before attempting update
- Only creates activity log if plan actually changes
- Uses Shopify’s draft system for safe updates
- Preserves existing line item attributes and customizations
Common Use Cases:
- Change delivery frequency: Weekly → Monthly
- Switch pricing tiers: Regular → VIP pricing
- Update from old plan to new plan with better terms
- Migrate products to new selling plan groups
- Apply seasonal or promotional plans
Update Process:
- Validates subscription contract and line item exist
- Creates a draft of the subscription contract
- Updates the line item’s selling plan in the draft
- Commits the draft to apply changes
- Records activity log if plan changed
Impact of Selling Plan Changes:
- Delivery Schedule: Next and future orders follow new schedule
- Pricing: New plan’s pricing applies from next billing
- Discounts: Plan-specific discounts are recalculated
- Billing: Billing frequency may change with the plan
Finding Selling Plans: To find available selling plans:
- Check product’s selling plan groups in Shopify admin
- Use Shopify’s GraphQL API to query selling plans
- Plans must be active and associated with the product
Important Notes:
- Both sellingPlanId and sellingPlanName are optional, but at least one required
- If both provided, both are updated (name doesn’t override ID)
- Plan must be valid for the product variant
- Changes apply to future orders only
- No customer notification sent (consider sending separately)
Authentication: Requires valid X-API-Key header
Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Headers
API Key for authentication
Query Parameters
The unique identifier of the subscription contract
x >= 1The unique identifier of the line item in the subscription contract. Must be in full GraphQL ID format
The unique identifier of the new selling plan. Provide the numeric ID without gid:// prefix. Required if sellingPlanName is not provided. The plan must be:
- Active in your Shopify store
- Associated with the product variant
- Part of an active selling plan group
x >= 1The customer-facing name of the new selling plan. Required if sellingPlanId is not provided. This is the name shown to customers like 'Deliver every 2 weeks' or 'Monthly subscription'. Must match exactly as configured in Shopify
255Response
Selling plan updated successfully
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN SUCCEEDED, FAILED, $UNKNOWN