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
status as scheduled.changes_scheduled_at parameter cannot be set to a future date when the ramps feature is enabled.{
"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
}
]
}include_deleted set to true. Allowed only when both of these conditions are met:
pricing_model of the item price is either tiered, volume, or stairstep.Overrides the item_tiers for specific item_prices of the subscription.
Creates a ramp for a subscription.
Note
paused or cancelled status.status as scheduled.effective_from of two consecutive ramps.pause_date or cancelled_at.Ensure this list does not include:
Ensure this list does not include discounts already removed by a previous ramp.
Ensure this list does not include:
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
Step 2: Update ramp with new values
Note
succeeded or failed status.effective_from of two consecutive ramps.pause_date or cancelled_at.Ensure this list does not include:
Ensure this list does not include discounts already removed by a previous ramp.
Ensure this list does not include:
Retrieves a specific subscription ramp.
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. |
Lists the subscription ramps that match the criteria provided in the filter parameters.
Note
By default, the ramps are returned sorted in descending order (latest first) by updated_at.
status.subscription_id filter must be passed when filtering by status.status filter should not be passed when include_deleted is set to true.effective_from. subscription_id filter must be passed when filtering by effective_from.effective_from filter should not be passed when include_deleted is set to true.updated_at.Specify sort_by = updated_at (whether asc oor desc) for a faster response when using this filter.