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:
- A monthly plan A for $500 per month.
- A non-recurring addon B for $50.
Now consider a quote that is created for 3 billing cycles of the plan with the addon applied immediately. This quote would be associated with a list of quote line groups: one for each charge event as shown below:
Quote Line group 1
Plan A: $500
Addon B: $50
Total: $550
Quote Line group 2
Plan A: $500
Total: $500
Quote Line group 3
Plan A: $500
Total: $500
Sample quote line group [ JSON ]
{
"id": "qlg___dev__XpbSss5Rp3qHPdF",
"sub_total": 67,
"total": 67,
"credits_applied": 0,
"amount_paid": 0,
"amount_due": 67,
"charge_event": "subscription_change",
"object": "quote_line_group",
"line_items": [
{
"id": "__dev__XpbSss5Rp3qHPeG",
"date_from": 1580385923,
"date_to": 1582199436,
"unit_amount": 67,
"quantity": 1,
"amount": 67,
"pricing_model": "per_unit",
"is_taxed": false,
"tax_amount": 0,
"object": "line_item",
"customer_id": "active_direct",
"description": "SMS Credits - Prorated Charges",
"entity_type": "addon",
"entity_id": "sms-credits",
"discount_amount": 0,
"item_level_discount_amount": 0
}
],
"line_item_discounts": [],
"taxes": [],
"line_item_taxes": []
}
API Index URL GET
https://{site}.chargebee.com/api/v2/quote_line_groups
optional, integer, default=1 Version of the quote line group.
optional, string, max chars=40 Uniquely identifies a quote line group.
in cents, min=0 Subtotal in cents.
optional, in cents, default=0, min=0 Total in cents.
optional, in cents, default=0, min=0 Credits (in cents) applied to this quote line group.
optional, in cents, default=0, min=0 Existing outstanding payments (in cents) if any, applied to this quote line group.
optional, in cents, default=0, min=0 Amount due in cents
optional, enumerated string Describes the time in the subscription lifecycle when the charge is to occur. Possible values are
immediateImmediatesubscription_creationSubscription Creationtrial_startTrial Startsubscription_changeSubscription Changesubscription_renewalSubscription Renewalsubscription_cancelSubscription Cancel
immediateImmediatesubscription_creationSubscription Creationtrial_startTrial Startsubscription_changeSubscription Change
subscription_renewalSubscription Renewalsubscription_cancelSubscription Cancel
Show all values[+]
optional, integer The serial number of the billing cycle of which the quote line group is a part. optional, list of line_item
The list of items in this quote line group.
optional, string, max chars=40 Uniquely identifies a line_item
optional, string, max chars=50 A unique identifier for the subscription this line item belongs to.
timestamp(UTC) in seconds Start date of this line item.
timestamp(UTC) in seconds End date of this line item.
in cents Unit amount of the line item.
optional, in cents Total amount of this line item. Typically equals to unit amount x quantity
optional, enumerated string The
pricing scheme for this item. Possible values are
flat_feeA fixed price that is not quantity-based.per_unitA fixed price per unit quantity.tieredThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.volumeThe per unit price is based on the tier that the total quantity falls in.stairstepA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
flat_feeA fixed price that is not quantity-based.per_unitA fixed price per unit quantity.tieredThere are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.volumeThe per unit price is based on the tier that the total quantity falls in.
stairstepA quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
Show all values[+]
boolean, default=false Specifies whether this line item is taxed or not
optional, in cents, default=0, min=0 The tax amount charged for this item
optional, double, min=0.0, max=100.0 Rate of tax used to calculate tax for this lineitem
optional, string, max chars=39 The decimal representation of the unit amount of the line_item
. The value is in major units of the currency. Returned when the line_item
is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=33 The decimal representation of the quantity of this line_item. Returned when the line_item
is quantity-based and multi-decimal pricing is enabled.
optional, string, max chars=39 The decimal representation of the amount for the line_item
, in major units of the currency. Typically equals to unit_amount_in_decimal
x quantity_in_decimal
. Returned when multi-decimal pricing is enabled.
optional, in cents, min=0 Total discounts for this line item_level_discount_amount
optional, in cents, min=0 Line Item-level discounts for this line.
optional, string, max chars=40 Invoice Reference Line Item ID
string, max chars=250 Detailed description about this line item.
optional, string, max chars=500 Detailed description about this item.
enumerated string Specifies the modelled entity this line item is based on. Possible values are
plan_setupIndicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the plan idplanIndicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the plan idaddonIndicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the addon idadhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case plan_setupIndicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the plan idplanIndicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the plan idaddonIndicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the addon idadhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case Show all values[+]
optional, enumerated string The reason due to which the line item price/amount is exempted from tax. Possible values are
tax_not_configuredIf tax is not enabled for the siteregion_non_taxableIf the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdictionexportYou are not registered for tax in the customer’s region. This is also the reason code when both billing_address
and shipping_address
have not been provided for the customer and subscription respectivelycustomer_exemptIf the Customer is marked as Tax exemptproduct_exemptIf the Plan or Addon is marked as Tax exemptzero_ratedIf the rate of tax is 0% and no Sales/ GST tax is collectable for that line itemreverse_chargeIf the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU onlyhigh_value_physical_goodsIf physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be appliedzero_value_itemtax_not_configured_external_provider
tax_not_configuredIf tax is not enabled for the siteregion_non_taxableIf the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdictionexportYou are not registered for tax in the customer’s region. This is also the reason code when both billing_address
and shipping_address
have not been provided for the customer and subscription respectivelycustomer_exemptIf the Customer is marked as Tax exempt
product_exemptIf the Plan or Addon is marked as Tax exemptzero_ratedIf the rate of tax is 0% and no Sales/ GST tax is collectable for that line itemreverse_chargeIf the Customer is identified as B2B customer (when VAT Number is entered), applicable for EU onlyhigh_value_physical_goodsIf physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be appliedzero_value_itemtax_not_configured_external_provider
Show all values[+]
optional, string, max chars=100 The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type
optional, string, max chars=100 A unique identifier for the customer this line item belongs to optional, list of discount
The list of discounts applied to this quote line group.
in cents, min=0 The amount deducted. The format of this value depends on the kind of currency.
optional, string, max chars=250 Description for this deduction.
optional, string, max chars=40 The unique id of the line item that this deduction is for. Is required when discounts[entity_type]
is item_level_coupon
or document_level_coupon
.
enumerated string The type of deduction and the amount to which it is applied. Possible values are
item_level_couponThe deduction is due to a coupon applied to line item. The coupon id
is passed as entity_id
.document_level_couponThe deduction is due to a coupon applied to the invoice sub_total
. The coupon id is passed as entity_id
.promotional_creditsThe deduction is due to a promotional credit applied to the invoice.prorated_creditsThe deduction is due to a legacy adjustment credit applied to the invoice. The entity_id
is null
in this case. The legacy credits feature is superseded by adjustment_credit_notes
. item_level_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
. Show all values[+]
optional, string, max chars=100 When the deduction is due to a
coupon
, then this is the
id
of the coupon.
optional, string, max chars=50 The coupon code, if applicable, used to provide the discount. The coupon.id is available in entity_id
. optional, list of line_item_discount
The list of discount(s) applied for line items in this quote line group.
Line item discount attributes
string, max chars=50 The unique id of the line item that this deduction is for.
enumerated string The type of deduction and the amount to which it is applied. Possible values are
item_level_couponThe deduction is due to a coupon applied to a line item of the invoice. The coupon id
is available as entity_id
.document_level_couponThe deduction is due to a coupon applied to the invoice sub_total
. The coupon id
is available as entity_id
.promotional_creditsThe deduction is due to a promotional credit applied to the invoice. The entity_id
is null
in this case.prorated_creditsThe deduction is due to a legacy adjustment credit applied to the invoice. The entity_id
is null
in this case. The legacy credits feature is superseded by adjustment_credit_notes
. item_level_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
. Show all values[+]
optional, string, max chars=50 When the deduction is due to a coupon, then this is the id of the coupon.
in cents, min=0 The amount deducted. The format of this value depends on the kind of currency. optional, list of tax
The list of taxes applied to this quote line group.
string, max chars=100 The name of the tax applied. E.g. GST.
in cents, min=0 The tax amount.
optional, string, max chars=250 Description of the tax item. optional, list of line_item_tax
The list of taxes applied on line items in this quote line group.
optional, string, max chars=40 The unique reference id of the line item for which the tax is applicable
string, max chars=100 The name of the tax applied
double, default=0.0, min=0.0, max=100.0 The rate of tax used to calculate tax amount
optional, timestamp(UTC) in seconds
optional, timestamp(UTC) in seconds
optional, bigdecimal, min=-1000000000, max=999999999.999999999
optional, boolean Indicates if tax is applied only on a portion of the line item amount.
optional, boolean Indicates the non-compliance tax that should not be reported to the jurisdiction.
in cents, min=0 Indicates the actual portion of the line item amount that is taxable.
in cents, min=0 The tax amount
optional, enumerated string The type of tax jurisdiction Possible values are
countryThe tax jurisdiction is a countryfederalThe tax jurisdiction is a federalstateThe tax jurisdiction is a statecountyThe tax jurisdiction is a countycityThe tax jurisdiction is a cityspecialSpecial tax jurisdiction.unincorporatedCombined tax of state and county.otherJurisdictions other than the ones listed above.
countryThe tax jurisdiction is a countryfederalThe tax jurisdiction is a federalstateThe tax jurisdiction is a statecountyThe tax jurisdiction is a county
cityThe tax jurisdiction is a cityspecialSpecial tax jurisdiction.unincorporatedCombined tax of state and county.otherJurisdictions other than the ones listed above.
Show all values[+]
optional, string, max chars=250 The name of the tax jurisdiction
optional, string, max chars=250 The tax jurisdiction code tax_amount_in_local_currency
optional, in cents, min=0 Total tax amount in the currency of the place of supply. This is applicable only for Invoice and Credit Notes API.
optional, string, max chars=3 The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed. This is applicable only for Invoice and Credit Notes API.
optional, integer, default=1 Version of the quote line group.
optional, string, max chars=40 Uniquely identifies a quote line group.
in cents, min=0 Subtotal in cents.
optional, in cents, default=0, min=0 Total in cents.
optional, in cents, default=0, min=0 Credits (in cents) applied to this quote line group.
optional, in cents, default=0, min=0 Existing outstanding payments (in cents) if any, applied to this quote line group.
optional, in cents, default=0, min=0 Amount due in cents
optional, enumerated string Describes the time in the subscription lifecycle when the charge is to occur. Possible values are
immediateImmediatesubscription_creationSubscription Creationtrial_startTrial Startsubscription_changeSubscription Changesubscription_renewalSubscription Renewalsubscription_cancelSubscription Cancel
immediateImmediatesubscription_creationSubscription Creationtrial_startTrial Startsubscription_changeSubscription Change
subscription_renewalSubscription Renewalsubscription_cancelSubscription Cancel
Show all values[+]
optional, integer The serial number of the billing cycle of which the quote line group is a part.
optional, list of line_item The list of items in this quote line group.
optional, list of discount The list of discounts applied to this quote line group.
optional, list of line_item_discount The list of discount(s) applied for line items in this quote line group.
optional, list of tax The list of taxes applied to this quote line group.
optional, list of line_item_tax The list of taxes applied on line items in this quote line group.