You are viewing the documentation for Chargebee API V2. If you're using the older version (V1), click here.
When the 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.

Sample quoted charge [ JSON ]

{ "object": "quoted_charge", "invoice_items": [ { "item_price_id": "charge-USD", "quantity": 1, "quantity_in_decimal": "1", "unit_price": 10000, "unit_price_in_decimal": "100.00", "service_period_days": 11, "object": "item_price" }, {..} ], "charges": [ { "amount": 2100, "amount_in_decimal": "21.00", "description": "Initial Hardware", "object": "charge", "service_period_in_days": 11 }, {..} ] }
optional, list of charge
Provides details of all the ad-hoc charges added to the quote.
Charge attributes
amount
optional, in cents, min=1
The amount to be charged. The unit depends on the type of currency.
amount_in_decimal
optional, string, max chars=39
The decimal representation of the amount for the one-time charge. The value is in major units of the currency. Applicable only when multi-decimal pricing is enabled.
description
optional, string, max chars=250
Description for this charge
service_period_in_days
optional, integer, min=1, max=730
Specifies the service period of the charge in days. When the quote is converted, the invoice.line_item.date_from is set to current date/time and invoice.line_item.date_to is set to service_period_in_days ahead of date_from.
avalara_sale_type
optional, enumerated string
Indicates the type of sale carried out. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
Possible values are
wholesaleTransaction is a sale to another company that will resell your product or service to another consumerretailTransaction is a sale to an end userconsumedTransaction is for an item that is consumed directlyvendor_useTransaction is for an item that is subject to vendor use tax
avalara_transaction_type
optional, integer
Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
avalara_service_type
optional, integer
Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use Chargebee’s AvaTax for Communications integration.
invoice_items
Show attributes[+]
optional, list of item_price
Details of individual item prices that are part of this subscription
Invoice item attributes
item_price_id
string, max chars=100
A unique ID for your system to identify the item price.
quantity
optional, integer, min=1
Item price quantity
quantity_in_decimal
optional, string, max chars=33
The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled.
unit_price
optional, in cents, min=0
The price or per-unit-price of the item price. By default, it is the value set for the 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.
unit_price_in_decimal
optional, string, max chars=39
The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled.
service_period_days
optional, integer, min=1, max=730
Defines service period of the item in days from the day of charge.
item_tiers
Show attributes[+]
optional, list of item_tier
The pricing details of subscription_items which have pricing_model as tiered, volume or stairstep. Learn more about pricing models.
Item tier attributes
item_price_id
string, max chars=100
The id of the item price to which this tier belongs.
starting_unit
integer, min=1
The lowest value in the quantity tier.
ending_unit
optional, integer
The highest value in the quantity tier.
price
in cents, default=0, min=0
The per-unit price for the tier when the pricing_model is tiered or volume. The total cost for the item price when the pricing_model is stairstep. The value is in the minor unit of the currency.
starting_unit_in_decimal
optional, string, max chars=33
The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
ending_unit_in_decimal
optional, string, max chars=33
The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
price_in_decimal
optional, string, max chars=39
The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and multi-decimal pricing is enabled.
index
integer, min=0
The index number of the subscription to which the item price is added. Provide a unique number between 0 and 4 (inclusive) for each subscription that is to be created.
optional, list of coupon
List of coupons for this charge
Coupon attributes
coupon_id
string, max chars=100
Used to uniquely identify the coupon
discounts
Show attributes[+]
optional, list of discount
List of discounts for the charges in this quote.
Discount attributes
id
string, max chars=50
An immutable unique id for the discount. It is always auto-generated.
invoice_name
optional, string, max chars=100
The name of the discount as it should appear on customer-facing pages and documents such as invoices and hosted pages. This is auto-generated based on the type, amount, and currency_code of the discount. For example, it can be 10% off or 10$ off.
type
enumerated string, default=percentage
The type of discount. Possible value are:
Possible values are
fixed_amountThe specified amount will be given as discount.percentageThe specified percentage will be given as discount.
percentage
optional, double, min=0.01, max=100.0
The percentage of the original amount that should be deducted from it. Only applicable when discount.type is percentage.
amount
optional, in cents, min=0
The value of the discount. The format of this value depends on the kind of currency. This is only applicable when discount.type is fixed_amount.
currency_code
optional, string, max chars=3
The currency code (ISO 4217 format) of the discount. This is only applicable when discount.type is fixed_amount.
apply_on
enumerated string
The amount on the invoice to which the discount is applied.
Possible values are
invoice_amountThe discount is applied to the invoice sub_total.specific_item_priceThe discount is applied to the invoice.line_item.amount that corresponds to the item price specified by item_price_id.
item_price_id
optional, string, max chars=100
The id of the item price in the subscription to which the discount is to be applied. Relevant only when apply_on = specific_item_price.
created_at
timestamp(UTC) in seconds
Timestamp indicating when this discount is created.
coupon_id
string, max chars=100

Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.

Note:

When the coupon ID contains a special character; for example: #, the API returns an error. Make sure that you encode the coupon ID in the path parameter before making an API call.


index
integer, min=0
The index number of the subscription to which the item price is added. Provide a unique number between 0 and 4 (inclusive) for each subscription that is to be created.