Create and add custom discount to subscription
Creates a custom discount and applies it to a subscription contract. This endpoint allows you to create on-the-fly discounts without requiring pre-existing discount codes in Shopify.
Full behavior, validation rules, and side effects
Discount Creation & Application:
- Custom Discount: Creates discount directly on subscription contract
- Flexible Types: Supports percentage off or fixed amount off
- Cycle Limits: Optional limit on number of billing cycles discount applies
- Item-Level Control: Option to apply discount to each item vs entire order
- Immediate Effect: Discount applies to next billing cycle
Discount Parameters:
- Percentage: Percentage discount (e.g., 15 for 15% off) - use for discountType=‘PERCENTAGE’
- Amount: Fixed amount discount (e.g., 10.00 for $10 off) - use for discountType=‘FIXED_AMOUNT’
- Title: Display name for the discount (e.g., ‘Loyalty Discount’)
- Cycle Limit: Number of billing cycles discount applies (null = unlimited)
- Applies On Each Item: true = per-item discount, false = order-level discount
Discount Types:
- PERCENTAGE: Percentage-based discount (use ‘percentage’ parameter)
- FIXED_AMOUNT: Fixed dollar amount discount (use ‘amount’ parameter)
Cycle Limit Examples:
recurringCycleLimit=1: Discount for first order onlyrecurringCycleLimit=3: Discount for first 3 ordersrecurringCycleLimit=null: Discount applies forever
Use Cases:
- Customer retention offers (e.g., 20% off next 3 orders)
- Loyalty rewards and point redemptions
- Win-back campaigns with limited-time discounts
- Customer service compensation discounts
- Referral program rewards
- First-order discounts for new subscribers
- Seasonal promotions on existing subscriptions
Example Scenarios:
- Retention Offer: 25% off for 2 billing cycles
- percentage=25, recurringCycleLimit=2, discountType=‘PERCENTAGE’
- Loyalty Reward: $5 off every order forever
- amount=5.00, recurringCycleLimit=null, discountType=‘FIXED_AMOUNT’
- First Order Deal: 50% off first order only
- percentage=50, recurringCycleLimit=1, discountType=‘PERCENTAGE’
Returns: Updated subscription contract object with discount applied
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 to add discount to
API Key (Deprecated - Use Header X-API-Key instead)
Percentage discount value (use with discountType=PERCENTAGE)
Display title for the discount
Number of billing cycles discount applies (null for unlimited)
Apply discount to each item individually (true) or entire order (false)
Fixed amount discount value (use with discountType=FIXED_AMOUNT)
Discount type: PERCENTAGE or FIXED_AMOUNT
Response
Discount successfully created and applied to subscription
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN SUCCEEDED, FAILED, $UNKNOWN