The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
Sample ramp [ JSON ]
{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Schedule for first ramp","created_at":"1635054328","deleted":false,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly"],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000}]}
API Index URL GET
https://{site}.chargebee.com/api/v2/ramps
Model Class
Ramp attributes
id
string, max chars=50 A unique and immutable identifier for the ramp.
enumerated string The execution status of the ramp
Possible values are
scheduledThe ramp has been created and scheduled for execution.
Note
Excluding deleted ramps, a subscription can have a maximum of 12 ramps in the scheduledstatus.
succeededThe ramp completed successfully.failedThe ramp did not complete because of an error.draftThe ramp is moved to draft status when the associated subscription is updated. The reason for the draft status can be explained in the status_transition_reason
Note
Ramps in draft state will not be executed.
scheduledThe ramp has been created and scheduled for execution.
Note
Excluding deleted ramps, a subscription can have a maximum of 12 ramps in the scheduledstatus.
succeededThe ramp completed successfully.failedThe ramp did not complete because of an error.draftThe ramp is moved to draft status when the associated subscription is updated. The reason for the draft status can be explained in the status_transition_reason
optional, long Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource.
boolean Indicates if the ramp is marked as deleted. To retrieve deleted ramps, use the List subscription ramps endpoint with include_deleted set to true.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, in cents, min=0 The total amount for the item as determined from unit_price, free_quantity, quantity and item_tiers as applicable. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the total amount for the item, in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 The quantity of the item price that is available for free. Only the quantity more than this will be charged for the subscription. This is the same as item_price.free_quantity.
optional, string, max chars=33 The free_quantity_in_decimal as set for the item price. Returned for quantity-based item prices when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, in cents, min=0 The total amount for the item as determined from unit_price, free_quantity, quantity and item_tiers as applicable. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the total amount for the item, in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 The quantity of the item price that is available for free. Only the quantity more than this will be charged for the subscription. This is the same as item_price.free_quantity..
optional, string, max chars=33 The free_quantity_in_decimal as set for the item price. Returned for quantity-based item prices when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, string, max chars=100 The name of the discount as it should appear on customer-facing pages and documents such as invoices and hosted pages. This is auto-generated based on the type, amount, and currency_code of the discount. For example, it can be 10% off or 10$ off.
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
enumerated string The amount on the invoice to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
in cents, default=0, min=0 The per-unit price for the tier when the pricing_model is tiered or volume. The total cost for the item price when the pricing_model is stairstep. The value is in the minor unit of the currency.
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
optional, enumerated string Pricing type for the tier.
Possible values are
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
optional, integer, min=1 Package size for the tier when pricing type is package. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.
enumerated string The execution status of the ramp
Possible values are
scheduledThe ramp has been created and scheduled for execution.
Note
Excluding deleted ramps, a subscription can have a maximum of 12 ramps in the scheduledstatus.
succeededThe ramp completed successfully.failedThe ramp did not complete because of an error.draftThe ramp is moved to draft status when the associated subscription is updated. The reason for the draft status can be explained in the status_transition_reason
Note
Ramps in draft state will not be executed.
scheduledThe ramp has been created and scheduled for execution.
Note
Excluding deleted ramps, a subscription can have a maximum of 12 ramps in the scheduledstatus.
succeededThe ramp completed successfully.failedThe ramp did not complete because of an error.draftThe ramp is moved to draft status when the associated subscription is updated. The reason for the draft status can be explained in the status_transition_reason
optional, long Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource.
boolean Indicates if the ramp is marked as deleted. To retrieve deleted ramps, use the List subscription ramps endpoint with include_deleted set to true.
Subscription status: You cannot create ramps for subscriptions in the paused or cancelledstatus.
Advance invoice: You cannot create ramps for subscriptions that have an advance invoice schedule.
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
You cannot create a ramp for subscription, when ramps are in draft status.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
{"ramp":{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Schedule for first ramp","created_at":"1635054328","deleted":false,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly",{..}],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2},{..}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5},{..}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000},{..}]}}
Allowed only when both of these conditions are met:
Price overriding is enabled for the site.
pricing_model of the item price is either tiered, volume, or stairstep.
Replaces the existing item_tiers for specific item_prices within the subscription. You must provide the complete tier set for any item_price, even if you’re changing the price for only one tier.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
<div class="alert alert-warning"> <strong>Note</strong> <p>Allowed only when both of these conditions are met:</p> <ul> <li>Price overriding is enabled for the site.</li> <li>pricing_model of the item price is either tiered, volume, or stairstep.</li> </ul> </div> <p>Replaces the existing item_tiers for specific <code>item_price</code>s within the subscription. You must provide the complete tier set for any <code>item_price</code>, even if you’re changing the price for only one tier.</p>
item_price_id
optional, string, max chars=100 The identifier of the item_price for which the tier price is being overridden.
Caution
The identifier must correspond to an item_price listed in either items_to_add or items_to_update.
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
optional, enumerated string Pricing type for the tier.
Possible values are
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
optional, integer, min=1 Package size for the tier when pricing type is package. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.
Details about the <a href="/docs/api/discounts?prod_cat_ver=2">discounts</a> added to the subscription through this ramp.
apply_on
required, enumerated string The amount on the invoice to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
Updates an existing subscription ramp by replacing its current attribute values with the new parameters provided. When using this API to modify a ramp, make sure to include all the ramp's attributes as you would do during creation of the ramp with the necessary values updated.
Example: step-by-step flow
The following steps explains how to update effective_from value of an existing ramp.
Step 1: Retrieve current ramp values
Send a request to retrieve the current values of all parameters for the subscription ramp using Retrieve a subscription ramp API.
Review the response to get the current values of the ramp's attributes. Note down all the parameters and their values.
Step 2: Update ramp with new values
Prepare the request to update the ramp.
Update the effective_from value in the noted down attributes of ramp from the previous step.
Ensure all parameters, even those not being changed, are included in the request.
{"ramp":{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Updated description for first ramp","created_at":"1635054328","deleted":false,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly",{..}],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2},{..}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5},{..}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000},{..}]}}
Allowed only when both of these conditions are met:
Price overriding is enabled for the site.
pricing_model of the item price is either tiered, volume, or stairstep.
Replaces the existing item_tiers for specific item_prices within the subscription. You must provide the complete tier set for any item_price, even if you’re changing the price for only one tier.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency.
optional, string, max chars=39 The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
<div class="alert alert-warning"> <strong>Note</strong> <p>Allowed only when both of these conditions are met:</p> <ul> <li>Price overriding is enabled for the site.</li> <li>pricing_model of the item price is either tiered, volume, or stairstep.</li> </ul> </div> <p>Replaces the existing item_tiers for specific <code>item_price</code>s within the subscription. You must provide the complete tier set for any <code>item_price</code>, even if you’re changing the price for only one tier.</p>
item_price_id
optional, string, max chars=100 The identifier of the item_price for which the tier price is being overridden.
Caution
The identifier must correspond to an item_price listed in either items_to_add or items_to_update.
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
optional, enumerated string Pricing type for the tier.
Possible values are
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
per_unitIndicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).flat_feeIndicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the stairstep pricing model, pricing_type will be set to flat_fee by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).
optional, integer, min=1 Package size for the tier when pricing type is package. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.
Details about the <a href="/docs/api/discounts?prod_cat_ver=2">discounts</a> added to the subscription through this ramp.
apply_on
required, enumerated string The amount on the invoice to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
{"ramp":{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Schedule for first ramp","created_at":"1635054328","deleted":false,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly",{..}],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2},{..}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5},{..}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000},{..}]}}
The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
Deletes the specified subscription ramp. However, Chargebee only allows deleting a ramp if it does not conflict with future ramps on the subscription. The following checks are performed to ensure compatibility:
Condition
Restriction
The ramp contains items_to_add[]
The ramp cannot be deleted if any of the items in items_to_add[] are scheduled to be updated or removed in a subsequent ramp.
The ramp contains coupons_to_add[]
The ramp cannot be deleted if any of the coupons in coupons_to_add[] are scheduled to be removed in a subsequent ramp.
The ramp contains discounts_to_add[]
The ramp cannot be deleted if any of the discounts in discounts_to_add[] are scheduled to be removed in a subsequent ramp.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Notes
Sample Codes
curl https://{site}.chargebee.com/api/v2/ramps/__test__rHsiT4rY2hC1A/delete \
-X POST \
-u {site_api_key}:
copy
Click to Copy
curl https://{site}.chargebee.com/api/v2/ramps/__test__rHsiT4rY2hC1A/delete \-X POST \
-u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/ramps/__test__rHsiT4rY2hC1A/delete \-X POST \
-u {site_api_key}:
Sample Result [ JSON ]
Show more...
{"ramp":{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Schedule for first ramp","created_at":"1635054328","deleted":true,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly",{..}],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2},{..}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5},{..}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000},{..}]}}
The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
{"list":[{"ramp":{"id":"__test__rHsiT4rY2hC1A","effective_from":"1635054328","subscription_id":"__test__8asukSOXdv6kOj","status":"scheduled","description":"Schedule for first ramp","created_at":"1635054328","deleted":false,"updated_at":"1635054328","items_to_remove":["basicAddon1-USD-Monthly",{..}],"items_to_add":[{"item_price_id":"basicAddon2-USD-Monthly","quantity":2},{..}],"discounts_to_add":[{"duration_type":"one_time","apply_on":"invoice_amount","percentage":5},{..}],"items_to_update":[{"item_price_id":"basicPlan-USD-Monthly","unit_price":20000},{..}]}},{..}]}
URL Format
GET
https://{site}.chargebee.com/api/v2/ramps
Method
Input Parameters
limit[]
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
The ramp resource or a subscription ramp represents a planned change to a subscription set to occur at a future date. By using this resource, you can define and schedule modifications to a subscription, such as updating pricing, altering the quantity, or transitioning to a different plan, without immediately applying them.
Note
Upcoming ramps limit: A subscription can have a maximum of 12 upcoming ramps at any given time, excluding deleted ramps. Upcoming ramps are ramps with status as scheduled.
Total ramps limit: A subscription can have a maximum of 100 ramps at any given time, excluding deleted ramps.
Update subscription for items limit: changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.
always returned optional, string, max chars=1000 This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.