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": 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__KyVnHhSBWTO25CR",
"date": 1517501504,
"id": "10",
"line_item_discounts": [],
"line_item_taxes": [],
"line_items": [
{
"amount": 500,
"customer_id": "__test__KyVnHhSBWTO25CR",
"date_from": 1517501504,
"date_to": 1517501504,
"description": "Service Charge",
"discount_amount": 0,
"entity_type": "adhoc",
"id": "__test__KyVnHhSBWTO5pCa",
"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": 1517501504000,
"status": "open",
"sub_total": 500,
"taxes": [],
"total": 500,
"total_payable": 500,
"updated_at": 1517501504,
"valid_till": 1517596199,
"version": 1
}
billing_address
country
as XI
(which is United Kingdom - Northern Ireland).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. Multiple Business Entities is a feature available only on Product Catalog 2.0.
curl https://{site}.chargebee.com/api/v2/quotes/10 \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/10 \ -u {site_api_key}:
Creates a quote for a new subscription under the customer specified.
To send this quote, use “Send Email” quote action in the Chargebee application.
Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.
curl https://{site}.chargebee.com/api/v2/customers/__test__KyVnHhSBWTLzbAo/create_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="basic"
curl https://{site}.chargebee.com/api/v2/customers/__test__KyVnHhSBWTLzbAo/create_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="basic"
subscription[start_date]
cannot be earlier than 14th February.billing_cycles
or a custom value depending on the site configuration. state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to renew
.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 pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10period
. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. active
or non-renewing
status. Once set, the value can't be changed. (Addon trial periods must be enabled by Chargebee Support) pricing_model
other than flat_fee
. Edits a quote. This endpoint is for quotes that are for new subscriptions. To edit a quote that is for updating a subscription, use Edit quote for updating a subscription.
curl https://{site}.chargebee.com/api/v2/quotes/1/edit_create_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="basic"
curl https://{site}.chargebee.com/api/v2/quotes/1/edit_create_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="basic"
subscription[start_date]
cannot be earlier than 14th February.billing_cycles
or a custom value depending on the site configuration. state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to renew
.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 pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10period
. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. active
or non-renewing
status. Once set, the value can't be changed. (Addon trial periods must be enabled by Chargebee Support) pricing_model
other than flat_fee
. Creates a quote for updating a subscription under the customer specified.
To send this quote, use “Send Email” quote action in the Chargebee application.
Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.
curl https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote \ -u {site_api_key}:\ -d "subscription[id]"="__test__KyVnHhSBWTMBNBB" \ -d "subscription[plan_id]"="no_trial" \ -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"
curl https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote \ -u {site_api_key}:\ -d "subscription[id]"="__test__KyVnHhSBWTMBNBB" \ -d "subscription[plan_id]"="no_trial" \ -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"
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. status
is cancelled
and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.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.changes_scheduled_at
.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:
status
is active
, cancelled
, or non_renewing
. current_term_start
.changes_scheduled_at
cannot be earlier than 14th February.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. future
subscription. Applicable only for future
subscriptions. status
is future
, in_trial
, or cancelled
. Also, the value must not be earlier than changes_scheduled_at
or start_date
. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled
or in_trial
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. billing_cycles
or a custom value depending on the site configuration. state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
billing_address
country
as XI
(which is United Kingdom - Northern Ireland).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. true
then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site. contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to renew
.contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to cancel
.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 pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10period
. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. replace_addon_list
. (Addon trial periods must be enabled by Chargebee Support.) pricing_model
other than flat_fee
. Edits a quote. This endpoint is for editing quotes that are for updating a subscription. To edit a quote for a new subscription, use Edit quote for a new subscription.”
curl https://{site}.chargebee.com/api/v2/quotes/1/edit_update_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="no_trial" \ -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"
curl https://{site}.chargebee.com/api/v2/quotes/1/edit_update_subscription_quote \ -u {site_api_key}:\ -d "subscription[plan_id]"="no_trial" \ -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"
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. status
is cancelled
and it is being reactivated via this operation, this is the date/time at which the subscription should be reactivated.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.changes_scheduled_at
.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:
status
is active
, cancelled
, or non_renewing
. current_term_start
.changes_scheduled_at
cannot be earlier than 14th February.future
subscription. Applicable only for future
subscriptions. status
is future
, in_trial
, or cancelled
. Also, the value must not be earlier than changes_scheduled_at
or start_date
. Note: This parameter can be backdated (set to a value in the past) only when the subscription is in cancelled
or in_trial
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. billing_cycles
or a custom value depending on the site configuration. state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
billing_address
country
as XI
(which is United Kingdom - Northern Ireland).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. true
then the Reverse Charge Mechanism is applicable. This field is applicable only when Australian GST is configured for your site. contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to renew
.contract_billing_cycle_on_renewal
.action_at_term_end
for the new contract term is set to cancel
.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 pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10period
. Provide the value as a decimal string in major units of the currency. Can be provided only when multi-decimal pricing is enabled. replace_addon_list
. (Addon trial periods must be enabled by Chargebee Support.) pricing_model
other than flat_fee
. Creates a quote for one-time charges and non-recurring addons. This is applicable only for one-time payment. Recurring charges are not permitted in this quote; use Create quote for a new subscription or Create quote for updating a subscription instead.
To send this quote, use “Send Email” quote action in the Chargebee application.
Based on the customer’s reply, you can use Update quote status and Convert a quote APIs for changing quote status and invoicing the customer, respectively.
curl https://{site}.chargebee.com/api/v2/quotes/create_for_onetime_charges \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWTM5WB0" \ -d "charges[amount][0]"=1000 \ -d "charges[description][0]"="Service Charge"
curl https://{site}.chargebee.com/api/v2/quotes/create_for_onetime_charges \ -u {site_api_key}:\ -d customer_id="__test__KyVnHhSBWTM5WB0" \ -d "charges[amount][0]"=1000 \ -d "charges[description][0]"="Service Charge"
state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price_in_decimal
provided is $10.75invoice.line_item.date_from
is set to current date/time and invoice.line_item.date_to
is set to service_period
days ahead of date_from
. Edits a quote. The quote must be for one-time charges or non-recurring addons.
To edit quotes created for subscriptions, use:
curl https://{site}.chargebee.com/api/v2/quotes/6/edit_one_time_quote \ -X POST \ -u {site_api_key}:\ -d "charges[amount][0]"=1000 \ -d "charges[description][0]"="Service Charge"
curl https://{site}.chargebee.com/api/v2/quotes/6/edit_one_time_quote \ -X POST \ -u {site_api_key}:\ -d "charges[amount][0]"=1000 \ -d "charges[description][0]"="Service Charge"
state_code
as AZ
(not US-AZ
). For Tamil Nadu (India), set as TN
(not IN-TN
). For British Columbia (Canada), set as BC
(not CA-BC
). state_code
is provided. Brexit
If you have enabled EU VAT in 2021 or later, or have manually enable the Brexit configuration, then XI
(the code for United Kingdom – Northern Ireland) is available as an option.
pricing_model
other than flat_fee
. The price or per-unit-price of the addon. The value depends on the type of currency.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price
provided is $10The decimal representation of the price or per-unit price of the addon. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
Note:
For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the addon period. For example, consider the following details:
unit_price_in_decimal
provided is $10.75invoice.line_item.date_from
is set to current date/time and invoice.line_item.date_to
is set to service_period
days ahead of date_from
. 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
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
curl https://{site}.chargebee.com/api/v2/quotes/9/quote_line_groups \ -G \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/9/quote_line_groups \ -G \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/1/convert \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/1/convert \ -X POST \ -u {site_api_key}:
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
.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.
curl https://{site}.chargebee.com/api/v2/quotes/11/update_status \ -u {site_api_key}:\ -d status="ACCEPTED"
curl https://{site}.chargebee.com/api/v2/quotes/11/update_status \ -u {site_api_key}:\ -d status="ACCEPTED"
curl https://{site}.chargebee.com/api/v2/quotes/10/extend_expiry_date \ -u {site_api_key}:\ -d valid_till=1581791399
curl https://{site}.chargebee.com/api/v2/quotes/10/extend_expiry_date \ -u {site_api_key}:\ -d valid_till=1581791399
curl https://{site}.chargebee.com/api/v2/quotes/5/delete \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/5/delete \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/9/pdf \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/9/pdf \ -X POST \ -u {site_api_key}: