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
}
]
}Indicates if the ramp is marked as deleted. To retrieve deleted ramps, use the List subscription ramps
endpoint with include_deleted
set to true
.
Details about the item prices added to the subscription through this ramp.
Details about the item prices updated in the subscription through this ramp.
Details about the coupons added to the subscription through this ramp.
Details about the discounts added to the subscription through this ramp.
Note 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.
An object that specifies the contract term details.
Creates a ramp for a subscription.
Note
paused or cancelled status.status as scheduled.The time when this ramp takes effect.
Caution
effective_from of two consecutive ramps.pause_date or cancelled_at.List of coupons removed from the subscription through this ramp.
Caution Ensure this list does not include:
List of discounts removed from the subscription through this ramp.
Caution Ensure this list does not include discounts already removed by a previous ramp.
List of item prices removed from the subscription through this ramp.
Caution 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.The time when this ramp takes effect.
Caution
effective_from of two consecutive ramps.pause_date or cancelled_at.List of coupons removed from the subscription through this ramp.
Caution Ensure this list does not include:
List of discounts removed from the subscription through this ramp.
Caution Ensure this list does not include discounts already removed by a previous ramp.
List of item prices removed from the subscription through this ramp.
Caution 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.
Filter subscription ramps based on subscription_id
.
Caution
This filter is mandatory when filtering by status or effective_from.
Supported operators : is, in
Example → subscription_id[is] = "8gsnbYfsMLds"
Filter subscription ramps based on effective_from.
Caution
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.Supported operators : after, before, on, between
Example → effective_from[after] = "1435054328"
Filter subscription ramps based on updated_at
.
Tip
Specify sort_by = updated_at (whether asc oor desc) for a faster response when using this filter.
Supported operators : after, before, on, between
Example → updated_at[after] = "1435052328"