Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now
ChargebeeAPI

Update a subscription ramp

Idempotency SupportedBatch

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.

Sample Request

Sample Result[JSON]

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.

description
optional, string, max chars=250

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

coupons_to_remove
optional, string, max chars=100

List of coupons removed from the subscription through this ramp.

discounts_to_remove
optional, string, max chars=100

List of discounts removed from the subscription through this ramp.

items_to_remove
optional, string, max chars=100

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

contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
items_to_add[0..n]
Parameters for items_to_add. Multiple items_to_add can be passed by specifying unique indices.
pass parameters as items_to_add[<param name>][<idx:0..n>]
items_to_update[0..n]
Parameters for items_to_update. Multiple items_to_update can be passed by specifying unique indices.
pass parameters as items_to_update[<param name>][<idx:0..n>]
item_tiers[0..n]
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
coupons_to_add[0..n]
Parameters for coupons_to_add. Multiple coupons_to_add can be passed by specifying unique indices.
pass parameters as coupons_to_add[<param name>][<idx:0..n>]
discounts_to_add[0..n]
Parameters for discounts_to_add. Multiple discounts_to_add can be passed by specifying unique indices.
pass parameters as discounts_to_add[<param name>][<idx:0..n>]

Returns

Ramp object
Resource object representing ramp