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.

Sample quote [ JSON ]

{ "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl7qp2S", "date": 1517494517, "id": "8", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl7qp2S", "date_from": 1517494517, "date_to": 1517494517, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl7z92d", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, { "amount": 500, "customer_id": "__test__8aszcSOcl7qp2S", "date_from": 1517494517, "date_to": 1517494517, "description": "SSL Charge USD Monthly", "discount_amount": 0, "entity_id": "ssl-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl7z92e", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 500 } ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494517214, "status": "open", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494517, "valid_till": 1526134516, "version": 1 }

API Index URL GET

https://{site}.chargebee.com/api/v2/quotes
id
The quote number. Acts as a identifier for quote and typically generated sequentially.
string, max chars=50
name
The quote name will be used as the pdf name of the quote.
optional, string, max chars=100
po_number
Purchase Order Number.
optional, string, max chars=100
customer_id
The identifier of the customer this quote belongs to.
string, max chars=50
subscription_id
The identifier of the subscription this quote belongs to.
optional, string, max chars=50
invoice_id
The identifier of the invoice generated while converting this quote.
optional, string, max chars=50
status
Current status of this quote.
enumerated string
Possible values are
openOpen.acceptedAccepted.declinedDeclined.invoicedInvoiced.closedClosed.
operation_type
Operation Type.
enumerated string
Possible values are
create_subscription_for_customercreate_subscription_for_customer.change_subscriptionchange_subscription.onetime_invoiceonetime_invoice.
vat_number
VAT/ Tax registration number of the customer. Learn more.
optional, string, max chars=20
price_type
The price type of the quote.
enumerated string, default=tax_exclusive
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
Quote will be valid till this date. After this date quote will be marked as closed.
timestamp(UTC) in seconds
date
Creation date of the quote. Typically this is the date on which quote is generated.
timestamp(UTC) in seconds
total_payable
Total contract value. Applicable when multi billing cycle quote is enabled.
optional, in cents, min=0
charge_on_acceptance
Charge on acceptance. Applicable when multi billing cycle quote is enabled.
optional, in cents, default=0, min=0
sub_total
Subtotal (in cents) of the first quote line group.
in cents, min=0
total
Total (in cents) of the first quote line group.
optional, in cents, default=0, min=0
credits_applied
Credits applied (in cents) for the first quote line group.
optional, in cents, default=0, min=0
amount_paid
Existing outstanding payments (in cents) if any, applied to the first quote line group.
optional, in cents, default=0, min=0
amount_due
Amount due (in cents) for the first quote line group.
optional, in cents, default=0, min=0
version
Version of the quote.
optional, integer, default=1
resource_version
Version number of this resource. Each update of this resource results in incremental change of this number. This attribute will be present only if the resource has been updated after 2016-09-28.
optional, long
updated_at
Timestamp indicating when this quote was last updated.
optional, timestamp(UTC) in seconds
vat_number_prefix
An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country 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_address country 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.
optional, string, max chars=10
currency_code
The currency code (ISO 4217 format) of the quote.
string, max chars=3
notes
List of notes associated with this quotes.
optional, jsonarray
contract_term_start
Specifies the contract term’s start date.
optional, timestamp(UTC) in seconds
contract_term_end
Specifies the contract term’s end date. It indicates when the action set in action_at_term_end gets triggered.
optional, timestamp(UTC) in seconds
contract_term_termination_fee
Specifies the charge to be applied for terminating the contract term.
optional, in cents, min=0
line_items
Show attributes[+]
The list of line items for this quote.
optional, list of line_item
Line item attributes
id
Uniquely identifies a line_item.
optional, string, max chars=40
subscription_id
A unique identifier for the subscription this line item belongs to.
optional, string, max chars=3
date_from
Start date of this line item.
timestamp(UTC) in seconds
date_to
End date of this line item.
timestamp(UTC) in seconds
unit_amount
Unit amount of the line item.
in cents
quantity
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.
optional, integer, default=1
amount
Total amount of this line item. Typically equals to unit amount x quantity.
optional, in cents
pricing_model
The pricing scheme for this item price.
optional, enumerated string
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
Specifies whether this line item is taxed or not.
boolean, default=false
tax_amount
The tax amount charged for this item.
optional, in cents, default=0, min=0
tax_rate
Rate of tax used to calculate tax for this lineitem.
optional, double, min=0.0, max=100.0
unit_amount_in_decimal
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.
optional, string, max chars=33
quantity_in_decimal
The decimal representation of the quantity of this line_item. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=33
amount_in_decimal
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.
optional, string, max chars=33
discount_amount
Total discounts for this line.
optional, in cents, min=0
item_level_discount_amount
Line Item-level discounts for this line.
optional, in cents, min=0
description
Detailed description about this line item.
string, max chars=250
entity_description
Detailed description about this item.
string, max chars=500
entity_type
Specifies the modelled entity this line item is based on.
enumerated string
Possible values are
adhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case.plan_item_priceIndicates that this line item is based on plan Item Price.addon_item_priceIndicates that this line item is based on addon Item Price.charge_item_priceIndicates that this line item is based on charge Item Price.
tax_exempt_reason
The reason due to which the line item price/amount is exempted from tax.
optional, enumerated string
Possible values are
tax_not_configuredIf tax is not enabled for the site.region_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 jurisdiction.exportYou 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 respectively.customer_exemptIf the Customer is marked as Tax exempt.product_exemptIf the Plan or Addon is marked as Tax exempt.zero_ratedIf the rate of tax is 0% and no Sales/ GST tax is collectable for that line item.reverse_chargeIf the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU only.high_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 applied.
entity_id
The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type.
optional, string, max chars=100
customer_id
A unique identifier for the customer this line item belongs to.
optional, string, max chars=100
discounts
Show attributes[+]
The list of all deductions applied to the quote.
optional, list of discount
Discount attributes
amount
The amount deducted. The format of this value depends on the kind of currency.
in cents, min=0
description
Description for this deduction.
optional, string, max chars=250
line_item_id
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.
optional, string, max chars=40
entity_type
The type of deduction and the amount to which it is applied.
enumerated string
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_discount(Beta) The 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_discount(Beta) The deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
discount_type
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.
optional, enumerated string
Possible values are
fixed_amountwhen amount is applied as discount.percentagewhen percentage is applied as discount.
entity_id
When the deduction is due to a coupon or a discount, then this is the id of the coupon or discount.
optional, string, max chars=100
line_item_discounts
Show attributes[+]
The list of deductions applied for each line item of this quote.
optional, list of line_item_discount
Line item discount attributes
line_item_id
The unique id of the line item that this deduction is for.
string, max chars=50
discount_type
The type of deduction and the amount to which it is applied.
enumerated string
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_discount(Beta) The 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_discount(Beta) The deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
entity_id
When the deduction is due to a coupon or a discount, then this is the id of the coupon or discount.
optional, string, max chars=50
discount_amount
The amount deducted. The format of this value depends on the kind of currency.
in cents, min=0
The list of taxes applicable for this quote.
optional, list of tax
Tax attributes
name
The name of the tax applied. E.g. GST.
string, max chars=100
amount
The tax amount.
in cents, min=0
description
Description of the tax item.
optional, string, max chars=250
line_item_taxes
Show attributes[+]
The list of taxes applied on the line items of this quote.
optional, list of line_item_tax
Line item tax attributes
line_item_id
The unique reference id of the line item for which the tax is applicable.
optional, string, max chars=40
tax_name
The name of the tax applied.
string, max chars=100
tax_rate
The rate of tax used to calculate tax amount.
double, default=0.0, min=0.0, max=100.0
is_partial_tax_applied
Indicates if tax is applied only on a portion of the line item amount.
optional, boolean
is_non_compliance_tax
Indicates the non-compliance tax that should not be reported to the jurisdiction.
optional, boolean
taxable_amount
Indicates the actual portion of the line item amount that is taxable.
in cents, min=0
tax_amount
The tax amount.
in cents, min=0
tax_juris_type
The type of tax jurisdiction.
optional, enumerated string
Possible values are
countryThe tax jurisdiction is a country.federalThe tax jurisdiction is a federal.stateThe tax jurisdiction is a state.countyThe tax jurisdiction is a county.cityThe tax jurisdiction is a city.specialSpecial tax jurisdiction.unincorporatedCombined tax of state and county.otherJurisdictions other than the ones listed above.
tax_juris_name
The name of the tax jurisdiction.
optional, string, max chars=250
tax_juris_code
The tax jurisdiction code.
optional, string, max chars=250
tax_amount_in_local_currency
Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
optional, in cents, min=0
local_currency_code
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, string, max chars=null
line_item_tiers
Show attributes[+]
The list of tiers applicable for the various line items in this quote.
optional, list of line_item_tier
Line item tier attributes
line_item_id
Uniquely identifies a line_item.
optional, string, max chars=40
starting_unit
The lower limit of a range of units for the tier.
integer, min=0
ending_unit
The upper limit of a range of units for the tier.
optional, integer
quantity_used
The number of units purchased in a range.
integer, min=0
unit_amount
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.
in cents, min=0
starting_unit_in_decimal
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.
optional, string, max chars=33
ending_unit_in_decimal
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.
optional, string, max chars=33
quantity_used_in_decimal
The decimal representation of the quantity purchased from this tier. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=33
unit_amount_in_decimal
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, string, max chars=40
shipping_address
Show attributes[+]
Shipping address for the quote.
optional, shipping_address
Shipping address attributes
first_name
The first name of the contact.
optional, string, max chars=150
last_name
The last name of the contact.
optional, string, max chars=150
email
The email address.
optional, string, max chars=70
company
The company name.
optional, string, max chars=250
phone
The phone number.
optional, string, max chars=50
line1
Address line 1.
optional, string, max chars=180
line2
Address line 2.
optional, string, max chars=150
line3
Address line 3.
optional, string, max chars=150
city
The name of the city.
optional, string, max chars=50
state_code
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).
optional, string, max chars=50
state
The state/province name.
optional, string, max chars=50
country
2-letter, ISO 3166 alpha-2 country code.

