ChargebeeAPI

Update a subscription ramp

Idempotency SupportedBatch
Try in API Explorer

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

  1. Send a request to retrieve the current values of all parameters for the subscription ramp using Retrieve a subscription ramp API.
  2. 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

  1. 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.
  2. Send the prepared request to Update subscription ramp API.
    • Verify the response object to ensure a successful subscription ramp update. If it returns an error, repeat step 1 again.

Note

  • Ramp status: You cannot update a ramp in succeeded or failed status.
  • Advance invoice: You cannot update ramps for subscriptions that have an advance invoice schedule.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/ramps/{ramp-id}/update

Input Parameters

effective_from
required, timestamp(UTC) in seconds

The time when this ramp takes effect.

Caution

  • Ensure the time is within five years from the current time.
  • Ensure there is a minimum 24-hour interval between effective_from of two consecutive ramps.
  • If the subscription is scheduled to be paused or canceled in the future, ensure the time is not on or after pause_date or cancelled_at.
description
optional, string, max chars=250

A brief summary of the pricing changes applied with this ramp.

coupons_to_remove
optional, string

List of coupons removed from the subscription through this ramp.

Caution Ensure this list does not include:

  • Coupons being added through this ramp.
  • Coupons already removed by a previous ramp.
discounts_to_remove
optional, string

List of discounts removed from the subscription through this ramp.

Caution Ensure this list does not include discounts already removed by a previous ramp.

items_to_remove
optional, string

List of item prices removed from the subscription through this ramp.

Caution Ensure this list does not include:

  • Item prices being added or updated through this ramp.
  • Item prices already removed by a previous ramp.
contract_term
optional, enumerated string

An object that specifies the contract term details.

items_to_add
optional, string

Details about the item prices added to the subscription through this ramp.

items_to_update
optional, string

Details about the item prices updated in the subscription through this ramp.

item_tiers
optional, string

Note 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.

coupons_to_add
optional, string

Details about the coupons added to the subscription through this ramp.

discounts_to_add
optional, enumerated string

Details about the discounts added to the subscription through this ramp.

Returns

rampRamp object

Resource object representing ramp