Subscription Contracts
Update billing interval for a subscription contract
Updates the billing frequency (how often the customer is charged) for a subscription contract. This comprehensive operation recalculates billing dates, adjusts pricing, updates selling plans, and may also modify delivery intervals.
Full behavior, validation rules, and side effects
Key Features:
- Changes billing frequency while maintaining subscription continuity
- Automatically adjusts delivery interval when linked to billing
- Recalculates next billing date based on store settings
- Reprices all line items for the new frequency
- Finds and applies matching selling plans
- Handles anchor day adjustments for consistent billing
- Validates prepaid subscription constraints
Billing Interval Types:
- DAY: Daily billing (use with caution)
- WEEK: Weekly billing (e.g., every 1, 2, 3 weeks)
- MONTH: Monthly billing (e.g., every 1, 2, 3 months)
- YEAR: Annual billing
Validation Rules:
- Cannot set the same interval as current (no-op prevention)
- For prepaid subscriptions: billing interval must exceed delivery interval
- Example: Can’t bill monthly if delivering weekly (would be paying for 1 delivery but receiving 4)
Next Billing Date Calculation: The system uses sophisticated logic to determine the new billing date:
- Starts from current or last successful billing date
- Applies store timezone and order time preferences
- Ensures date is in the future
- Respects day-of-week preferences if configured
- May keep current date if ‘enableChangeFromNextBillingDate’ is false
Side Effects:
- Delivery Interval: Updated if currently equal to billing interval
- Line Item Pricing: Recalculated based on new frequency multiplier
- Selling Plans: Finds and applies best matching plans for products
- Anchor Days: Updates billing anchor for consistent scheduling
- Email Notifications: Sends ‘ORDER_FREQUENCY_UPDATED’ to customer
- Activity Logs: Records both billing and delivery changes
Prepaid vs Pay-Per-Delivery:
- Pay-per-delivery: Billing and delivery intervals typically match
- Prepaid: Customer pays upfront for multiple deliveries
- This endpoint enforces prepaid logic to prevent undercharging
Authentication: Requires valid X-API-Key header
PUT
Update billing interval for a subscription contract
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.
Query Parameters
Available options:
DAY, WEEK, MONTH, YEAR, $UNKNOWN Response
Billing interval updated successfully
Available options:
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN Available options:
SUCCEEDED, FAILED, $UNKNOWN