Sets up advanced pricing rules for a subscription line item that change based on the number of successful orders (cycles). This powerful feature enables loyalty discounts, promotional pricing tiers, and subscribe-and-save models.
What are Pricing Policies? Pricing policies define how a product’s price changes over the subscription lifetime:
Supported Discount Types:
Cycle Counting:
Common Use Cases:
Important Limitations:
Prepaid Subscription Handling: For prepaid subscriptions (e.g., pay monthly for weekly delivery):
Side Effects:
Authentication: Requires valid X-API-Key header
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-pricing-policy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
[
{
"afterCycle": 3,
"discountType": "PERCENTAGE",
"value": 10
}
]
'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 1,
"variantId": "gid://shopify/ProductVariant/42549172011164",
"currentPrice": {
"amount": "24.99",
"currencyCode": "USD"
},
"pricingPolicy": {
"basePrice": {
"amount": "24.99",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"afterCycle": 3,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 10
},
"computedPrice": {
"amount": "22.49",
"currencyCode": "USD"
}
},
{
"afterCycle": 6,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 15
},
"computedPrice": {
"amount": "21.24",
"currencyCode": "USD"
}
}
]
}
}
}
]
}
}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.
API Key for authentication
API Key (Deprecated - Use X-API-Key header instead)
Subscription contract ID
x >= 1Line item ID to update. Must be full GraphQL ID format
Base price for the product (before any discounts). This is the starting price
0.01 <= x <= 999999.99List of cycle-based pricing rules. Maximum 2 cycles, must have unique afterCycle values
The body is of type string.
Pricing policy successfully updated
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN Show child attributes
SUCCEEDED, FAILED, $UNKNOWN Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-pricing-policy \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
[
{
"afterCycle": 3,
"discountType": "PERCENTAGE",
"value": 10
}
]
'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 1,
"variantId": "gid://shopify/ProductVariant/42549172011164",
"currentPrice": {
"amount": "24.99",
"currencyCode": "USD"
},
"pricingPolicy": {
"basePrice": {
"amount": "24.99",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"afterCycle": 3,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 10
},
"computedPrice": {
"amount": "22.49",
"currencyCode": "USD"
}
},
{
"afterCycle": 6,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 15
},
"computedPrice": {
"amount": "21.24",
"currencyCode": "USD"
}
}
]
}
}
}
]
}
}