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, in cents, min=1The amount to be charged. The unit depends on the
type of currency.
optional, string, max chars=39The 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.
optional, string, max chars=250
Description for this charge
optional, integer, min=1, max=730Specifies 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
.
optional, enumerated stringIndicates 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
optional, integerIndicates 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.
optional, integerIndicates 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.
optional, list of item_priceDetails of individual
item prices that are part of this subscription
string, max chars=100
A unique ID for your system to identify the item price.
optional, integer, min=1
Item price quantity
optional, string, max chars=33The 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.
optional, in cents, min=0The 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.
optional, string, max chars=39The 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.
optional, integer, min=1, max=730
Defines service period of the item in days from the day of charge.
optional, list of item_tierThe pricing details of
subscription_items
which have
pricing_model
as
tiered
,
volume
or
stairstep
.
Learn more about pricing models.
string, max chars=100
The id of the item price to which this tier belongs.
integer, min=1
The lowest value in the quantity tier.
optional, integer
The highest value in the quantity tier.
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.
optional, string, max chars=33The 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.
optional, string, max chars=33The 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.
optional, string, max chars=39The 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.
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
string, max chars=100
Used to uniquely identify the coupon
optional, list of discount
List of discounts for the charges in this quote.
string, max chars=50
An immutable unique id for the discount. It is always auto-generated.
optional, string, max chars=100The 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
.
enumerated string, default=percentageThe 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.
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.
optional, in cents, min=0The 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
.
optional, string, max chars=3The currency code (
ISO 4217 format) of the discount. This is only applicable when
discount.type
is
fixed_amount
.
enumerated stringThe 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
.
optional, string, max chars=100The
id of the item price in the subscription to which the discount is to be applied. Relevant only when
apply_on
=
specific_item_price
.
timestamp(UTC) in seconds
Timestamp indicating when this discount is created.
string, max chars=100Used 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.
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.