API Version
Product Catalog
Library

When a quote is created, it generates the quoted_subscription resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.

Sample quoted subscription [ JSON ]

{ "plan_id": "basic", "plan_quantity": 1, "billing_period": 1, "billing_period_unit": "month", "object": "quoted_subscription", "addons": [ { "id": "ssl", "quantity": 1, "unit_price": 495, "object": "addon" } ], "event_based_addons": [ { "id": "day-pass", "quantity": 2, "unit_price": 200, "on_event": "subscription_creation", "charge_once": true, "object": "event_based_addon" } ], "coupons": [ { "coupon_id": "plan_addons_coupon", "object": "coupon" } ] }

API Index URL GET

https://{site}.chargebee.com/api/v2/quoted_subscriptions

Model Class

id
string, max chars=50
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
start_date
optional, timestamp(UTC) in seconds
Applicable only when operation_type of the quote is create_subscription_for_customer. For subscriptions in the future status, this is the date/time when the subscription is set to start. The quote can be converted on a date/time after this date. This is called backdating the subscription creation. Backdating is performed when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
  • Backdating is enabled for subscription creation operations.
  • The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.
  • 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, the start_date cannot be earlier than 14th February.

trial_end
optional, timestamp(UTC) in seconds
End of the trial period for the subscription. Presence of this value for 'future' subscription implies the subscription will go into 'in_trial' state when it starts.
remaining_billing_cycles
optional, integer, min=0
  • When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels.
  • When the subscription is on a contract term: this value is the number of billing cycles remaining in the contract term after the current billing cycle.

po_number
optional, string, max chars=100
Purchase order number for this subscription.
plan_quantity_in_decimal
optional, string, max chars=33
The decimal representation of the quantity of the plan purchased. Returned for quantity-based plans when multi-decimal pricing is enabled.
plan_unit_price_in_decimal
optional, string, max chars=39
The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
changes_scheduled_at
optional, timestamp(UTC) in seconds
Applicable only when operation_type of the quote is change_subscription. When change_option is set to specific_date, then this is the date/time at which the subscription change is scheduled to occur. The quote can be converted on a date/time after this date. This is called backdating the subscription change and performed when the subscription change has already been provisioned but the conversion action 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.

change_option
optional, enumerated string
Applicable only when operation_type of the quote is change_subscription. When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
Possible values are
end_of_termThe change is scheduled to be carried out at the end of the billing cycle of the subscription.specific_dateThe change is carried out as of changes_scheduled_at.immediatelyThe change is carried out immediately upon quote conversion.
Show all values[+]
contract_term_billing_cycle_on_renewal
optional, integer, min=1, max=100
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
optional, list of coupon
List of coupons for this subscription
optional, list of discount
List of discounts for this quoted subscription.
subscription_items
Show attributes [+]
optional, list of subscription_item
Details of individual item prices that are part of this subscription
optional, list of item_tier
List of item tier.
quoted_contract_term
Show attributes [+]
optional, quoted_contract_term
The details of the contract term to be created when this quote is invoiced.
id id
string, max chars=50
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
start_date start_date
optional, timestamp(UTC) in seconds
Applicable only when operation_type of the quote is create_subscription_for_customer. For subscriptions in the future status, this is the date/time when the subscription is set to start. The quote can be converted on a date/time after this date. This is called backdating the subscription creation. Backdating is performed when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met:
  • Backdating is enabled for subscription creation operations.
  • The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed.
  • 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, the start_date cannot be earlier than 14th February.

trial_end trial_end
optional, timestamp(UTC) in seconds
End of the trial period for the subscription. Presence of this value for 'future' subscription implies the subscription will go into 'in_trial' state when it starts.
remaining_billing_cycles remaining_billing_cycles
optional, integer, min=0
  • When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels.
  • When the subscription is on a contract term: this value is the number of billing cycles remaining in the contract term after the current billing cycle.

po_number po_number
optional, string, max chars=100
Purchase order number for this subscription.
plan_quantity_in_decimal plan_quantity_in_decimal
optional, string, max chars=33
The decimal representation of the quantity of the plan purchased. Returned for quantity-based plans when multi-decimal pricing is enabled.
plan_unit_price_in_decimal plan_unit_price_in_decimal
optional, string, max chars=39
The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
changes_scheduled_at changes_scheduled_at
optional, timestamp(UTC) in seconds
Applicable only when operation_type of the quote is change_subscription. When change_option is set to specific_date, then this is the date/time at which the subscription change is scheduled to occur. The quote can be converted on a date/time after this date. This is called backdating the subscription change and performed when the subscription change has already been provisioned but the conversion action 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.

change_option change_option
optional, enumerated string
Applicable only when operation_type of the quote is change_subscription. When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
contract_term_billing_cycle_on_renewal contract_term_billing_cycle_on_renewal
optional, integer, min=1, max=100
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
coupons
optional, list of coupon
List of coupons for this subscription
discounts
optional, list of discount
List of discounts for this quoted subscription.
subscription_items
optional, list of subscription_item
Details of individual item prices that are part of this subscription
item_tiers
optional, list of item_tier
List of item tier.
quoted_contract_term
optional, quoted_contract_term
The details of the contract term to be created when this quote is invoiced.