# Quoted charges

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


When the `[operation_type](/docs/api/quotes/quote-object#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
    }
  ]
}
```

## Quoted charges attributes

## Input Parameters

- `charges` (optional, list of charge)
  Provides details of all the ad-hoc charges [added to the quote](/docs/api/quotes/create-a-quote-for-charge-and-charge-items) .
  - `amount` (optional, in cents, min=1)
    The amount to be charged. The unit depends on the [type of currency](/docs/api/getting-started) .
  - `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](/docs/api/getting-started). Applicable only when multi-decimal pricing is enabled.
  - `description` (optional, string, max chars=250)
    Description for this charge
  - `entity_description` (optional, string, max chars=500)
  - `service_period_in_days` (optional, integer, min=1, max=4000)
    Specifies the service period of the charge in days. When the quote is converted, the `[invoice.line_item.date_from](/docs/api/invoices/invoice-object#line_items)` 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](https://www.chargebee.com/docs/avatax-for-communication.html) integration.
    Possible enum values:
      - `wholesale`
        Transaction is a sale to another company that will resell your product or service to another consumer
      - `retail`
        Transaction is a sale to an end user
      - `consumed`
        Transaction is for an item that is consumed directly
      - `vendor_use`
        Transaction 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](https://www.chargebee.com/docs/avatax-for-communication.html) 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](https://www.chargebee.com/docs/avatax-for-communication.html) integration.

- `invoice_items` (optional, list of item_price)
  Details of individual [item prices](/docs/api/item_prices) that are part of this subscription
  - `item_price_id` (required, 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](/docs/api/getting-started) 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](/docs/api/item_prices/item_price-object#price) 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](/docs/api/getting-started) .
  - `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](/docs/api/getting-started) is enabled.
  - `description` (optional, string, max chars=250)
  - `entity_description` (optional, string, max chars=500)
  - `service_period_days` (optional, integer, min=1, max=730)
    Defines service period of the item in days from the day of charge.

- `item_tiers` (optional, list of item_tier)
  The pricing details of `subscription_items` which have `pricing_model` as `tiered` , `volume` or `stairstep`. [Learn more](https://www.chargebee.com/docs/plans.html#pricing-models) about pricing models.
  - `item_price_id` (required, string, max chars=100)
    The id of the item price to which this tier belongs.
  - `starting_unit` (required, integer, min=1)
    The lowest value in the quantity tier.
  - `ending_unit` (optional, integer)
    The highest value in the quantity tier.
  - `price` (required, 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 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](/docs/api/getting-started) 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](/docs/api/getting-started) 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](/docs/api/getting-started) is enabled.
  - `pricing_type` (optional, enumerated string)
    Possible enum values:
      - `per_unit`
      - `flat_fee`
      - `package`
  - `package_size` (optional, integer, min=1)
  - `index` (required, 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.

- `coupons` (optional, list of coupon)
  List of coupons for this charge
  - `coupon_id` (required, string, max chars=100)
    Used to uniquely identify the coupon

- `discounts` (optional, list of discount)
  List of discounts for the charges in this quote.
  - `id` (required, 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](/docs/api/invoices) and [hosted pages](/docs/api/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` (required, enumerated string, default=percentage)
    The type of discount. Possible value are:
    Possible enum values:
      - `fixed_amount`
        The specified amount will be given as discount.
      - `percentage`
        The specified percentage will be given as discount.
      - `offer_quantity`
        A specified number of units of the item price are offered for free. The number of free units is specified in `quantity`. The `offer_quantity` option is valid only when `apply_on` is set to `each_specified_item` and the `[pricing_model](/docs/api/item_prices/item_price-object#pricing_model)` of the item price is `per_unit` .
  - `percentage` (optional, double, min=0.01, max=100)
    The percentage of the original amount that should be deducted from it.
  - `amount` (optional, in cents, min=0)
    The value of the discount. [The format of this value](/docs/api/currencies) depends on the kind of currency.
  - `quantity` (optional, integer, min=1)
    Specifies the number of free units provided for the item, without affecting the total quantity sold. This parameter is applicable only when `discount.type` is `offer_quantity`.
  - `currency_code` (optional, string, max chars=3)
    The currency code ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html) ) of the discount. This is only applicable when `discount.type` is `fixed_amount` .
  - `apply_on` (required, enumerated string)
    The amount on the invoice to which the discount is applied.
    Possible enum values:
      - `invoice_amount`
        The discount is applied to the invoice `sub_total` .
      - `specific_item_price`
        The 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](/docs/api/subscriptions/subscription-object#subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`.
  - `created_at` (required, timestamp(UTC) in seconds)
    Timestamp indicating when this discount is created.
  - `coupon_id` (required, 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](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call.
  - `index` (required, 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.

- `coupon_applicability_mappings` (optional, list of coupon_applicability_mapping)
  - `coupon_id` (optional, string, max chars=50)
  - `applicable_item_price_ids` (optional, string, max chars=100)