If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
validation_status
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
billing_address
Show attributes[+]
Billing address for the quote.
optional, billing_address
Billing address attributes
first_name
The first name of the billing contact.
optional, string, max chars=150
last_name
The last name of the billing contact.
optional, string, max chars=150
email
The email address.
optional, string, max chars=70
company
The company name.
optional, string, max chars=250
phone
The phone number.
optional, string, max chars=50
line1
Address line 1.
optional, string, max chars=150
line2
Address line 2.
optional, string, max chars=150
line3
Address line 3.
optional, string, max chars=150
city
The name of the city.
optional, string, max chars=50
state_code
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).
optional, string, max chars=50
state
State or Province.
optional, string, max chars=50
country
2-letter, ISO 3166 alpha-2 country code.

If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
optional, string, max chars=50
zip
Zip or Postal code.
optional, string, max chars=20
validation_status
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
Retrieves the quotes identified by the 'number' specified in the url.
Sample Request
curl  https://{site}.chargebee.com/api/v2/quotes/8 \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/quotes/8 \
     -u {site_api_key}:

Sample Response [ JSON ]

Show more...
{"quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl7qp2S", "date": 1517494517, "id": "8", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl7qp2S", "date_from": 1517494517, "date_to": 1517494517, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl7z92d", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494517214, "status": "open", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494517, "valid_till": 1526134516, "version": 1 }}

URL Format GET

https://{site}.chargebee.com/api/v2/quotes/{quote_id}
Resource object representing quote.
always returned
Resource object representing quoted_subscription.
optional
Resource object representing quoted_charge.
optional

Sample admin console URL

https://{site}.chargebee.com/admin-console/quotes/123x
Sample Request
curl  https://{site}.chargebee.com/api/v2/customers/__test__KyVkhnS3NssjH7/create_subscription_quote_for_items \
     -X POST  \
     -u {site_api_key}:\
     -d subscription_items[item_price_id][0]="basic-USD" \
     -d subscription_items[quantity][0]=1
copy
curl  https://{site}.chargebee.com/api/v2/customers/__test__KyVkhnS3NssjH7/create_subscription_quote_for_items \
     -X POST  \
     -u {site_api_key}:\
     -d subscription_items[item_price_id][0]="basic-USD" \
     -d subscription_items[quantity][0]=1

Sample Response [ JSON ]

Show more...
{"quote": { "amount_due": 1000, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 0, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVkhnS3NssjH7", "date": 1517475933, "id": "1", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 1000, "customer_id": "__test__KyVkhnS3NssjH7", "date_from": 1517475933, "date_to": 1519895133, "description": "basic USD", "discount_amount": 0, "entity_id": "basic-USD", "entity_type": "plan_item_price", "id": "__test__KyVkhnS3NstZzH", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "per_unit", "quantity": 1, "tax_amount": 0, "unit_amount": 1000 }, {..} ], "object": "quote", "operation_type": "create_subscription_for_customer", "price_type": "tax_exclusive", "resource_version": 1517475934000, "status": "open", "sub_total": 1000, "taxes": [], "total": 1000, "updated_at": 1517475934, "valid_till": 1517596199, "version": 1 }}

URL Format POST

https://{site}.chargebee.com/api/v2/customers/{customer_id}/create_subscription_quote_for_items
name
The quote name will be used as the pdf name of the quote.
optional, string, max chars=100
notes
Notes specific to this quote that you want customers to see on the quote PDF.
optional, string, max chars=2000
expires_at
Quotes will be vaild till this date. After this quote will be marked as closed.
optional, timestamp(UTC) in seconds
billing_cycles
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.
optional, integer, min=0
mandatory_items_to_remove[0..n]
Item ids of mandatorily attached addons that are to be removed from the subscription.
optional, list of string
terms_to_charge
The number of subscription billing cycles (including the first one) to invoice in advance.
optional, integer, min=1
billing_alignment_mode
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.
optional, enumerated string
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]
Identifier of the coupon as a List. Coupon Codes can also be passed.
optional, list of string
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>]
subscription[id]
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
optional, string, max chars=50
subscription[auto_collection]
Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
optional, enumerated string
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]
Purchase order number for this subscription.
optional, string, max chars=100
subscription[trial_end]
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.
optional, timestamp(UTC) in seconds
subscription[start_date]
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, timestamp(UTC) in seconds
subscription[contract_term_billing_cycle_on_renewal]
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
optional, integer, min=1, max=100
+
shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name]
The first name of the contact.
optional, string, max chars=150
shipping_address[last_name]
The last name of the contact.
optional, string, max chars=150
shipping_address[email]
The email address.
optional, string, max chars=70
shipping_address[company]
The company name.
optional, string, max chars=250
shipping_address[phone]
The phone number.
optional, string, max chars=50
shipping_address[line1]
Address line 1.
optional, string, max chars=180
shipping_address[line2]
Address line 2.
optional, string, max chars=150
shipping_address[line3]
Address line 3.
optional, string, max chars=150
shipping_address[city]
The name of the city.
optional, string, max chars=50
shipping_address[state_code]
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).
optional, string, max chars=50
shipping_address[state]
The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
optional, string, max chars=50
shipping_address[zip]
Zip or Postal code.
optional, string, max chars=20
shipping_address[country]
2-letter, ISO 3166 alpha-2 country code.

