Subscription Override Line Items
Subscription override line items allow you to customize pricing for specific subscriptions by overriding the default plan prices. This feature is useful when you need to offer special pricing, bulk discounts, or custom billing arrangements for individual customers.Overview
Override line items enable you to modify various aspects of a subscription’s pricing:- Quantity: Override the default quantity for a specific price
- Amount: Set custom pricing amounts for specific line items
- Billing Model: Change the billing model for a specific price
- Tier Mode: Modify how tiered pricing is calculated
- Tiers: Define custom pricing tiers for the subscription
- Transform Quantity: Apply quantity transformations for package pricing
When to Use Override Line Items
Use override line items in these scenarios:- Custom Pricing: Offer special rates for enterprise customers
- Bulk Discounts: Provide volume-based pricing adjustments
- Promotional Offers: Apply temporary pricing changes
- Contract Negotiations: Honor specific pricing agreements
- Regional Pricing: Adjust prices based on customer location
Structure
Each override line item requires:Required Fields
price_id
: References the plan price to override (must exist in the selected plan)
Optional Fields
quantity
: Custom quantity for this line itemamount
: New price amount that overrides the original pricebilling_model
: Override the billing model for this pricetier_mode
: Change how tiered pricing is calculatedtiers
: Define custom pricing tierstransform_quantity
: Apply quantity transformations
Billing Model Overrides
Flat Fee Billing Model
When overriding toFLAT_FEE
, you must provide either an amount
or quantity
:
- Fixed monthly fees
- One-time charges
- Service-based pricing
Tiered Billing Model
When overriding toTIERED
, you must provide either tier_mode
or tiers
:
VOLUME
: All units priced based on the final tier reachedSLAB
: Tiers apply progressively as quantity increases
up_to
: Quantity threshold (null for the last tier)unit_amount
: Price per unit in this tierflat_amount
: Additional flat fee for this tier (optional)
Package Billing Model
When overriding toPACKAGE
, you must provide transform_quantity
:
divide_by
: Number of units per package (must be > 0)round
: Rounding behavior ("up"
or"down"
)
- Bulk pricing (e.g., 10 units for $5.00)
- Resource bundling
- Simplified billing for large quantities
Validation Rules
General Requirements
- At least one override field must be provided
- All amounts must be non-negative
- All quantities must be non-negative
- Price ID must reference a valid price in the selected plan
Billing Model Specific Rules
Tiered Billing
- Must provide either
tier_mode
ortiers
- If
tiers
provided, each tier must have a validunit_amount
unit_amount
must be a valid decimal numberflat_amount
(if provided) must be a valid decimal number
Package Billing
transform_quantity.divide_by
must be greater than 0transform_quantity.round
must be either"up"
or"down"
- Defaults to
"up"
if not specified
Flat Fee Billing
- Must provide either
amount
orquantity
Examples
Basic Quantity Override
Custom Tiered Pricing
Package Pricing with Custom Rounding
Multiple Overrides
Best Practices
1. Plan Your Overrides
- Identify which prices need customization
- Understand the impact on billing calculations
- Consider how overrides affect reporting
2. Validate Business Logic
- Ensure override amounts make business sense
- Verify tier structures are logical
- Test edge cases with different quantities
3. Document Changes
- Keep records of why overrides were applied
- Note any special conditions or time limits
- Update customer contracts if necessary
4. Monitor Usage
- Track how overrides affect revenue
- Identify patterns in override usage
- Optimize pricing based on override data
Common Use Cases
Enterprise Discounts
Volume Pricing
Promotional Offers
Troubleshooting
Common Issues
-
Validation Errors
- Ensure at least one override field is provided
- Check that amounts and quantities are non-negative
- Verify price ID exists in the selected plan
-
Billing Model Conflicts
- Tiered billing requires tier configuration
- Package billing needs transform quantity
- Flat fee requires amount or quantity
-
Tier Configuration
- Validate tier boundaries are logical
- Ensure last tier has
up_to: null
- Check unit amounts are valid decimals
Error Messages
- “price not found in plan”: Verify the price ID exists in the selected plan
- “at least one override field must be provided”: Add at least one override field
- “invalid tier unit amount format”: Ensure tier amounts are valid decimal numbers
- “transform_quantity.divide_by must be greater than 0”: Set a positive package size
Related Topics
For technical implementation details, refer to the API Reference.