Introducing OpenTelemetry for Chargebee SDKs — trace every API call in any telemetry tool.
Chargebeechargebee API

Create a subscription ramp

Creates a ramp for a subscription.

Prerequisites & Constraints

  • Manual Discounts for Quotes and Subscriptions must be enabled for your site to provide discounts_to_add.
  • Product Catalog 2.0 must be enabled for your site to provide discounts_to_add.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/subscriptions/{subscription-id}/create_ramp

Input Parameters

effective_from
required, timestamp(UTC) in seconds

The time when this ramp takes effect.

Constraint
  • effective_from must be a future timestamp.
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.

Constraint
  • Each coupon ID in coupons_to_remove must be unique. The same coupon ID cannot be listed more than once.
discounts_to_remove
optional, string, max chars=100

List of discounts removed from the subscription through this ramp.

Constraint
  • Each discount ID in discounts_to_remove must be unique. The same discount ID cannot be listed more than once.
items_to_remove
optional, string, max chars=100

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

Constraints
  • The same item_price_id or coupon_id cannot appear more than once across items_to_add, items_to_update, items_to_remove, and coupons_to_add.
  • The item_price_id referenced in items_to_remove does not exist.
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