If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
optional, string, max chars=50
shipping_address[validation_status]
The address verification status.
optional, enumerated string, default=not_validated
Possible values are
not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
+
contract_term
Parameters for contract_term
pass parameters as contract_term[<param name>]
contract_term[action_at_term_end]
Action to be taken when the contract term completes.
optional, enumerated string, default=cancel
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]
    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.
    optional, integer, default=0
    +
    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]
    The unique identifier of the item price.
    required, string, max chars=100
    subscription_items[quantity][0..n]
    The quantity of the item purchased.
    optional, integer, min=1
    subscription_items[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[unit_price][0..n]
    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.
    optional, in cents, min=0
    subscription_items[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[billing_cycles][0..n]
    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.

    For addon-item prices:
    If addon billing cycles are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then the value set under attached addons is used. Further, if that value is not provided, then the value set for the addon-item price is used.
    optional, integer, min=0
    subscription_items[trial_end][0..n]
    The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
    optional, timestamp(UTC) in seconds
    subscription_items[service_period_days][0..n]
    The service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    subscription_items[charge_on_event][0..n]
    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.
    optional, enumerated string
    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]
    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.
    optional, boolean
    subscription_items[charge_on_option][0..n]
    Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
    optional, enumerated string
    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]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    Specifies the time duration for which this discount is attached to the subscription.
    required, enumerated string, default=forever
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[period][0..n]
    The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
    optional, integer, min=1
    discounts[period_unit][0..n]
    The unit of time for period. Applicable only when duration_type is limited_period.
    optional, enumerated string
    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]
    Set this to false if this coupon should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:
    • The discount duration_type must be one_time.
    • The feature must be enabled in Chargebee.
    • The site-level setting must be to include coupons in MRR calculations. The site level setting is also the default value for the attribute when this parameter is not passed.
    .
    optional, boolean
    discounts[item_price_id][0..n]
    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
    +
    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]
    The id of the item price for which the tier price is being overridden.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    The overridden price of the tier. The value depends on the type of currency.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Changes the quote produced for creating a new subscription items.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/4/edit_create_subscription_quote_for_items \
         -X POST  \
         -u {site_api_key}:\
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[unit_price][0]=1520 \
         -d subscription_items[quantity][0]=3
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/4/edit_create_subscription_quote_for_items \
         -X POST  \
         -u {site_api_key}:\
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[unit_price][0]=1520 \
         -d subscription_items[quantity][0]=3

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 4560, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 0, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVlFpS4cWDaQi", "date": 1517485108, "id": "4", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4560, "customer_id": "__test__KyVlFpS4cWDaQi", "date_from": 1517485108, "date_to": 1519904308, "description": "basic USD", "discount_amount": 0, "entity_id": "basic-USD", "entity_type": "plan_item_price", "id": "__test__KyVlFpS4cWDxA10", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "per_unit", "quantity": 3, "tax_amount": 0, "unit_amount": 1520 }, {..} ], "object": "quote", "operation_type": "create_subscription_for_customer", "price_type": "tax_exclusive", "resource_version": 1517485108000, "status": "open", "sub_total": 4560, "taxes": [], "total": 4560, "updated_at": 1517485108, "valid_till": 1517596199, "version": 2 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/edit_create_subscription_quote_for_items
    notes
    Notes specific to this quote that you want customers to see on the quote PDF.
    optional, string, max chars=2000
    expires_at
    Quotes will be vaild till this date. After this quote will be marked as closed.
    optional, timestamp(UTC) in seconds
    billing_cycles
    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.
    optional, integer, min=0
    mandatory_items_to_remove[0..n]
    Item ids of mandatorily attached addons that are to be removed from the subscription.
    optional, list of string
    terms_to_charge
    The number of subscription billing cycles (including the first one) to invoice in advance.
    optional, integer, min=1
    billing_alignment_mode
    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.
    optional, enumerated string
    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]
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    optional, list of string
    +
    subscription
    Parameters for subscription
    pass parameters as subscription[<param name>]
    subscription[id]
    A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
    optional, string, max chars=50
    subscription[trial_end]
    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.
    optional, timestamp(UTC) in seconds
    subscription[start_date]
    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, timestamp(UTC) in seconds
    subscription[contract_term_billing_cycle_on_renewal]
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    optional, integer, min=1, max=100
    +
    shipping_address
    Parameters for shipping_address
    pass parameters as shipping_address[<param name>]
    shipping_address[first_name]
    The first name of the contact.
    optional, string, max chars=150
    shipping_address[last_name]
    The last name of the contact.
    optional, string, max chars=150
    shipping_address[email]
    The email address.
    optional, string, max chars=70
    shipping_address[company]
    The company name.
    optional, string, max chars=250
    shipping_address[phone]
    The phone number.
    optional, string, max chars=50
    shipping_address[line1]
    Address line 1.
    optional, string, max chars=180
    shipping_address[line2]
    Address line 2.
    optional, string, max chars=150
    shipping_address[line3]
    Address line 3.
    optional, string, max chars=150
    shipping_address[city]
    The name of the city.
    optional, string, max chars=50
    shipping_address[state_code]
    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).
    optional, string, max chars=50
    shipping_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    shipping_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    shipping_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    shipping_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
    +
    contract_term
    Parameters for contract_term
    pass parameters as contract_term[<param name>]
    contract_term[action_at_term_end]
    Action to be taken when the contract term completes.
    optional, enumerated string, default=cancel
    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]
    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.
    optional, integer, default=0
    +
    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]
    The unique identifier of the item price.
    required, string, max chars=100
    subscription_items[quantity][0..n]
    The quantity of the item purchased.
    optional, integer, min=1
    subscription_items[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[unit_price][0..n]
    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.
    optional, in cents, min=0
    subscription_items[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[billing_cycles][0..n]
    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.

    For addon-item prices:
    If addon billing cycles are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then the value set under attached addons is used. Further, if that value is not provided, then the value set for the addon-item price is used.
    optional, integer, min=0
    subscription_items[trial_end][0..n]
    The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
    optional, timestamp(UTC) in seconds
    subscription_items[service_period_days][0..n]
    The service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    subscription_items[charge_on_event][0..n]
    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.
    optional, enumerated string
    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]
    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.
    optional, boolean
    subscription_items[charge_on_option][0..n]
    Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
    optional, enumerated string
    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]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    Specifies the time duration for which this discount is attached to the subscription.
    required, enumerated string, default=forever
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[period][0..n]
    The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
    optional, integer, min=1
    discounts[period_unit][0..n]
    The unit of time for period. Applicable only when duration_type is limited_period.
    optional, enumerated string
    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]
    Set this to false if this coupon should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:
    • The discount duration_type must be one_time.
    • The feature must be enabled in Chargebee.
    • The site-level setting must be to include coupons in MRR calculations. The site level setting is also the default value for the attribute when this parameter is not passed.
    .
    optional, boolean
    discounts[item_price_id][0..n]
    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
    +
    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]
    The id of the item price for which the tier price is being overridden.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    The overridden price of the tier. The value depends on the type of currency.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote_for_items \
         -u {site_api_key}:\
         -d subscription[id]="__test__KyVlFpS4cWD9fW" \
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[quantity][0]=2 \
         -d subscription_items[unit_price][0]=1000 \
         -d billing_address[first_name]="John" \
         -d billing_address[last_name]="Doe" \
         -d billing_address[line1]="PO Box 9999" \
         -d billing_address[city]="Walnut" \
         -d billing_address[state]="California" \
         -d billing_address[zip]="91789" \
         -d billing_address[country]="US"
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote_for_items \
         -u {site_api_key}:\
         -d subscription[id]="__test__KyVlFpS4cWD9fW" \
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[quantity][0]=2 \
         -d subscription_items[unit_price][0]=1000 \
         -d billing_address[first_name]="John" \
         -d billing_address[last_name]="Doe" \
         -d billing_address[line1]="PO Box 9999" \
         -d billing_address[city]="Walnut" \
         -d billing_address[state]="California" \
         -d billing_address[zip]="91789" \
         -d billing_address[country]="US"

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 1000, "amount_paid": 0, "billing_address": { "city": "Walnut", "country": "US", "first_name": "John", "last_name": "Doe", "line1": "PO Box 9999", "object": "billing_address", "state": "California", "validation_status": "not_validated", "zip": "91789" }, "charge_on_acceptance": 0, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVlFpS4cWD2iU", "date": 1517485106, "id": "3", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 1000, "customer_id": "__test__KyVlFpS4cWD2iU", "date_from": 1517485106, "date_to": 1519904305, "description": "basic USD - Prorated Charges", "discount_amount": 0, "entity_id": "basic-USD", "entity_type": "plan_item_price", "id": "__test__KyVlFpS4cWDW2g", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "per_unit", "quantity": 1, "tax_amount": 0, "unit_amount": 1000 }, {..} ], "object": "quote", "operation_type": "change_subscription", "price_type": "tax_exclusive", "resource_version": 1517485106000, "status": "open", "sub_total": 1000, "subscription_id": "__test__KyVlFpS4cWD9fW", "taxes": [], "total": 1000, "updated_at": 1517485106, "valid_till": 1517596199, "version": 1 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote_for_items
    name
    The quote name will be used as the pdf name of the quote.
    optional, string, max chars=100
    notes
    Notes specific to this quote that you want customers to see on the quote PDF.
    optional, string, max chars=2000
    expires_at
    Quotes will be vaild till this date. After this quote will be marked as closed.
    optional, timestamp(UTC) in seconds
    mandatory_items_to_remove[0..n]
    Item ids of mandatorily attached addons that are to be removed from the subscription.
    optional, list of string
    replace_items_list
    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.
    optional, boolean, default=false
    billing_cycles
    Billing cycles set for plan-item price is used by default.
    optional, integer, min=0
    terms_to_charge
    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.
    optional, integer, min=1
    reactivate_from
    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.
    .
    optional, timestamp(UTC) in seconds
    billing_alignment_mode
    Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
    optional, enumerated string
    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]
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    optional, list of string
    replace_coupon_list
    Should be true if the existing coupons should be replaced with the ones that are being passed.
    optional, boolean, default=false
    change_option
    When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
    optional, enumerated string
    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
    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.
    .
    optional, timestamp(UTC) in seconds
    force_term_reset
    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.
    optional, boolean, default=false
    reactivate
    Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
    optional, boolean
    +
    subscription
    Parameters for subscription
    pass parameters as subscription[<param name>]
    subscription[id]
    A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
    required, string, max chars=50
    subscription[start_date]
    The new start date of a future subscription. Applicable only for future subscriptions.
    optional, timestamp(UTC) in seconds
    subscription[trial_end]
    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 status. 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.
    optional, timestamp(UTC) in seconds
    subscription[auto_collection]
    Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
    optional, enumerated string
    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]
    The preferred offline payment method for the subscription.
    optional, enumerated string
    Possible values are
    no_preferenceNo Preference.cashCash.checkCheck.bank_transferBank Transfer.ach_creditACH Credit.sepa_creditSEPA Credit.
    subscription[contract_term_billing_cycle_on_renewal]
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    optional, integer, min=1, max=100
    +
    billing_address
    Parameters for billing_address
    pass parameters as billing_address[<param name>]
    billing_address[first_name]
    The first name of the billing contact.
    optional, string, max chars=150
    billing_address[last_name]
    The last name of the billing contact.
    optional, string, max chars=150
    billing_address[email]
    The email address.
    optional, string, max chars=70
    billing_address[company]
    The company name.
    optional, string, max chars=250
    billing_address[phone]
    The phone number.
    optional, string, max chars=50
    billing_address[line1]
    Address line 1.
    optional, string, max chars=150
    billing_address[line2]
    Address line 2.
    optional, string, max chars=150
    billing_address[line3]
    Address line 3.
    optional, string, max chars=150
    billing_address[city]
    The name of the city.
    optional, string, max chars=50
    billing_address[state_code]
    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).
    optional, string, max chars=50
    billing_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    billing_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    billing_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    billing_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
    +
    shipping_address
    Parameters for shipping_address
    pass parameters as shipping_address[<param name>]
    shipping_address[first_name]
    The first name of the contact.
    optional, string, max chars=150
    shipping_address[last_name]
    The last name of the contact.
    optional, string, max chars=150
    shipping_address[email]
    The email address.
    optional, string, max chars=70
    shipping_address[company]
    The company name.
    optional, string, max chars=250
    shipping_address[phone]
    The phone number.
    optional, string, max chars=50
    shipping_address[line1]
    Address line 1.
    optional, string, max chars=180
    shipping_address[line2]
    Address line 2.
    optional, string, max chars=150
    shipping_address[line3]
    Address line 3.
    optional, string, max chars=150
    shipping_address[city]
    The name of the city.
    optional, string, max chars=50
    shipping_address[state_code]
    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).
    optional, string, max chars=50
    shipping_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    shipping_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    shipping_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    shipping_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
    +
    customer
    Parameters for customer
    pass parameters as customer[<param name>]
    customer[vat_number]
    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.
    optional, string, max chars=20
    customer[vat_number_prefix]
    An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country 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_address country 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.
    optional, string, max chars=10
    customer[registered_for_gst]
    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.
    optional, boolean
    +
    contract_term
    Parameters for contract_term
    pass parameters as contract_term[<param name>]
    contract_term[action_at_term_end]
    Action to be taken when the contract term completes.
    optional, enumerated string, default=renew
    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]
    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.
    optional, integer
    +
    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]
    The unique identifier of the item price.
    required, string, max chars=100
    subscription_items[quantity][0..n]
    The quantity of the item purchased.
    optional, integer, min=1
    subscription_items[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[unit_price][0..n]
    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.
    optional, in cents, min=0
    subscription_items[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[billing_cycles][0..n]
    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.

    For addon-item prices:
    If addon billing cycles are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then the value set under attached addons is used. Further, if that value is not provided, then the value set for the addon-item price is used.
    optional, integer, min=0
    subscription_items[trial_end][0..n]
    The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
    optional, timestamp(UTC) in seconds
    subscription_items[service_period_days][0..n]
    The service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    subscription_items[charge_on_event][0..n]
    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.
    optional, enumerated string
    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]
    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.
    optional, boolean
    subscription_items[charge_on_option][0..n]
    Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
    optional, enumerated string
    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]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    Specifies the time duration for which this discount is attached to the subscription.
    required, enumerated string, default=forever
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[period][0..n]
    The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
    optional, integer, min=1
    discounts[period_unit][0..n]
    The unit of time for period. Applicable only when duration_type is limited_period.
    optional, enumerated string
    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]
    Set this to false if this coupon should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:
    • The discount duration_type must be one_time.
    • The feature must be enabled in Chargebee.
    • The site-level setting must be to include coupons in MRR calculations. The site level setting is also the default value for the attribute when this parameter is not passed.
    .
    optional, boolean
    discounts[item_price_id][0..n]
    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
    discounts[operation_type][0..n]
    The operation to be carried out for the discount.
    required, enumerated string
    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]
    The id of the discount to be removed or updated. This parameter is only relevant when discounts[operation_type] is remove or update.
    optional, string, max chars=50
    +
    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]
    The id of the item price for which the tier price is being overridden.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    The overridden price of the tier. The value depends on the type of currency.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Changes the quote produced for updating the subscription items.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/6/edit_update_subscription_quote_for_items \
         -u {site_api_key}:\
         -d subscription[id]="__test__KyVlFpS4cWES31O" \
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[unit_price][0]=1520 \
         -d subscription_items[quantity][0]=2
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/6/edit_update_subscription_quote_for_items \
         -u {site_api_key}:\
         -d subscription[id]="__test__KyVlFpS4cWES31O" \
         -d subscription_items[item_price_id][0]="basic-USD" \
         -d subscription_items[unit_price][0]=1520 \
         -d subscription_items[quantity][0]=2

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 1290, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 0, "credits_applied": 1750, "currency_code": "USD", "customer_id": "__test__KyVlFpS4cWEDZ1I", "date": 1517485111, "id": "6", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 3040, "customer_id": "__test__KyVlFpS4cWEDZ1I", "date_from": 1517485111, "date_to": 1519904310, "description": "basic USD - Prorated Charges", "discount_amount": 0, "entity_id": "basic-USD", "entity_type": "plan_item_price", "id": "__test__KyVlFpS4cWEpb1i", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "per_unit", "quantity": 2, "tax_amount": 0, "unit_amount": 1520 }, {..} ], "object": "quote", "operation_type": "change_subscription", "price_type": "tax_exclusive", "resource_version": 1517485111000, "status": "open", "sub_total": 3040, "subscription_id": "__test__KyVlFpS4cWES31O", "taxes": [], "total": 3040, "updated_at": 1517485111, "valid_till": 1517596199, "version": 2 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/edit_update_subscription_quote_for_items
    notes
    Notes specific to this quote that you want customers to see on the quote PDF.
    optional, string, max chars=2000
    expires_at
    Quotes will be vaild till this date. After this quote will be marked as closed.
    optional, timestamp(UTC) in seconds
    mandatory_items_to_remove[0..n]
    Item ids of mandatorily attached addons that are to be removed from the subscription.
    optional, list of string
    replace_items_list
    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.
    optional, boolean, default=false
    billing_cycles
    Billing cycles set for plan-item price is used by default.
    optional, integer, min=0
    terms_to_charge
    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.
    optional, integer, min=1
    reactivate_from
    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.
    .
    optional, timestamp(UTC) in seconds
    billing_alignment_mode
    Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
    optional, enumerated string
    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]
    Identifier of the coupon as a List. Coupon Codes can also be passed.
    optional, list of string
    replace_coupon_list
    Should be true if the existing coupons should be replaced with the ones that are being passed.
    optional, boolean, default=false
    change_option
    When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out.
    optional, enumerated string
    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
    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.
    .
    optional, timestamp(UTC) in seconds
    force_term_reset
    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.
    optional, boolean, default=false
    reactivate
    Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
    optional, boolean
    +
    subscription
    Parameters for subscription
    pass parameters as subscription[<param name>]
    subscription[start_date]
    The new start date of a future subscription. Applicable only for future subscriptions.
    optional, timestamp(UTC) in seconds
    subscription[trial_end]
    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 status. 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.
    optional, timestamp(UTC) in seconds
    subscription[auto_collection]
    Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
    optional, enumerated string
    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]
    The preferred offline payment method for the subscription.
    optional, enumerated string
    Possible values are
    no_preferenceNo Preference.cashCash.checkCheck.bank_transferBank Transfer.ach_creditACH Credit.sepa_creditSEPA Credit.
    subscription[contract_term_billing_cycle_on_renewal]
    Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles or a custom value depending on the site configuration.
    optional, integer, min=1, max=100
    +
    billing_address
    Parameters for billing_address
    pass parameters as billing_address[<param name>]
    billing_address[first_name]
    The first name of the billing contact.
    optional, string, max chars=150
    billing_address[last_name]
    The last name of the billing contact.
    optional, string, max chars=150
    billing_address[email]
    The email address.
    optional, string, max chars=70
    billing_address[company]
    The company name.
    optional, string, max chars=250
    billing_address[phone]
    The phone number.
    optional, string, max chars=50
    billing_address[line1]
    Address line 1.
    optional, string, max chars=150
    billing_address[line2]
    Address line 2.
    optional, string, max chars=150
    billing_address[line3]
    Address line 3.
    optional, string, max chars=150
    billing_address[city]
    The name of the city.
    optional, string, max chars=50
    billing_address[state_code]
    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).
    optional, string, max chars=50
    billing_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    billing_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    billing_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    billing_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
    +
    shipping_address
    Parameters for shipping_address
    pass parameters as shipping_address[<param name>]
    shipping_address[first_name]
    The first name of the contact.
    optional, string, max chars=150
    shipping_address[last_name]
    The last name of the contact.
    optional, string, max chars=150
    shipping_address[email]
    The email address.
    optional, string, max chars=70
    shipping_address[company]
    The company name.
    optional, string, max chars=250
    shipping_address[phone]
    The phone number.
    optional, string, max chars=50
    shipping_address[line1]
    Address line 1.
    optional, string, max chars=180
    shipping_address[line2]
    Address line 2.
    optional, string, max chars=150
    shipping_address[line3]
    Address line 3.
    optional, string, max chars=150
    shipping_address[city]
    The name of the city.
    optional, string, max chars=50
    shipping_address[state_code]
    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).
    optional, string, max chars=50
    shipping_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    shipping_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    shipping_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    shipping_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.invalidAddress is invalid.
    +
    customer
    Parameters for customer
    pass parameters as customer[<param name>]
    customer[vat_number]
    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.
    optional, string, max chars=20
    customer[vat_number_prefix]
    An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address country 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_address country 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.
    optional, string, max chars=10
    customer[registered_for_gst]
    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.
    optional, boolean
    +
    contract_term
    Parameters for contract_term
    pass parameters as contract_term[<param name>]
    contract_term[action_at_term_end]
    Action to be taken when the contract term completes.
    optional, enumerated string, default=renew
    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]
    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.
    optional, integer
    +
    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]
    The unique identifier of the item price.
    required, string, max chars=100
    subscription_items[quantity][0..n]
    The quantity of the item purchased.
    optional, integer, min=1
    subscription_items[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[unit_price][0..n]
    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.
    optional, in cents, min=0
    subscription_items[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    subscription_items[billing_cycles][0..n]
    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.

    For addon-item prices:
    If addon billing cycles are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then the value set under attached addons is used. Further, if that value is not provided, then the value set for the addon-item price is used.
    optional, integer, min=0
    subscription_items[trial_end][0..n]
    The date/time when the trial period of the item ends. Applies to plan-items and—-when enabled-—addon-items as well.
    optional, timestamp(UTC) in seconds
    subscription_items[service_period_days][0..n]
    The service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    subscription_items[charge_on_event][0..n]
    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.
    optional, enumerated string
    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]
    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.
    optional, boolean
    subscription_items[charge_on_option][0..n]
    Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
    optional, enumerated string
    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]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    Specifies the time duration for which this discount is attached to the subscription.
    required, enumerated string, default=forever
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[period][0..n]
    The duration of time for which the discount is attached to the subscription, in period_units. Applicable only when duration_type is limited_period.
    optional, integer, min=1
    discounts[period_unit][0..n]
    The unit of time for period. Applicable only when duration_type is limited_period.
    optional, enumerated string
    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]
    Set this to false if this coupon should be excluded from monthly recurring revenue (MRR) calculations for the site. The following prerequisites must be met to allow this parameter to be passed:
    • The discount duration_type must be one_time.
    • The feature must be enabled in Chargebee.
    • The site-level setting must be to include coupons in MRR calculations. The site level setting is also the default value for the attribute when this parameter is not passed.
    .
    optional, boolean
    discounts[item_price_id][0..n]
    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
    discounts[operation_type][0..n]
    The operation to be carried out for the discount.
    required, enumerated string
    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]
    The id of the discount to be removed or updated. This parameter is only relevant when discounts[operation_type] is remove or update.
    optional, string, max chars=50
    +
    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]
    The id of the item price for which the tier price is being overridden.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    The overridden price of the tier. The value depends on the type of currency.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Creates a quote using charge-items and one-time charges.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/create_for_charge_items_and_charges \
         -u {site_api_key}:\
         -d customer_id="__test__KyVlFpS4cWCm4J" \
         -d item_prices[item_price_id][0]="ssl-charge-USD"
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/create_for_charge_items_and_charges \
         -u {site_api_key}:\
         -d customer_id="__test__KyVlFpS4cWCm4J" \
         -d item_prices[item_price_id][0]="ssl-charge-USD"

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVlFpS4cWCm4J", "date": 1517485104, "id": "2", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 500, "customer_id": "__test__KyVlFpS4cWCm4J", "date_from": 1517485104, "date_to": 1517485104, "description": "SSL Charge USD Monthly", "discount_amount": 0, "entity_id": "ssl-charge-USD", "entity_type": "charge_item_price", "id": "__test__KyVlFpS4cWCzmS", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 500 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517485104000, "status": "open", "sub_total": 500, "taxes": [], "total": 500, "total_payable": 500, "updated_at": 1517485104, "valid_till": 1517596199, "version": 1 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/create_for_charge_items_and_charges
    name
    The quote name will be used as the pdf name of the quote.
    optional, string, max chars=100
    customer_id
    Identifier of the customer for which the quote needs to be created.
    required, string, max chars=50
    po_number
    Purchase Order Number for this quote.
    optional, string, max chars=100
    notes
    Notes specific to this quote that you want customers to see on the quote PDF.
    optional, string, max chars=2000
    expires_at
    Quotes will be vaild till this date. After this quote will be marked as closed.
    optional, timestamp(UTC) in seconds
    currency_code
    The currency code (ISO 4217 format) of the quote.
    required if Multicurrency is enabled, string, max chars=3
    coupon
    The 'One Time' coupon to be applied.
    optional, string, max chars=100
    coupon_ids[0..n]
    List of Coupons to be added.
    optional, list of string
    +
    shipping_address
    Parameters for shipping_address
    pass parameters as shipping_address[<param name>]
    shipping_address[first_name]
    The first name of the contact.
    optional, string, max chars=150
    shipping_address[last_name]
    The last name of the contact.
    optional, string, max chars=150
    shipping_address[email]
    The email address.
    optional, string, max chars=70
    shipping_address[company]
    The company name.
    optional, string, max chars=250
    shipping_address[phone]
    The phone number.
    optional, string, max chars=50
    shipping_address[line1]
    Address line 1.
    optional, string, max chars=180
    shipping_address[line2]
    Address line 2.
    optional, string, max chars=150
    shipping_address[line3]
    Address line 3.
    optional, string, max chars=150
    shipping_address[city]
    The name of the city.
    optional, string, max chars=50
    shipping_address[state_code]
    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).
    optional, string, max chars=50
    shipping_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    shipping_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    shipping_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    shipping_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.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]
    A unique ID for your system to identify the item price.
    optional, string, max chars=100
    item_prices[quantity][0..n]
    Item price quantity.
    optional, integer, min=1
    item_prices[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_prices[unit_price][0..n]
    Amount that will override the item's default price. The unit depends on the type of currency.
    optional, in cents, min=0
    item_prices[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_prices[service_period_days][0..n]
    Defines service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    +
    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]
    The id of the item price to which this tier belongs.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    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.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    +
    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]
    The amount to be charged. The unit depends on the type of currency.
    optional, in cents, min=1
    charges[amount_in_decimal][0..n]
    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.
    optional, string, max chars=33
    charges[description][0..n]
    Description for this charge.
    optional, string, max chars=250
    charges[avalara_sale_type][0..n]
    Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    optional, enumerated string
    Possible values are
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumer.retailTransaction is a sale to an end user.consumedTransaction is for an item that is consumed directly.vendor_useTransaction is for an item that is subject to vendor use tax.
    charges[avalara_transaction_type][0..n]
    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.
    optional, integer
    charges[avalara_service_type][0..n]
    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.
    optional, integer
    charges[service_period][0..n]
    Service period for charge.
    optional, integer
    charges[discount_amount][0..n]
    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.
    optional, in cents, min=0
    charges[discount_percentage][0..n]
    The percentage of the original amount that should be deducted from it. Either this parameter or charges[discount_amount] should be passed.
    optional, double, min=0.01, max=100.0
    +
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[apply_on][0..n]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    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
    Resource object representing quote.
    always returned
    Resource object representing quoted_charge.
    optional
    Changes the quote produced for adding one-time charges and charge items.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/5/edit_for_charge_items_and_charges \
         -u {site_api_key}:\
         -d charges[amount][0]=1520 \
         -d charges[description][0]="Service Charge" \
         -d item_prices[item_price_id][0]="ssl-charge-USD"
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/5/edit_for_charge_items_and_charges \
         -u {site_api_key}:\
         -d charges[amount][0]=1520 \
         -d charges[description][0]="Service Charge" \
         -d item_prices[item_price_id][0]="ssl-charge-USD"

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 1520, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 1520, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__KyVlFpS4cWDzu12", "date": 1517485109, "id": "5", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 1520, "customer_id": "__test__KyVlFpS4cWDzu12", "date_from": 1517485109, "date_to": 1517485109, "description": "Service Charge", "discount_amount": 0, "entity_type": "adhoc", "id": "__test__KyVlFpS4cWE9a1G", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 1520 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517485109000, "status": "open", "sub_total": 1520, "taxes": [], "total": 1520, "total_payable": 1520, "updated_at": 1517485109, "valid_till": 1517596199, "version": 2 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/edit_for_charge_items_and_charges
    po_number
    Purchase Order Number for this quote.
    optional, string, max chars=100
    notes
    Notes specific to this quote that you want customers to see on the quote PDF.
    optional, string, max chars=2000
    expires_at
    Quotes will be vaild till this date. After this quote will be marked as closed.
    optional, timestamp(UTC) in seconds
    currency_code
    The currency code (ISO 4217 format) of the quote.
    required if Multicurrency is enabled, string, max chars=3
    coupon
    The 'One Time' coupon to be applied.
    optional, string, max chars=100
    coupon_ids[0..n]
    List of Coupons to be added.
    optional, list of string
    +
    shipping_address
    Parameters for shipping_address
    pass parameters as shipping_address[<param name>]
    shipping_address[first_name]
    The first name of the contact.
    optional, string, max chars=150
    shipping_address[last_name]
    The last name of the contact.
    optional, string, max chars=150
    shipping_address[email]
    The email address.
    optional, string, max chars=70
    shipping_address[company]
    The company name.
    optional, string, max chars=250
    shipping_address[phone]
    The phone number.
    optional, string, max chars=50
    shipping_address[line1]
    Address line 1.
    optional, string, max chars=180
    shipping_address[line2]
    Address line 2.
    optional, string, max chars=150
    shipping_address[line3]
    Address line 3.
    optional, string, max chars=150
    shipping_address[city]
    The name of the city.
    optional, string, max chars=50
    shipping_address[state_code]
    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).
    optional, string, max chars=50
    shipping_address[state]
    The state/province name. Is set by Chargebee automatically for US, Canada and India If state_code is provided.
    optional, string, max chars=50
    shipping_address[zip]
    Zip or Postal code.
    optional, string, max chars=20
    shipping_address[country]
    2-letter, ISO 3166 alpha-2 country code.

    If you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, then XI (the code for United Kingdom – Northern Ireland) is available as an option.
    optional, string, max chars=50
    shipping_address[validation_status]
    The address verification status.
    optional, enumerated string, default=not_validated
    Possible values are
    not_validatedAddress is not yet validated.validAddress was validated successfully.partially_validAddress is verified but only partially.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]
    A unique ID for your system to identify the item price.
    optional, string, max chars=100
    item_prices[quantity][0..n]
    Item price quantity.
    optional, integer, min=1
    item_prices[quantity_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_prices[unit_price][0..n]
    Amount that will override the item's default price. The unit depends on the type of currency.
    optional, in cents, min=0
    item_prices[unit_price_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_prices[service_period_days][0..n]
    Defines service period of the item in days from the day of charge.
    optional, integer, min=1, max=730
    +
    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]
    The id of the item price to which this tier belongs.
    optional, string, max chars=100
    item_tiers[starting_unit][0..n]
    The lowest value in the quantity tier.
    optional, integer, min=1
    item_tiers[ending_unit][0..n]
    The highest value in the quantity tier.
    optional, integer
    item_tiers[price][0..n]
    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.
    optional, in cents, default=0, min=0
    item_tiers[starting_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[ending_unit_in_decimal][0..n]
    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.
    optional, string, max chars=33
    item_tiers[price_in_decimal][0..n]
    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=33
    +
    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]
    The amount to be charged. The unit depends on the type of currency.
    optional, in cents, min=1
    charges[amount_in_decimal][0..n]
    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.
    optional, string, max chars=33
    charges[description][0..n]
    Description for this charge.
    optional, string, max chars=250
    charges[avalara_sale_type][0..n]
    Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
    optional, enumerated string
    Possible values are
    wholesaleTransaction is a sale to another company that will resell your product or service to another consumer.retailTransaction is a sale to an end user.consumedTransaction is for an item that is consumed directly.vendor_useTransaction is for an item that is subject to vendor use tax.
    charges[avalara_transaction_type][0..n]
    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.
    optional, integer
    charges[avalara_service_type][0..n]
    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.
    optional, integer
    charges[service_period][0..n]
    Service period for charge.
    optional, integer
    charges[discount_amount][0..n]
    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.
    optional, in cents, min=0
    charges[discount_percentage][0..n]
    The percentage of the original amount that should be deducted from it. Either this parameter or charges[discount_amount] should be passed.
    optional, double, min=0.01, max=100.0
    +
    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]
    The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
    optional, double, min=0.01, max=100.0
    discounts[amount][0..n]
    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.
    optional, in cents, min=0
    discounts[apply_on][0..n]
    The amount on the quote to which the discount is applied.
    required, enumerated string
    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]
    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
    Resource object representing quote.
    always returned
    Resource object representing quoted_charge.
    optional
    List all quotes.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes \
         -G  \
         -u {site_api_key}:\
         --data-urlencode limit=3 \
         --data-urlencode status[in]="["accepted"]" \
         --data-urlencode sort_by[asc]="date"
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes \
         -G  \
         -u {site_api_key}:\
         --data-urlencode limit=3 \
         --data-urlencode status[in]="["accepted"]" \
         --data-urlencode sort_by[asc]="date"

    Sample Response [ JSON ]

    Show more...
    {"list": [ {"quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl5c91O", "date": 1517494508, "id": "4", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl5c91O", "date_from": 1517494508, "date_to": 1517494508, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl5hA1Z", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494508444, "status": "accepted", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494508, "valid_till": 1526134508, "version": 1 }}, {..} ]}

    URL Format GET

    https://{site}.chargebee.com/api/v2/quotes
    limit
    The number of resources to be returned.
    optional, integer, default=10, min=1, max=100
    offset
    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.
    optional, string, max chars=1000
    include_deleted
    If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
    optional, boolean, default=false
    sort_by[<sort-order>]
    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
    Filter Params
    For operator usages, see the Pagination and Filtering section.
    id[<operator>]
    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] = "123"
    optional, string filter
    customer_id[<operator>]
    The identifier of the customer this quote belongs to.
    Supported operators : is, is_not, starts_with, in, not_in

    Example customer_id[is] = "4gmiXbsjdm"
    optional, string filter
    subscription_id[<operator>]
    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] = "4gmiXbsjdm"
    optional, string filter
    status[<operator>]
    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"
    optional, enumerated string filter
    date[<operator>]
    Creation date of the quote. Typically this is the date on which quote is generated.
    Supported operators : after, before, on, between

    Example date[on] = "1435054328"
    optional, timestamp(UTC) in seconds filter
    updated_at[<operator>]
    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

    Example updated_at[after] = "1243545465"
    optional, timestamp(UTC) in seconds filter
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    next_offset
    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, string, max chars=1000
    This API retrieves all the quote line groups and lineitems for a quote.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/7/quote_line_groups \
         -G  \
         -u {site_api_key}:
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/7/quote_line_groups \
         -G  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {"list": [ {"quote_line_group": { "amount_due": 4500, "amount_paid": 0, "charge_event": "immediate", "credits_applied": 0, "id": "qlg___test__8aszcSOcl7oQ2N", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl7j12D", "date_from": 1517494516, "date_to": 1517494516, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl7oR2O", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote_line_group", "sub_total": 4500, "taxes": [], "total": 4500, "version": 1 }}, {..} ]}

    URL Format GET

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/quote_line_groups
    limit
    The number of resources to be returned.
    optional, integer, default=10, min=1, max=100
    offset
    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.
    optional, string, max chars=1000
    Resource object representing quote_line_group.
    always returned
    next_offset
    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, string, max chars=1000
    This API is to convert a quote to an invoice.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/1/convert \
         -X POST  \
         -u {site_api_key}:
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/1/convert \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    { "customer": { "allow_direct_debit": false, "auto_collection": "on", "card_status": "valid", "created_at": 1517494504, "deleted": false, "excess_payments": 0, "first_name": "John", "id": "__test__8aszcSOcl4hbQ", "last_name": "Doe", "net_term_days": 0, "object": "customer", "payment_method": { "gateway": "chargebee", "gateway_account_id": "gw___test__8at1FSOcl3IX1y", "object": "payment_method", "reference_id": "tok___test__8aszcSOcl4n5R", "status": "valid", "type": "card" }, "pii_cleared": "active", "preferred_currency_code": "USD", "primary_payment_source_id": "pm___test__8aszcSOcl4nKS", "promotional_credits": 0, "refundable_credits": 0, "resource_version": 1517494504941, "taxability": "taxable", "unbilled_charges": 0, "updated_at": 1517494504 }, "invoice": { "adjustment_credit_notes": [], "amount_adjusted": 0, "amount_due": 0, "amount_paid": 4500, "amount_to_collect": 0, "applied_credits": [], "base_currency_code": "USD", "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl4hbQ", "date": 1517494506, "deleted": false, "due_date": 1517494506, "dunning_attempts": [], "exchange_rate": 1, "first_invoice": true, "has_advance_charges": false, "id": "__demo_inv__1", "is_gifted": false, "issued_credit_notes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl4hbQ", "date_from": 1517494506, "date_to": 1517494506, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "li___test__8aszcSOcl5Bvi", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "tax_exempt_reason": "tax_not_configured", "unit_amount": 4000 }, {..} ], "linked_orders": [], "linked_payments": [ { "applied_amount": 4500, "applied_at": 1517494506, "txn_amount": 4500, "txn_date": 1517494506, "txn_id": "txn___test__8aszcSOcl5Fuk", "txn_status": "success" }, {..} ], "net_term_days": 0, "new_sales_amount": 4500, "object": "invoice", "paid_at": 1517494506, "price_type": "tax_exclusive", "recurring": false, "resource_version": 1517494506800, "round_off_amount": 0, "status": "paid", "sub_total": 4500, "tax": 0, "term_finalized": true, "total": 4500, "updated_at": 1517494506, "write_off_amount": 0 }, "quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl4hbQ", "date": 1517494506, "id": "1", "invoice_id": "__demo_inv__1", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl4hbQ", "date_from": 1517494505, "date_to": 1517494505, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl55eb", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494506843, "status": "invoiced", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494506, "valid_till": 1526134505, "version": 1 } }

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/convert
    invoice_date
    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 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.
    .
    optional, timestamp(UTC) in seconds
    invoice_immediately
    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.
    .
    optional, boolean
    create_pending_invoices

    Indicates whether the invoices for this subscription are generated with a pending status. This attribute is set to true automatically when the subscription has item prices that belong to metered items.

    You can also set this to true explicitly using the create/update subscription operations. This is useful in the following scenarios:

    • When tracking usages and calculating usage-based charges on your end. You can then add them to the subscription as a one-time charge at the end of the billing term.
    • When you need to inspect all charges before closing invoices for this subscription.

    Applicable only when Metered Billing is enabled for the site

    .
    optional, boolean
    first_invoice_pending
    Applicable only for create subscription metered quote.
    optional, boolean, default=false
    +
    subscription
    Parameters for subscription
    pass parameters as subscription[<param name>]
    subscription[id]
    Applicable only for create subscription quote.
    optional, string, max chars=50
    subscription[auto_collection]
    Applicable only for create subscription quote.
    optional, enumerated string
    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]
    Purchase order number for this subscription.
    optional, string, max chars=100
    subscription[auto_close_invoices]
    Set to false to override for this subscription, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the customer level.
    optional, boolean
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Resource object representing quoted_charge.
    optional
    Resource object representing customer.
    always returned
    Resource object representing subscription.
    optional
    Resource object representing invoice.
    optional
    Resource object representing credit_note.
    optional
    Resource object representing unbilled_charge.
    optional
    Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/9/update_status \
         -X POST  \
         -u {site_api_key}:\
         -d status="accepted"
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/9/update_status \
         -X POST  \
         -u {site_api_key}:\
         -d status="accepted"

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl82K2h", "date": 1517494517, "id": "9", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl82K2h", "date_from": 1517494517, "date_to": 1517494517, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl88r2s", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494518019, "status": "accepted", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494518, "valid_till": 1526134517, "version": 1 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/update_status
    status
    Status to update for the quote.
    required, enumerated string
    Possible values are
    acceptedAccepted.declinedDeclined.closedClosed.
    comment
    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
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Resource object representing quoted_charge.
    optional
    Can be used to extend the expiry date of a quote.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/3/extend_expiry_date \
         -X POST  \
         -u {site_api_key}:\
         -d valid_till=1534774507
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/3/extend_expiry_date \
         -X POST  \
         -u {site_api_key}:\
         -d valid_till=1534774507

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl5Th17", "date": 1517494507, "id": "3", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl5Th17", "date_from": 1517494507, "date_to": 1517494507, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl5ZS1I", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494507969, "status": "open", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494507, "valid_till": 1534774507, "version": 1 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/extend_expiry_date
    valid_till
    Quote will be valid till this date. After this date quote will be marked as closed.
    required, timestamp(UTC) in seconds
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Resource object representing quoted_charge.
    optional
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/2/delete \
         -X POST  \
         -u {site_api_key}:
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/2/delete \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {"quote": { "amount_due": 4500, "amount_paid": 0, "billing_address": { "first_name": "John", "last_name": "Doe", "object": "billing_address", "validation_status": "not_validated" }, "charge_on_acceptance": 4500, "credits_applied": 0, "currency_code": "USD", "customer_id": "__test__8aszcSOcl5L2q", "date": 1517494507, "id": "2", "line_item_discounts": [], "line_item_taxes": [], "line_items": [ { "amount": 4000, "customer_id": "__test__8aszcSOcl5L2q", "date_from": 1517494507, "date_to": 1517494507, "description": "Encryption Charge USD Monthly", "discount_amount": 0, "entity_id": "encryption-charge-USD", "entity_type": "charge_item_price", "id": "__test__8aszcSOcl5QU11", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "tax_amount": 0, "unit_amount": 4000 }, {..} ], "object": "quote", "operation_type": "onetime_invoice", "price_type": "tax_exclusive", "resource_version": 1517494507372, "status": "open", "sub_total": 4500, "taxes": [], "total": 4500, "total_payable": 4500, "updated_at": 1517494507, "valid_till": 1526134507, "version": 1 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/delete
    comment
    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, string, max chars=300
    Resource object representing quote.
    always returned
    Resource object representing quoted_subscription.
    optional
    Resource object representing quoted_charge.
    optional
    Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.
    Sample Request
    curl  https://{site}.chargebee.com/api/v2/quotes/6/pdf \
         -X POST  \
         -u {site_api_key}:
    copy
    curl  https://{site}.chargebee.com/api/v2/quotes/6/pdf \
         -X POST  \
         -u {site_api_key}:

    Sample Response [ JSON ]

    Show more...
    {"download": { "download_url": "https://cb-local-downloads.s3.amazonaws.com/yourapp/quote/__test__8aszcSOcl6k02B.pdf?response-content-disposition=attachment%3Bfilename%3Dyourapp%2Fquote%2F__test__8aszcSOcl6k02B.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210210T141516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIAJI4SN7ONHAOGLOGA%2F20210210%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=d7b1382e1dbe9de4cd1f900abb7df9596ebb54d936083da898ca3931ba91de5e", "object": "download", "valid_till": 1612967116 }}

    URL Format POST

    https://{site}.chargebee.com/api/v2/quotes/{quote_id}/pdf
    consolidated_view
    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.
    optional, boolean, default=false
    disposition_type
    Determines the pdf should be rendered as inline or attachment in the browser.
    optional, enumerated string, default=attachment
    Possible values are
    attachmentpdf is rendered as attachment in the browser.inlinepdf is rendered as inline in the browser.
    Resource object representing download.
    always returned