ChargebeeAPI

Edit a quote for subscription update

Idempotency Supported
Try in API Explorer

Changes the quote produced for updating the subscription items.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/quotes/{quote-id}/edit_update_subscription_quote_for_items

Input Parameters

notes
optional, string, max chars=2000

Notes specific to this quote that you want customers to see on the quote PDF.

expires_at
optional, timestamp(UTC) in seconds

Quotes will be valid till this date. After this quote will be marked as closed.

mandatory_items_to_remove
optional, string

Item ids of mandatorily attached addons that are to be removed from the subscription.

replace_items_list
optional, boolean, default=false

If true then the existing subscription_items list for the subscription is replaced by the one provided. If false then the provided subscription_items list gets added to the existing list.

billing_cycles
optional, integer, min=0

Billing cycles set for plan-item price is used by default.

terms_to_charge
optional, integer, min=1

The number of subscription billing cycles to invoice in advance. If a new term is started for the subscription due to this API call, then terms_to_charge is inclusive of this new term. See description for the force_term_reset parameter to learn more about when a subscription term is reset.

reactivate_from
optional, timestamp(UTC) in seconds

If the subscription status is cancelled and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated. Note: It is recommended not to pass this parameter along with changed_scheduled_at. reactivate_from can be backdated (set to a value in the past). Use backdating when the subscription has been reactivated already but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:

  • Backdating must be enabled for subscription reactivation operations.
  • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.
  • The date is on or after the last date/time any of the product catalog items of the subscription were changed.
  • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February. .
billing_alignment_mode
optional, enumerated string

Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.

Possible Enum Values
immediate

Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..

delayed

Subscription period will be aligned with the configured billing date at the next renewal.

coupon_ids
optional, string

The list of IDs of the coupons to be applied. Coupon codes are also supported.

Note

Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.

replace_coupon_list
optional, boolean, default=false

Should be true if the existing coupons should be replaced with the ones that are being passed.

change_option
optional, enumerated string

When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.

Possible Enum Values
immediately

The change is carried out immediately.

specific_date

The change is carried out as of the date specified under changes_scheduled_at .

changes_scheduled_at
optional, timestamp(UTC) in seconds

When change_option is set to specific_date , then set the date/time at which the subscription change is to happen or has happened. changes_scheduled_at can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met:

  • Backdating must be enabled for subscription change operations.

  • Only the following changes can be backdated:

  • Changes in the recurring items or their prices.

  • Addition of non-recurring items.

  • Subscription status is active, cancelled, or non_renewing.

  • The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed.

  • The date is on or after current_term_start.

  • The date is on or after the last date/time any of the following changes were made:

  • Changes in the recurring items or their prices.

  • Addition of non-recurring items.

  • The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, changes_scheduled_at cannot be earlier than 14th February. .

force_term_reset
optional, boolean, default=false

Applicable for 'Active' & 'Non Renewing' states alone. Generally, subscription's term will be reset (i.e current term is ended and a new term starts immediately) when a new plan having different billing frequency is specified in the input. For all the other cases, the subscription's term will remain intact. Now for this later scenario, if you want to force a term reset you can specify this param as 'true'. Note: Specifying this value as 'false' has no impact on the default behaviour.

reactivate
optional, boolean

Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.

net_term_days
optional, integer

The number of days within which the customer has to make payment for the invoice.

Note The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.

subscription
optional, timestamp(UTC) in seconds

Parameters for subscription

billing_address
optional, string

Parameters for billing_address

shipping_address
optional, string

Parameters for shipping_address

customer
optional, string

Parameters for customer

contract_term
optional, enumerated string

Parameters for contract_term

subscription_items
optional, string

Parameters for subscription_items

discounts
optional, enumerated string

Parameters for discounts

item_tiers
optional, string

Parameters for item_tiers

coupons
optional, string

Returns

quoteQuote object

Resource object representing quote

quoted_subscriptionQuoted subscription object

Resource object representing quoted_subscription

quoted_rampQuoted ramp object

Resource object representing quoted_ramp