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.
{
"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
}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.
The total contract value of the quote.
Note: This parameter applies only when Chargebee CPQ is enabled. To request access, please contact support@chargebee.com
The total discount value of the quote for the contract period.
Note: This parameter applies only when Chargebee CPQ is enabled. To request access, please contact support@chargebee.com
The list of line items for this quote.
The list of tiers applicable for the various line items in this quote.
The list of deductions applied for each line item of this quote.
The list of taxes applied on the line items of this quote.
The list of all deductions applied to the quote.
The list of taxes applicable for this quote.
Shipping address for the quote.
Billing address for the quote.
Retrieves the quotes identified by the 'number' specified in the url.
Create a quote for new subscription line items of a customer.
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.
Item ids of mandatorily attached addons that are to be removed from the subscription.
The number of subscription billing cycles (including the first one) to invoice in advance .
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.
The list of IDs of the coupons to be applied. Coupon codes are also supported.
Note
Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.
When the quote is converted, this attribute determines the date/time as of when the subscription start is to be carried out.
Note
The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.
The number of days within which the customer has to make payment for the invoice.
Note
The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.
Changes the quote produced for creating a new subscription items
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.
Item ids of mandatorily attached addons that are to be removed from the subscription.
The number of subscription billing cycles (including the first one) to invoice in advance .
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.
The list of IDs of the coupons to be applied. Coupon codes are also supported.
Note
Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.
When the quote is converted, this attribute determines the date/time as of when the subscription start is to be carried out.
Note
The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.
The number of days within which the customer has to make payment for the invoice.
Note The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.
Create a quote for updating subscription line items.
Item ids of mandatorily attached addons that are to be removed from the subscription.
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.
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:
changes_scheduled_at cannot be earlier than 14th February.
.Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
The list of IDs of the coupons to be applied. Coupon codes are also supported.
Note
Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.
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..
Note:
The changes_scheduled_at
parameter does not apply to auto_collection
, shipping_address
, and po_number
; these parameters take effect immediately
when scheduling a subscription update.
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.
Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
The number of days within which the customer has to make payment for the invoice.
Note: This parameter applies only when Chargebee CPQ is enabled. To request access, please contact support@chargebee.com
Changes the quote produced for updating the subscription items.
Item ids of mandatorily attached addons that are to be removed from the subscription.
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.
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:
changes_scheduled_at cannot be earlier than 14th February.
.Override the billing alignment mode chosen for the site for calendar billing. Only applicable when using calendar billing.
The list of IDs of the coupons to be applied. Coupon codes are also supported.
Note
Not applicable when Chargebee CPQ is enabled. Use coupons[] array instead.
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.
.
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.
Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data.
The number of days within which the customer has to make payment for the invoice.
Note The parameter applies only when Chargebee CPQ is enabled. To request access, contact Chargebee Support.
Creates a quote using charge-items and one-time charges.
Changes the quote produced for adding one-time charges and charge items.
List all quotes.
The identifier of the customer this quote belongs to. Supported operators : is, is_not, starts_with, in, not_in
Example → customer_id[is_not] = "4gmiXbsjdm"
To filter based on subscription_id. NOTE: Not to be used if consolidated invoicing feature is enabled. Supported operators : is, is_not, starts_with, is_present, in, not_in
Example → subscription_id[is_not] = "4gmiXbsjdm"
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"
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[on] = "1243545465"
This API retrieves all the quote line groups and lineitems for a quote.
This API is to convert a quote to an invoice.
The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as pending
, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes
and line_item_taxes
are computed based on the tax configuration as of invoice_date.
When passing this parameter, the following prerequisites must be met:
invoice_date must be in the past.invoice_date is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December.quoted_subscription.start_date or quoted_subscription.changes_scheduled_at (whichever is applicable).invoice_immediately must be true.
.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.
.
This attribute is set to true
automatically for the subscription when it has one or more metered
items. However, when there are no metered
items, you can pass this parameter as true
to force all invoices (except the first) to be created as pending.
This is useful in the following scenarios:
Note:
pending, pass first_invoice_pending as true..
Non-metered items are billed at the beginning of a billing cycle while metered items are billed at the end. Consequently, the first invoice of the subscription contains only the non-metered items.
By passing this parameter as true, you create the first invoice as pending allowing you to add the previous term's metered charges to it before closing. This is useful when the subscription is moved to Chargebee from a different billing system. As applicable to all pending invoices, this invoice is also closed automatically or via an API call.
Note:
This parameter is passed only when there are metered items in the subscription or when create_pending_invoices is true.
.
Updates the status of the quote.
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 .
Can be used to extend the expiry date of a quote.
Delete a quote using this API.
Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.