A quote is an estimate of the invoice with the charges likely to occur when customers buy an item. A quote can be converted to a regular invoice once the customer accepts it.
The line items of a quote are grouped by charge events and are available as a separate resource. This resource can be retrieved using the List quote line groups endpoint. Note that the first quote line group is available within the quote resource itself and parsing the quote line groups object is not required.
optional, string, max chars=20 VAT/ Tax registration number of the customer. Learn more
price_type
enumerated string, default=tax_exclusive The price type of the quote.
Possible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
valid_till
timestamp(UTC) in seconds Quote will be valid till this date. After this date quote will be marked as closed.
date
timestamp(UTC) in seconds Creation date of the quote. Typically this is the date on which quote is generated.
total_payable
optional, in cents, min=0 Total contract value. Applicable when multi billing cycle quote is enabled.
charge_on_acceptance
optional, in cents, default=0, min=0 Charge on acceptance. Applicable when multi billing cycle quote is enabled.
sub_total
in cents, min=0 Subtotal (in cents) of the first quote line group.
total
optional, in cents, default=0, min=0 Total (in cents) of the first quote line group.
credits_applied
optional, in cents, default=0, min=0 Credits applied (in cents) for the first quote line group.
amount_paid
optional, in cents, default=0, min=0 Existing outstanding payments (in cents) if any, applied to the first quote line group.
amount_due
optional, in cents, default=0, min=0 Amount due (in cents) for the first quote line group.
version
optional, integer, default=1 Version of the quote.
resource_version
optional, long Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.
updated_at
optional, timestamp(UTC) in seconds Timestamp indicating when this quote was last updated.
vat_number_prefix
optional, string, max chars=10 An overridden value for the first two characters of the full VAT
number. Only applicable specifically for customers with billing_addresscountry as XI (which is United Kingdom - Northern Ireland).
When you have enabled EU VAT in 2021 or have manually
enabled the Brexit configuration, you have the option of setting billing_addresscountry as XI. That’s the code for United Kingdom - Northern
Ireland. The first two characters of the VAT number in such a case is
XI by default. However, if the VAT number was registered in UK, the value should be GB. Set
vat_number_prefix to GB for such cases.
tax_category
optional, string, max chars=null Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.
currency_code
string, max chars=3 The currency code (ISO 4217 format) of the quote.
notes
optional, jsonarray List of notes associated with this quotes.
contract_term_start
optional, timestamp(UTC) in seconds Specifies the contract term’s start date.
contract_term_end
optional, timestamp(UTC) in seconds Specifies the contract term’s end date. It indicates when the action set in action_at_term_end gets triggered.
contract_term_termination_fee
optional, in cents, min=0 Specifies the charge to be applied for terminating the contract term.
business_entity_id
string, max chars=50 The unique ID of the business entity of this quote.
optional, list of line_item The list of line items for this quote.
Line item attributes
id
optional, string, max chars=40 Uniquely identifies a line_item
subscription_id
optional, string, max chars=50 A unique identifier for the subscription this line item belongs to.
date_from
timestamp(UTC) in seconds Start date of this line item.
date_to
timestamp(UTC) in seconds End date of this line item.
unit_amount
in cents Unit amount of the line item.
quantity
optional, integer, default=1 Quantity of the recurring item which is represented by this line item. For metered line items, this value is updated from usages once when the invoice is generated as pending and finally when the invoice is closed.
amount
optional, in cents Total amount of this line item. Typically equals to unit amount x quantity
pricing_model
optional, enumerated string The pricing scheme for this item price.
Possible values are
flat_feeA fixed price that is not quantity-based.per_unitA fixed price per unit quantity.tieredThe per unit price is based on the tier that the total quantity falls in.volumeThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.stairstepA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
is_taxed
boolean, default=false Specifies whether this line item is taxed or not
tax_amount
optional, in cents, default=0, min=0 The tax amount charged for this item
tax_rate
optional, double, min=0.0, max=100.0 Rate of tax used to calculate tax for this lineitem
unit_amount_in_decimal
optional, string, max chars=39 The decimal representation of the unit amount of the line_item. The value is in major units of the currency. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
quantity_in_decimal
optional, string, max chars=33 The decimal representation of the quantity of this line_item. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
amount_in_decimal
optional, string, max chars=39 The decimal representation of the amount for the line_item, in major units of the currency. Typically equals to unit_amount_in_decimal x quantity_in_decimal. Returned when multi-decimal pricing is enabled.
discount_amount
optional, in cents, min=0 Total discounts for this line
item_level_discount_amount
optional, in cents, min=0 Line Item-level discounts for this line.
reference_line_item_id
optional, string, max chars=40 Invoice Reference Line Item ID
description
string, max chars=250 Detailed description about this line item.
entity_description
optional, string, max chars=500 Detailed description about this item.
entity_type
enumerated string Specifies the modelled entity this line item is based on.
Possible values are
adhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this caseplan_item_priceIndicates that this line item is based on plan Item Priceaddon_item_priceIndicates that this line item is based on addon Item Pricecharge_item_priceIndicates that this line item is based on charge Item Price
tax_exempt_reason
optional, enumerated string The reason due to which the line item price/amount is exempted from tax.
Possible values are
tax_not_configuredIf tax is not enabled for the siteregion_non_taxableIf the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdictionexportYou are not registered for tax in the customer’s region. This is also the reason code when both billing_address and shipping_address have not been provided for the customer and subscription respectivelycustomer_exemptIf the Customer is marked as Tax exempt
product_exemptIf the Plan or Addon is marked as Tax exemptzero_ratedIf the rate of tax is 0% and no Sales/ GST tax is collectable for that line itemreverse_chargeIf the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU onlyhigh_value_physical_goodsIf physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be appliedzero_value_itemIf the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.
optional, list of discount The list of all deductions applied to the quote.
Discount attributes
amount
in cents, min=0 The amount deducted. The format of this value depends on the kind of currency.
description
optional, string, max chars=250 Description for this deduction.
line_item_id
optional, string, max chars=40 The unique id of the line item that this deduction is for. Is required when discounts[entity_type] is item_level_coupon or document_level_coupon.
entity_type
enumerated string The type of deduction and the amount to which it is applied.
Possible values are
item_level_couponThe deduction is due to a coupon applied to line item. The coupon id is passed as entity_id.document_level_couponThe deduction is due to a coupon applied to the invoice sub_total. The coupon id is passed as entity_id.promotional_creditsThe deduction is due to a promotional credit applied to the invoice. prorated_creditsThe deduction is due to a legacy adjustment credit applied to the invoice. The entity_id is null in this case. The legacy credits feature is superseded by adjustment_credit_notes.item_level_discountThe deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id. document_level_discountThe deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
discount_type
optional, enumerated string The type of discount that is applied to the line item. Relevant only when discounts[entity_type] is one of item_level_discount , item_level_coupon, document_level_discount, or document_level_coupon
Possible values are
fixed_amountwhen amount is applied as discountpercentagewhen percentage is applied as discount
entity_id
optional, string, max chars=100 When the deduction is due to a coupon or a discount, then this is the id of the coupon or discount.
coupon_set_code
optional, string, max chars=50 The coupon code, if applicable, used to provide the discount. The coupon.id is available in entity_id.
optional, list of line_item_discount The list of deductions applied for each line item of this quote.
Line item discount attributes
line_item_id
string, max chars=50 The unique id of the line item that this deduction is for.
discount_type
enumerated string The type of deduction and the amount to which it is applied.
Possible values are
item_level_couponThe deduction is due to a coupon applied to a line item of the invoice. The coupon id is available as entity_id.document_level_couponThe deduction is due to a coupon applied to the invoice sub_total. The coupon id is available as entity_id.promotional_creditsThe deduction is due to a promotional credit applied to the invoice. The entity_id is null in this case.prorated_creditsThe deduction is due to a legacy adjustment credit applied to the invoice. The entity_id is null in this case. The legacy credits feature is superseded by adjustment_credit_notes.item_level_discountThe deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id. document_level_discountThe deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
entity_id
optional, string, max chars=50 When the deduction is due to a coupon or a discount, then this is the id of the coupon or discount.
discount_amount
in cents, min=0 The amount deducted. The format of this value depends on the kind of currency.
optional, list of line_item_tax The list of taxes applied on the line items of this quote.
Line item tax attributes
line_item_id
optional, string, max chars=40 The unique reference id of the line item for which the tax is applicable
tax_name
string, max chars=100 The name of the tax applied
tax_rate
double, default=0.0, min=0.0, max=100.0 The rate of tax used to calculate tax amount
is_partial_tax_applied
optional, boolean Indicates if tax is applied only on a portion of the line item amount.
is_non_compliance_tax
optional, boolean Indicates the non-compliance tax that should not be reported to the jurisdiction.
taxable_amount
in cents, min=0 Indicates the actual portion of the line item amount that is taxable.
tax_amount
in cents, min=0 The tax amount
tax_juris_type
optional, enumerated string The type of tax jurisdiction
Possible values are
countryThe tax jurisdiction is a countryfederalThe tax jurisdiction is a federalstateThe tax jurisdiction is a statecountyThe tax jurisdiction is a countycityThe tax jurisdiction is a cityspecialSpecial tax jurisdiction.unincorporatedCombined tax of state and county.otherJurisdictions other than the ones listed above.
tax_juris_name
optional, string, max chars=250 The name of the tax jurisdiction
tax_juris_code
optional, string, max chars=250 The tax jurisdiction code
tax_amount_in_local_currency
optional, in cents, min=0 Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
local_currency_code
optional, string, max chars=3 The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
optional, list of line_item_tier The list of tiers applicable for the various line items in this quote.
Line item tier attributes
line_item_id
optional, string, max chars=40 Uniquely identifies a line_item
starting_unit
integer, min=0 The lower limit of a range of units for the tier
ending_unit
optional, integer The upper limit of a range of units for the tier
quantity_used
integer, min=0 The number of units purchased in a range.
unit_amount
in cents, min=0 The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.
starting_unit_in_decimal
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
ending_unit_in_decimal
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
quantity_used_in_decimal
optional, string, max chars=33 The decimal representation of the quantity purchased from this tier. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
unit_amount_in_decimal
optional, string, max chars=40 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for line_item. The value is in major units of the currency. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
optional, shipping_address Shipping address for the quote.
Shipping address attributes
first_name
optional, string, max chars=150 The first name of the contact.
last_name
optional, string, max chars=150 The last name of the contact.
email
optional, string, max chars=70 The email address.
company
optional, string, max chars=250 The company name.
phone
optional, string, max chars=50 The phone number.
line1
optional, string, max chars=150 Address line 1
line2
optional, string, max chars=150 Address line 2
line3
optional, string, max chars=150 Address line 3
city
optional, string, max chars=50 The name of the city.
state_code
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
state
optional, string, max chars=50 The state/province name.
country
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
zip
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
validation_status
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
index
integer, min=0 The index number of the subscription to which the item price is added. Provide a unique number between 0 and 4 (inclusive) for each subscription that is to be created.
optional, billing_address Billing address for the quote.
Billing address attributes
first_name
optional, string, max chars=150 The first name of the billing contact.
last_name
optional, string, max chars=150 The last name of the billing contact.
email
optional, string, max chars=70 The email address.
company
optional, string, max chars=250 The company name.
phone
optional, string, max chars=50 The phone number.
line1
optional, string, max chars=150 Address line 1
line2
optional, string, max chars=150 Address line 2
line3
optional, string, max chars=150 Address line 3
city
optional, string, max chars=50 The name of the city.
state_code
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
state
optional, string, max chars=50 State or Province
country
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
zip
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
validation_status
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
optional, string, max chars=100 The quote name will be used as the pdf name of the quote.
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 vaild till this date. After this quote will be marked as closed.
billing_cycles
optional, integer, min=0 The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan-item price is used.
mandatory_items_to_remove[0..n]
optional, list of string Item ids of mandatorily attached addons that are to be removed from the subscription.
terms_to_charge
optional, integer, min=1 The number of subscription billing cycles (including the first one) to invoice in advance.
billing_alignment_mode
optional, enumerated string Override the billing alignment mode for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.
Possible values are
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
coupon_ids[0..n]
optional, list of string Identifier of the coupon as a List. Coupon Codes can also be passed.
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[id]
optional, string, max chars=50 A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
subscription[po_number]
optional, string, max chars=100 Purchase order number for this subscription.
subscription[trial_end]
optional, timestamp(UTC) in seconds End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than start_date. Set it to 0 to have no trial period.
subscription[start_date]
optional, timestamp(UTC) in seconds The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done 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 plan in the subscription is 2 months and today is 14th April, subscription[start_date] cannot be earlier than 14th February.
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.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
contract_term[action_at_term_end]
optional, enumerated string, default=cancel Action to be taken when the contract term completes.
Possible values are
renew
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to renew.
evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
contract_term[cancellation_cutoff_period]
optional, integer, default=0 The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
+
subscription_items
Parameters for subscription_items. Multiple subscription_items can be passed by specifying unique indices.
pass parameters as subscription_items[<param name>][<idx:0..n>]
subscription_items[item_price_id][0..n]
required, string, max chars=100 The unique identifier of the item price.
subscription_items[quantity][0..n]
optional, integer, min=1 The quantity of the item purchased
subscription_items[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
subscription_items[unit_price][0..n]
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency. If changes_scheduled_at is in the past and a unit_price is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[unit_price_in_decimal][0..n]
optional, string, max chars=39 When price overriding is enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
subscription_items[billing_cycles][0..n]
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, timestamp(UTC) in seconds The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
subscription_items[service_period_days][0..n]
optional, integer, min=1, max=730 The service period of the item in days from the day of charge.
subscription_items[charge_on_event][0..n]
optional, enumerated string When charge_on_option option is set to on_event, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.
Possible values are
subscription_creationthe time of creation of the subscription.subscription_trial_startthe time when the trial period of the subscription begins.plan_activationsame as subscription activation, but also includes the case when the plan-item of the subscription is changed.subscription_activationthe moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.
subscription_items[charge_once][0..n]
optional, boolean Indicates if the charge-item is to be charged only once or each time the charge_on_event occurs. This parameter only applies to charge-items.
subscription_items[charge_on_option][0..n]
optional, enumerated string Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
Possible values are
immediatelyThe item is charged immediately on being added to the subscription.on_eventThe item is charged at the occurrence of the event specified as charge_on_event.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[duration_type][0..n]
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[period][0..n]
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
discounts[period_unit][0..n]
optional, enumerated string The unit of time for period. Applicable only when duration_type is limited_period.
Possible values are
dayA period of 24 hours.weekA period of 7 days.monthA period of 1 calendar month.yearA period of 1 calendar year.
discounts[included_in_mrr][0..n]
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price for which the tier price is being overridden.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The overridden price of the tier. The value depends on the type of currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
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 vaild till this date. After this quote will be marked as closed.
billing_cycles
optional, integer, min=0 The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan-item price is used.
mandatory_items_to_remove[0..n]
optional, list of string Item ids of mandatorily attached addons that are to be removed from the subscription.
terms_to_charge
optional, integer, min=1 The number of subscription billing cycles (including the first one) to invoice in advance.
billing_alignment_mode
optional, enumerated string Override the billing alignment mode for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site.
Possible values are
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
coupon_ids[0..n]
optional, list of string Identifier of the coupon as a List. Coupon Codes can also be passed.
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[id]
optional, string, max chars=50 A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
subscription[trial_end]
optional, timestamp(UTC) in seconds End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than start_date. Set it to 0 to have no trial period.
subscription[start_date]
optional, timestamp(UTC) in seconds The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done 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 plan in the subscription is 2 months and today is 14th April, subscription[start_date] cannot be earlier than 14th February.
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.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
contract_term[action_at_term_end]
optional, enumerated string, default=cancel Action to be taken when the contract term completes.
Possible values are
renew
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to renew.
evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.
contract_term[cancellation_cutoff_period]
optional, integer, default=0 The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
+
subscription_items
Parameters for subscription_items. Multiple subscription_items can be passed by specifying unique indices.
pass parameters as subscription_items[<param name>][<idx:0..n>]
subscription_items[item_price_id][0..n]
required, string, max chars=100 The unique identifier of the item price.
subscription_items[quantity][0..n]
optional, integer, min=1 The quantity of the item purchased
subscription_items[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
subscription_items[unit_price][0..n]
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency. If changes_scheduled_at is in the past and a unit_price is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[unit_price_in_decimal][0..n]
optional, string, max chars=39 When price overriding is enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled.
subscription_items[billing_cycles][0..n]
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, timestamp(UTC) in seconds The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
subscription_items[service_period_days][0..n]
optional, integer, min=1, max=730 The service period of the item in days from the day of charge.
subscription_items[charge_on_event][0..n]
optional, enumerated string When charge_on_option option is set to on_event, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.
Possible values are
subscription_creationthe time of creation of the subscription.subscription_trial_startthe time when the trial period of the subscription begins.plan_activationsame as subscription activation, but also includes the case when the plan-item of the subscription is changed.subscription_activationthe moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.
subscription_items[charge_once][0..n]
optional, boolean Indicates if the charge-item is to be charged only once or each time the charge_on_event occurs. This parameter only applies to charge-items.
subscription_items[charge_on_option][0..n]
optional, enumerated string Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
Possible values are
immediatelyThe item is charged immediately on being added to the subscription.on_eventThe item is charged at the occurrence of the event specified as charge_on_event.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[duration_type][0..n]
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[period][0..n]
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
discounts[period_unit][0..n]
optional, enumerated string The unit of time for period. Applicable only when duration_type is limited_period.
Possible values are
dayA period of 24 hours.weekA period of 7 days.monthA period of 1 calendar month.yearA period of 1 calendar year.
discounts[included_in_mrr][0..n]
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price for which the tier price is being overridden.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The overridden price of the tier. The value depends on the type of currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=100 The quote name will be used as the pdf name of the quote.
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 vaild till this date. After this quote will be marked as closed.
mandatory_items_to_remove[0..n]
optional, list of 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 values are
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
coupon_ids[0..n]
optional, list of string Identifier of the coupon as a List. Coupon Codes can also be passed.
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 values are
immediatelyThe change is carried out immediately.specific_dateThe 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.
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[id]
required, string, max chars=50 A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
subscription[start_date]
optional, timestamp(UTC) in seconds The new start date of a future subscription. Applicable only for future subscriptions.
subscription[trial_end]
optional, timestamp(UTC) in seconds The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status is future, in_trial, or cancelled. Also, the value must not be earlier than changes_scheduled_at or start_date. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled or in_trialstatus. Do this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end is backdated, the subscription immediately goes into active or non_renewing status.
subscription[auto_collection]
optional, enumerated string Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
Possible values are
onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
subscription[offline_payment_method]
optional, enumerated string The preferred offline payment method for the subscription.
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.
+
billing_address
Parameters for billing_address
pass parameters as billing_address[<param name>]
billing_address[first_name]
optional, string, max chars=150 The first name of the billing contact.
billing_address[last_name]
optional, string, max chars=150 The last name of the billing contact.
billing_address[email]
optional, string, max chars=70 The email address.
billing_address[company]
optional, string, max chars=250 The company name.
billing_address[phone]
optional, string, max chars=50 The phone number.
billing_address[line1]
optional, string, max chars=150 Address line 1
billing_address[line2]
optional, string, max chars=150 Address line 2
billing_address[line3]
optional, string, max chars=150 Address line 3
billing_address[city]
optional, string, max chars=50 The name of the city.
billing_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
billing_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
billing_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
billing_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
billing_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
customer
Parameters for customer
pass parameters as customer[<param name>]
customer[vat_number]
optional, string, max chars=20 VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.
customer[vat_number_prefix]
optional, string, max chars=10 An overridden value for the first two characters of the full VAT
number. Only applicable specifically for customers with billing_addresscountry as XI (which is United Kingdom - Northern Ireland).
When you have enabled EU VAT in 2021 or have manually
enabled the Brexit configuration, you have the option of setting billing_addresscountry as XI. That’s the code for United Kingdom - Northern
Ireland. The first two characters of the VAT number in such a case is
XI by default. However, if the VAT number was registered in UK, the value should be GB. Set
vat_number_prefix to GB for such cases.
customer[registered_for_gst]
optional, boolean Confirms that a customer is registered under GST. If set to true then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site.
+
contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
contract_term[action_at_term_end]
optional, enumerated string, default=renew Action to be taken when the contract term completes.
Possible values are
renew
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to renew.
evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to cancel.
contract_term[cancellation_cutoff_period]
optional, integer The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
+
subscription_items
Parameters for subscription_items. Multiple subscription_items can be passed by specifying unique indices.
pass parameters as subscription_items[<param name>][<idx:0..n>]
subscription_items[item_price_id][0..n]
required, string, max chars=100 The unique identifier of the item price.
subscription_items[quantity][0..n]
optional, integer, min=1 The quantity of the item purchased
subscription_items[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
subscription_items[unit_price][0..n]
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency. If changes_scheduled_at is in the past and a unit_price is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[unit_price_in_decimal][0..n]
optional, string, max chars=39 When price overriding is enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. If changes_scheduled_at is in the past and a unit_price_in_decimal is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[billing_cycles][0..n]
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, timestamp(UTC) in seconds The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
subscription_items[service_period_days][0..n]
optional, integer, min=1, max=730 The service period of the item in days from the day of charge.
subscription_items[charge_on_event][0..n]
optional, enumerated string When charge_on_option option is set to on_event, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.
Possible values are
subscription_creationthe time of creation of the subscription.subscription_trial_startthe time when the trial period of the subscription begins.plan_activationsame as subscription activation, but also includes the case when the plan-item of the subscription is changed.subscription_activationthe moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.
subscription_items[charge_once][0..n]
optional, boolean Indicates if the charge-item is to be charged only once or each time the charge_on_event occurs. This parameter only applies to charge-items.
subscription_items[charge_on_option][0..n]
optional, enumerated string Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
Possible values are
immediatelyThe item is charged immediately on being added to the subscription.on_eventThe item is charged at the occurrence of the event specified as charge_on_event.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[duration_type][0..n]
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[period][0..n]
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
discounts[period_unit][0..n]
optional, enumerated string The unit of time for period. Applicable only when duration_type is limited_period.
Possible values are
dayA period of 24 hours.weekA period of 7 days.monthA period of 1 calendar month.yearA period of 1 calendar year.
discounts[included_in_mrr][0..n]
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
discounts[operation_type][0..n]
required, enumerated string The operation to be carried out for the discount.
Possible values are
addThe discount is attached to the subscription.removeThe discount (given by discounts[id]) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip: If you want to replace a discount, remove it and add another in the same API call.
discounts[id][0..n]
optional, string, max chars=50 The id of the discount to be removed or updated. This parameter is only relevant when discounts[operation_type] is remove or update.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price for which the tier price is being overridden.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The overridden price of the tier. The value depends on the type of currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
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 vaild till this date. After this quote will be marked as closed.
mandatory_items_to_remove[0..n]
optional, list of 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 values are
immediateSubscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly..delayedSubscription period will be aligned with the configured billing date at the next renewal.
coupon_ids[0..n]
optional, list of string Identifier of the coupon as a List. Coupon Codes can also be passed.
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 values are
immediatelyThe change is carried out immediately.specific_dateThe 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.
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[start_date]
optional, timestamp(UTC) in seconds The new start date of a future subscription. Applicable only for future subscriptions.
subscription[trial_end]
optional, timestamp(UTC) in seconds The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription status is future, in_trial, or cancelled. Also, the value must not be earlier than changes_scheduled_at or start_date. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled or in_trialstatus. Do this to keep a record of when the trial ended in case it ended at some point in the past. When trial_end is backdated, the subscription immediately goes into active or non_renewing status.
subscription[auto_collection]
optional, enumerated string Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
Possible values are
onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
subscription[offline_payment_method]
optional, enumerated string The preferred offline payment method for the subscription.
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.
+
billing_address
Parameters for billing_address
pass parameters as billing_address[<param name>]
billing_address[first_name]
optional, string, max chars=150 The first name of the billing contact.
billing_address[last_name]
optional, string, max chars=150 The last name of the billing contact.
billing_address[email]
optional, string, max chars=70 The email address.
billing_address[company]
optional, string, max chars=250 The company name.
billing_address[phone]
optional, string, max chars=50 The phone number.
billing_address[line1]
optional, string, max chars=150 Address line 1
billing_address[line2]
optional, string, max chars=150 Address line 2
billing_address[line3]
optional, string, max chars=150 Address line 3
billing_address[city]
optional, string, max chars=50 The name of the city.
billing_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
billing_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
billing_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
billing_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
billing_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
customer
Parameters for customer
pass parameters as customer[<param name>]
customer[vat_number]
optional, string, max chars=20 VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this.
customer[vat_number_prefix]
optional, string, max chars=10 An overridden value for the first two characters of the full VAT
number. Only applicable specifically for customers with billing_addresscountry as XI (which is United Kingdom - Northern Ireland).
When you have enabled EU VAT in 2021 or have manually
enabled the Brexit configuration, you have the option of setting billing_addresscountry as XI. That’s the code for United Kingdom - Northern
Ireland. The first two characters of the VAT number in such a case is
XI by default. However, if the VAT number was registered in UK, the value should be GB. Set
vat_number_prefix to GB for such cases.
customer[registered_for_gst]
optional, boolean Confirms that a customer is registered under GST. If set to true then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site.
+
contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
contract_term[action_at_term_end]
optional, enumerated string, default=renew Action to be taken when the contract term completes.
Possible values are
renew
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to renew.
evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is canceled.renew_onceUsed when you want to renew the contract term just once. Does the following:
Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
The action_at_term_end for the new contract term is set to cancel.
contract_term[cancellation_cutoff_period]
optional, integer The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure
+
subscription_items
Parameters for subscription_items. Multiple subscription_items can be passed by specifying unique indices.
pass parameters as subscription_items[<param name>][<idx:0..n>]
subscription_items[item_price_id][0..n]
required, string, max chars=100 The unique identifier of the item price.
subscription_items[quantity][0..n]
optional, integer, min=1 The quantity of the item purchased
subscription_items[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
subscription_items[unit_price][0..n]
optional, in cents, min=0 The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the pricing_model of the item price is flat_fee or per_unit. Also, it is only allowed when price overriding is enabled for the site. The value depends on the type of currency. If changes_scheduled_at is in the past and a unit_price is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[unit_price_in_decimal][0..n]
optional, string, max chars=39 When price overriding is enabled for the site, the price or per-unit price of the item can be set here. The value set for the item price is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. If changes_scheduled_at is in the past and a unit_price_in_decimal is not passed, then the item price’s current unit price is considered even if the item price did not exist on the date as of when the change is scheduled.
subscription_items[billing_cycles][0..n]
optional, integer, min=0 For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then the value set for the plan-item price is used.
optional, timestamp(UTC) in seconds The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
subscription_items[service_period_days][0..n]
optional, integer, min=1, max=730 The service period of the item in days from the day of charge.
subscription_items[charge_on_event][0..n]
optional, enumerated string When charge_on_option option is set to on_event, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.
Possible values are
subscription_creationthe time of creation of the subscription.subscription_trial_startthe time when the trial period of the subscription begins.plan_activationsame as subscription activation, but also includes the case when the plan-item of the subscription is changed.subscription_activationthe moment a subscription enters an active or non-renewing state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.
subscription_items[charge_once][0..n]
optional, boolean Indicates if the charge-item is to be charged only once or each time the charge_on_event occurs. This parameter only applies to charge-items.
subscription_items[charge_on_option][0..n]
optional, enumerated string Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
Possible values are
immediatelyThe item is charged immediately on being added to the subscription.on_eventThe item is charged at the occurrence of the event specified as charge_on_event.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[duration_type][0..n]
required, enumerated string, default=forever Specifies the time duration for which this discount is attached to the subscription.
Possible values are
one_timeThe discount stays attached to the subscription till it is applied on an invoice once. It is removed after that from the subscription.foreverThe discount is attached to the subscription and applied on the invoices till it is explicitly removed.limited_periodThe discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by period and period_unit.
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[period][0..n]
optional, integer, min=1 The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
discounts[period_unit][0..n]
optional, enumerated string The unit of time for period. Applicable only when duration_type is limited_period.
Possible values are
dayA period of 24 hours.weekA period of 7 days.monthA period of 1 calendar month.yearA period of 1 calendar year.
discounts[included_in_mrr][0..n]
optional, boolean The discount is included in MRR calculations for your site. This attribute is only applicable when duration_type is one_time and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
discounts[operation_type][0..n]
required, enumerated string The operation to be carried out for the discount.
Possible values are
addThe discount is attached to the subscription.removeThe discount (given by discounts[id]) is removed from the subscription. Subsequent invoices will no longer have the discount applied. Tip: If you want to replace a discount, remove it and add another in the same API call.
discounts[id][0..n]
optional, string, max chars=50 The id of the discount to be removed or updated. This parameter is only relevant when discounts[operation_type] is remove or update.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price for which the tier price is being overridden.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The overridden price of the tier. The value depends on the type of currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=100 The quote name will be used as the pdf name of the quote.
customer_id
required, string, max chars=50 Identifier of the customer for which the quote needs to be created.
po_number
optional, string, max chars=100 Purchase Order Number for this quote.
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 vaild till this date. After this quote will be marked as closed.
currency_code
required if Multicurrency is enabled, string, max chars=3 The currency code (ISO 4217 format) of the quote.
coupon
optional, string, max chars=100 The 'One Time' coupon to be applied.
coupon_ids[0..n]
optional, list of string List of Coupons to be added.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
item_prices
Parameters for item_prices. Multiple item_prices can be passed by specifying unique indices.
pass parameters as item_prices[<param name>][<idx:0..n>]
item_prices[item_price_id][0..n]
optional, string, max chars=100 A unique ID for your system to identify the item price.
item_prices[quantity][0..n]
optional, integer, min=1 Item price quantity
item_prices[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
item_prices[unit_price][0..n]
optional, in cents, min=0 The price or per-unit-price of the item price. By default, it is the value set for the item_price. This is only applicable when the pricing_model of the item_price is flat_fee or per_unit. The value depends on the type of currency.
item_prices[unit_price_in_decimal][0..n]
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.
item_prices[service_period_days][0..n]
optional, integer, min=1, max=730 Defines service period of the item in days from the day of charge.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price to which this tier belongs.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The per-unit price for the tier when the pricing_model is tiered or volume. The total cost for the item price when the pricing_model is stairstep. The value is in the minor unit of the currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
+
charges
Parameters for charges. Multiple charges can be passed by specifying unique indices.
pass parameters as charges[<param name>][<idx:0..n>]
charges[amount][0..n]
optional, in cents, min=1 The amount to be charged. The unit depends on the type of currency.
charges[amount_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the amount for the one-time charge. The value is in major units of the currency. Applicable only when multi-decimal pricing is enabled.
charges[description][0..n]
optional, string, max chars=250 Description for this charge
charges[avalara_sale_type][0..n]
optional, enumerated string Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
Possible values are
wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
charges[avalara_transaction_type][0..n]
optional, integer Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
charges[avalara_service_type][0..n]
optional, integer Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
charges[service_period][0..n]
optional, integer Service period for charge
charges[discount_amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. Either this parameter or charges[discount_percentage] should be passed.
charges[discount_percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Either this parameter or charges[discount_amount] should be passed.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
optional, string, max chars=100 Purchase Order Number for this quote.
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 vaild till this date. After this quote will be marked as closed.
currency_code
required if Multicurrency is enabled, string, max chars=3 The currency code (ISO 4217 format) of the quote.
coupon
optional, string, max chars=100 The 'One Time' coupon to be applied.
coupon_ids[0..n]
optional, list of string List of Coupons to be added.
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
optional, string, max chars=150 The first name of the contact.
shipping_address[last_name]
optional, string, max chars=150 The last name of the contact.
shipping_address[email]
optional, string, max chars=70 The email address.
shipping_address[company]
optional, string, max chars=250 The company name.
shipping_address[phone]
optional, string, max chars=50 The phone number.
shipping_address[line1]
optional, string, max chars=150 Address line 1
shipping_address[line2]
optional, string, max chars=150 Address line 2
shipping_address[line3]
optional, string, max chars=150 Address line 3
shipping_address[city]
optional, string, max chars=50 The name of the city.
shipping_address[state_code]
optional, string, max chars=50 The ISO 3166-2 state/province code without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set state_code as AZ (not US-AZ). For Tamil Nadu (India), set as TN (not IN-TN). For British Columbia (Canada), set as BC (not CA-BC).
shipping_address[state]
optional, string, max chars=50 The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
shipping_address[zip]
optional, string, max chars=20 Zip or postal code. The number of characters is validated according to the rules specified here.
shipping_address[country]
optional, string, max chars=50 The billing address country of the customer. Must be one of ISO 3166 alpha-2 country code.
Note: If you enter an invalid country code, the system will return an error.
Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
shipping_address[validation_status]
optional, enumerated string, default=not_validated The address verification status.
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validThe address is valid for taxability but has not been validated for shipping.invalidAddress is invalid.
+
item_prices
Parameters for item_prices. Multiple item_prices can be passed by specifying unique indices.
pass parameters as item_prices[<param name>][<idx:0..n>]
item_prices[item_price_id][0..n]
optional, string, max chars=100 A unique ID for your system to identify the item price.
item_prices[quantity][0..n]
optional, integer, min=1 Item price quantity
item_prices[quantity_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
item_prices[unit_price][0..n]
optional, in cents, min=0 The price or per-unit-price of the item price. By default, it is the value set for the item_price. This is only applicable when the pricing_model of the item_price is flat_fee or per_unit. The value depends on the type of currency.
item_prices[unit_price_in_decimal][0..n]
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.
item_prices[service_period_days][0..n]
optional, integer, min=1, max=730 Defines service period of the item in days from the day of charge.
+
item_tiers
Parameters for item_tiers. Multiple item_tiers can be passed by specifying unique indices.
pass parameters as item_tiers[<param name>][<idx:0..n>]
item_tiers[item_price_id][0..n]
optional, string, max chars=100 The id of the item price to which this tier belongs.
item_tiers[starting_unit][0..n]
optional, integer, min=1 The lowest value in the quantity tier.
item_tiers[ending_unit][0..n]
optional, integer The highest value in the quantity tier.
item_tiers[price][0..n]
optional, in cents, default=0, min=0 The per-unit price for the tier when the pricing_model is tiered or volume. The total cost for the item price when the pricing_model is stairstep. The value is in the minor unit of the currency.
item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33 The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
item_tiers[price_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
+
charges
Parameters for charges. Multiple charges can be passed by specifying unique indices.
pass parameters as charges[<param name>][<idx:0..n>]
charges[amount][0..n]
optional, in cents, min=1 The amount to be charged. The unit depends on the type of currency.
charges[amount_in_decimal][0..n]
optional, string, max chars=39 The decimal representation of the amount for the one-time charge. The value is in major units of the currency. Applicable only when multi-decimal pricing is enabled.
charges[description][0..n]
optional, string, max chars=250 Description for this charge
charges[avalara_sale_type][0..n]
optional, enumerated string Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
Possible values are
wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
charges[avalara_transaction_type][0..n]
optional, integer Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
charges[avalara_service_type][0..n]
optional, integer Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
charges[service_period][0..n]
optional, integer Service period for charge
charges[discount_amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. Either this parameter or charges[discount_percentage] should be passed.
charges[discount_percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Either this parameter or charges[discount_amount] should be passed.
+
discounts
Parameters for discounts. Multiple discounts can be passed by specifying unique indices.
pass parameters as discounts[<param name>][<idx:0..n>]
discounts[percentage][0..n]
optional, double, min=0.01, max=100.0 The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
discounts[amount][0..n]
optional, in cents, min=0 The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
discounts[apply_on][0..n]
required, enumerated string The amount on the quote to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
discounts[item_price_id][0..n]
optional, string, max chars=100 The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
offset
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
include_deleted
optional, boolean, default=false If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
sort_by[<sort-order>]
optional, string filter Sorts based on the specified attribute. Supported attributes : date Supported sort-orders : asc, desc
Example →sort_by[asc] = "date" This will sort the result based on the 'date' attribute in ascending(earliest first) order.
optional, string filter The quote number. Acts as a identifier for quote and typically generated sequentially. Supported operators : is, is_not, starts_with, in, not_in
Example →id[is_not] = "123"
customer_id[<operator>]
optional, string filter The identifier of the customer this quote belongs to. Supported operators : is, is_not, starts_with, in, not_in
Example →customer_id[is_not] = "4gmiXbsjdm"
subscription_id[<operator>]
optional, string filter To filter based on subscription_id. NOTE: Not to be used if consolidated invoicing feature is enabled. Supported operators : is, is_not, starts_with, is_present, in, not_in
Example →subscription_id[is_not] = "4gmiXbsjdm"
status[<operator>]
optional, enumerated string filter Current status of this quote. Possible values are : open, accepted, declined, invoiced, closed. Supported operators : is, is_not, in, not_in
Example →status[is] = "open"
date[<operator>]
optional, timestamp(UTC) in seconds filter Creation date of the quote. Typically this is the date on which quote is generated. Supported operators : after, before, on, between
Example →date[after] = "1435054328"
updated_at[<operator>]
optional, timestamp(UTC) in seconds filter To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28. Supported operators : after, before, on, between
optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter “offset”.
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
offset
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
always returned
Resource object representing quote_line_group
next_offset
optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter “offset”.
optional, timestamp(UTC) in seconds The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as pending, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of invoice_date. When passing this parameter, the following prerequisites must be met:
invoice_date must be in the past.
invoice_date is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.
The date is not earlier than quoted_subscription.start_date or quoted_subscription.changes_scheduled_at (whichever is applicable).
invoice_immediately must be true.
.
invoice_immediately
optional, boolean If there are charges raised immediately for the subscription, this parameter specifies whether those charges are to be invoiced immediately or added to unbilled charges. The default value is as per the site settings.
Note:invoice_immediately only affects charges that are raised at the time of execution of this API call. Any charges scheduled to be raised in the future are not affected by this parameter.
.
create_pending_invoices
optional, boolean This attribute is set to true automatically for the subscription when it has one or more metered items. However, when there are no metered items, you can pass this parameter as true to force all invoices (except the first) to be created as pending. This is useful in the following scenarios:
When you manage metered billing at your end by calculating usage-based charges yourself and add them to the subscription as one-time charges.
When your workflow involves inspecting all charges before you close invoices.
Note:
You must enable Metered Billing for this parameter to be acceptable.
To create the first invoice also as pending, pass first_invoice_pending as true.
.
first_invoice_pending
optional, boolean, default=false
Non-metered items are billed at the beginning of a billing cycle while metered items are billed at the end. Consequently, the first invoice of the subscription contains only the non-metered items.
By passing this parameter as true, you create the first invoice as pending allowing you to add the previous term’s metered charges to it before closing. This is useful when the subscription is moved to Chargebee from a different billing system. As applicable to all pending invoices, this invoice is also closed automatically or via an API call.
Note:
This parameter is passed only when there are metered items in the subscription or when create_pending_invoices is true.
.
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[id]
optional, string, max chars=50 Applicable only for create subscription quote.
subscription[auto_collection]
optional, enumerated string Applicable only for create subscription quote.
Possible values are
onWhenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.offAutomatic collection of charges will not be made for this subscription. Use this for offline payments.
subscription[po_number]
optional, string, max chars=100 Purchase order number for this subscription.
subscription[auto_close_invoices]
optional, boolean When auto-closing of invoices is enabled for the site, you can pass this parameter as false to prevent the automatic closing of invoices for this subscription. The value passed here takes precedence over the value stored at the customer level.
required, enumerated string Status to update for the quote.
Possible values are
acceptedAccepted.declinedDeclined.closedClosed
comment
optional, string, max chars=300 An internal comment to be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Quote PDF.
optional, string, max chars=300 Reason for deleting quote. This comment will be added to the subscription entity if the quote belongs to a subscription or added to the customer entity if the quote is associated only with a customer.
optional, boolean, default=false When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes.
disposition_type
optional, enumerated string, default=attachment Determines the pdf should be rendered as inline or attachment in the browser.
Possible values are
attachmentPDF is rendered as attachment in the browserinlinePDF is rendered as inline in the browser