Update product variant in subscription contract
Replaces an existing product variant with a new variant in a subscription contract. This allows customers to swap products in their membership while maintaining their subscription.
Full behavior, validation rules, and side effects
Key Features:
- Product Swapping: Replace any line item’s variant with a different variant
- Quantity Preservation: Maintains the same quantity after variant swap
- Price Updates: New variant pricing is applied automatically
- Flexible Identification: Identify old variant by lineId OR variantId
- Activity Logging: All variant changes are logged for audit trail
Identification Methods: You can identify the old variant using either:
- oldLineId: The Shopify line item ID from the subscription contract
- oldVariantId: The Shopify product variant ID At least one of these must be provided.
Common Use Cases:
- Customer wants to change product flavor/color/size in their membership
- Swap discontinued products with new alternatives
- Change product preferences mid-subscription
- Update seasonal product selections
- Replace out-of-stock variants with alternatives
Important Notes:
- Immediate Effect: Variant change applies to the next billing cycle
- Validation: System validates new variant exists and is available
- Same Product: Old and new variants can be from different products
- Price Changes: Customer is charged the new variant’s price
Variant ID Format:
- Accepts both numeric IDs and GraphQL IDs (gid://shopify/ProductVariant/…)
- System automatically converts to correct format
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
Documentation Index
Fetch the complete documentation index at: https://developers.appstle.com/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Query Parameters
Subscription contract ID
API Key (Deprecated - Use Header X-API-Key instead)
Line item ID to replace (provide either oldLineId or oldVariantId)
Old variant ID to replace (provide either oldLineId or oldVariantId)
New variant ID to use as replacement
Skip billing on plan change (no charge or refund)
Response
Variant successfully updated in subscription contract
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN SUCCEEDED, FAILED, $UNKNOWN