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
}
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. curl https://{site}.chargebee.com/api/v2/quotes/8 \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/8 \ -u {site_api_key}:
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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.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
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
start_date
. Set it to 0
to have no trial period. 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
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. 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. active
or non-renewing
state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.charge_on_event
occurs. This parameter only applies to charge-items. charge_on_event
.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
.period
and period_unit
.period_units
. Applicable only when duration_type
is limited_period
. period
. Applicable only when duration_type
is limited_period
. duration_type
is one_time
and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false
. apply_on
= specific_item_price
. 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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
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
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
start_date
. Set it to 0
to have no trial period. 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
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. 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. active
or non-renewing
state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.charge_on_event
occurs. This parameter only applies to charge-items. charge_on_event
.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
.period
and period_unit
.period_units
. Applicable only when duration_type
is limited_period
. period
. Applicable only when duration_type
is limited_period
. duration_type
is one_time
and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false
. apply_on
= specific_item_price
. 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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
curl https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote_for_items \ -u {site_api_key}:\ -d "subscription[id]"="__test__KyVlFpS4cWD9fW" \ -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" \ -d "subscription_items[item_price_id][0]"="basic-USD" \ -d "subscription_items[quantity][0]"=2 \ -d "subscription_items[unit_price][0]"=1000
curl https://{site}.chargebee.com/api/v2/quotes/update_subscription_quote_for_items \ -u {site_api_key}:\ -d "subscription[id]"="__test__KyVlFpS4cWD9fW" \ -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" \ -d "subscription_items[item_price_id][0]"="basic-USD" \ -d "subscription_items[quantity][0]"=2 \ -d "subscription_items[unit_price][0]"=1000
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
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. 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. 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. active
or non-renewing
state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.charge_on_event
occurs. This parameter only applies to charge-items. charge_on_event
.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
.period
and period_unit
.period_units
. Applicable only when duration_type
is limited_period
. period
. Applicable only when duration_type
is limited_period
. duration_type
is one_time
and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false
. apply_on
= specific_item_price
. 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.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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
curl https://{site}.chargebee.com/api/v2/quotes/6/edit_update_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]"=2
curl https://{site}.chargebee.com/api/v2/quotes/6/edit_update_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]"=2
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
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. 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. 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. active
or non-renewing
state. Also includes reactivations of canceled subscriptions.contract_terminationwhen a contract term is terminated.charge_on_event
occurs. This parameter only applies to charge-items. charge_on_event
.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
.period
and period_unit
.period_units
. Applicable only when duration_type
is limited_period
. period
. Applicable only when duration_type
is limited_period
. duration_type
is one_time
and when the feature is enabled in Chargebee. Also, If the site-level setting is to exclude one-time discounts from MRR calculations, this value is always returned false
. apply_on
= specific_item_price
. 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.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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
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"
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"
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.
item_price
. This is only applicable when the pricing_model
of the item_price
is flat_fee
or per_unit
. The value depends on the type of currency. 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. 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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).charges[discount_percentage]
should be passed. 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
.apply_on
= specific_item_price
. 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.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.curl https://{site}.chargebee.com/api/v2/quotes/5/edit_for_charge_items_and_charges \ -X POST \ -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"
curl https://{site}.chargebee.com/api/v2/quotes/5/edit_for_charge_items_and_charges \ -X POST \ -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"
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.
item_price
. This is only applicable when the pricing_model
of the item_price
is flat_fee
or per_unit
. The value depends on the type of currency. 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. 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. 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. 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. pricing_type
will be set to flat_fee
by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.packageIndicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20 consuming 400 units will result in a charge of $80 (4 × $20).charges[discount_percentage]
should be passed. 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
.apply_on
= specific_item_price
. 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.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.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
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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
curl https://{site}.chargebee.com/api/v2/quotes/7/quote_line_groups \ -G \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/7/quote_line_groups \ -G \ -u {site_api_key}:
The line items of a quote are grouped by charge event. Each of these groups is called a quote line group. A quote would have at least one quote line group. Let’s look at an example.
Consider the following:
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.
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
.
false
to prevent the automatic closing of invoices for this subscription. The value passed here takes precedence over the value stored at the customer level. 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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.Represents a customer, which can be an individual or organization that subscribes to your products or services. The customer resource associates with subscriptions, card information, and billing addresses. The customer details include their ID, name, contact information, and any custom attributes you'd like to associate with them.
Breaking Change:
billing_address
and vat_number
and replaces them with values from the request.billing_address
and vat_number
.A Chargebee subscription connects a customer record to products/services. It describes what the customer has signed up for and how often they're charged for it. The essential components of a subscription are:
The charges in a subscription are billed via invoices.
Note: The maximum number of subscriptions for any given customer (active
or not) is 900.
Chargebee offers two billing frequency options for subscriptions:
Plan-based billing (default
): Subscriptions are billed based on the billing period defined for the item price of the item_type
plan
. Learn more.
Multi-frequency billing: Subscriptions are billed according to the billing period of each recurring item price within the subscription. Learn more.
Important
Limitations of Multi-frequency billing.
Private Beta
Multi-frequency billing is in private beta. Please reach out to the Chargebee support to enable this feature.
The selection of the billing frequency preference is configured at the site level.
When creating or updating a subscription, one of the item prices specified under subscription_items must be a plan-item price. The remaining must be compatible addon- or charge-item prices. An item price is compatible with a plan-item price if their currencies are the same. Additionally, an addon-item price is compatible with a plan-item price only if their billing frequencies meet the following conditions:
period_unit for plan-item price |
Compatible period_unit for addon-item price |
Compatible |
---|---|---|
day |
day |
The Example If the |
week |
week or day |
The Example If the
|
month |
month |
The Example If the |
year |
year or month |
The Example If the
|
Anrok: Canadian customers can have multiple tax registration numbers. We currently support only sharing one tax registration number with Anrok. So we added a new field which can have comma separated multiple tax reg numbers for Anrok. Values configured in the field is passed as it is to Anrok for accurate tax calculation
Field ID | Field Value | APIs |
---|---|---|
additionalTaxRegistrationNumber |
Canadian tax registration numbers in comma separated fashion. | APIs involving customer attributes. Also includes APIs where we are creating new customers. Eg: estimate, subscription, hosted pages. |
Vertex: Chargebee shares field IDs and corresponding values with merchants, who then configure them on the Vertex Platform for seamless integration
Note: Field Id like customerCode
, customerClass
, andtaxExempted
belong to the customer object.
Field Id like productCode
, productClass
, productTaxCode
, and productClass
belong to the product object.
Field ID | Field Value | APIs |
---|---|---|
productCode
|
Merchant to configure it on Vertex Platform | APIs having Plan(PC1), Addons(PC1) and Item Prices(PC2) attributes. |
productClass |
||
customerCode |
APIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages. | |
customerClass |
Taxamo: Chargebee shares field IDs and corresponding values with merchants, who then configure them on the Taxamo Platform for seamless integration
Field Id | Field Value | APIs |
---|---|---|
productTaxCode |
Merchant to configure it on Taxamo Platform | APIs having Plan(PC1), Addons(PC1) and Item Prices(PC2) attributes. |
productClass |
||
taxExempted |
APIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages. |
cbtaxes: With CBTaxes, you can activate India IGST for customers located in Special Economic Zones (SEZ), implement zero-rated tax for SEZ customers, enable India IGST for customers outside of India, and set up zero-rated tax for customers outside of India.
Field ID | Field Value | APIs |
---|---|---|
indiaSez |
SEZ_IGST_TAX |
APIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages. |
SEZ_ZERO_RATED_TAX |
||
indiaExport |
EXPORT_IGST_TAX |
|
EXPORT_ZERO_RATED_TAX |
All: For tax inclusive tax calculation, For tax exclusive tax calculation. This is currently used for price type overriding at customer level
Field ID | Field Value | APIs |
---|---|---|
priceType
|
TAX_INCLUSIVE
|
APIs involving customer attributes. Also includes APIs where we are creating new customers. For example: estimate, subscription, hosted pages. |
TAX_EXCLUSIVE
| ||
SITE_DEFAULT or blank
| Removes price type override, and allows site level configuration to be used for tax calculation. |
An invoice is a commercial document representing a sale of products/services offered by you to a customer. It enumerates all the charges, adjustments, payments, discounts and taxes associated with the sale.
An invoice is said to be a recurring one when it is has at least one charge for a plan or an addon item price. It is a non-recurring one when it has charges for only charge-item prices or one-time charges.
The item prices for any given billing term of a subscription are billed via an invoice at the beginning of the term (unless the charges are left unbilled). However, item prices that belong to metered
items are billed at the end of the term via a pending
invoice that can close automatically or via an API call. Moreover, when there are no metered
items in the subscription, the invoices can still be generated as pending
while creating or updating a subscription.
If auto-collection is enabled, then immediately on invoice generation (or, in case of subscriptions that have create_pending_invoices
as true
, on invoice closure), the payment method on file is charged:
paid
.payment_due
and dunning settings are taken into account for payment retries. not_paid
. paid
and the balance, if any, is added to excess payments for the customer. A Credit Note is a document that specifies the money owed by a business to its customer. The seller usually issues a Credit Note for the same or lower amount than the invoice, and then repays the money to the customer or set it off against other 'due' invoices.
Credit notes in Chargebee are categorized into three types:
1. adjustment
: Adjustment credit notes are used to adjust the amount of an existing invoice in the payment_due
or not_paid
status. Use this type of credit note to reduce the invoice amount, typically as a discount to the customer.
Adjustment credit notes are automatically created in the following cases:
payment_due
or not_paid
status.2. refundable
: Refundable credit notes allow you to return a certain amount to the customer. These credits can be:
Refundable credit notes are automatically created in the following cases:
paid
status. Refundable credits are applied to future invoices or can be refunded to the original payment method.3. store
: Store credit notes are created for paid
or partially_paid
invoice status during subscription changes, such as upgrades, downgrades, or cancellations.
Key characteristics of store credits:
curl https://{site}.chargebee.com/api/v2/quotes/9/update_status \ -u {site_api_key}:\ -d status="ACCEPTED"
curl https://{site}.chargebee.com/api/v2/quotes/9/update_status \ -u {site_api_key}:\ -d status="ACCEPTED"
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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.curl https://{site}.chargebee.com/api/v2/quotes/3/extend_expiry_date \ -u {site_api_key}:\ -d valid_till=1534774507
curl https://{site}.chargebee.com/api/v2/quotes/3/extend_expiry_date \ -u {site_api_key}:\ -d valid_till=1534774507
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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.curl https://{site}.chargebee.com/api/v2/quotes/2/delete \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/2/delete \ -X POST \ -u {site_api_key}:
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.
When a quote
is created, it generates the quoted_subscription
resource. This captures most of the details of the subscription that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.
operation_type
of a
quote
is
onetime_invoice
, the
quoted_charges
resource contains the details of the invoice that is eventually created once the quote is invoiced. It is always returned along with the quote.curl https://{site}.chargebee.com/api/v2/quotes/6/pdf \ -X POST \ -u {site_api_key}:
curl https://{site}.chargebee.com/api/v2/quotes/6/pdf \ -X POST \ -u {site_api_key}:
Requesting to download a file through this API will return the download_url
attribute as the response. This attribute will contain a URL that will allow the requested content to be downloaded.