# Create invoice for items estimate

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


This endpoint creates an invoice estimate for non-recurring items.

You can optionally override the line item name and description displayed on the invoice for charge-item prices and one-time charges. These overrides are reflected in the returned invoice estimate.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/estimates/create_invoice_for_items \
     -u {site_api_key}:\
     -d "invoice[customer_id]"="__test__KyVkjTS2onpk57" \
     -d "item_prices[item_price_id][0]"="ssl-charge-USD" \
     -d "item_prices[unit_price][0]"=2000 \
     -d "charges[amount][0]"=1000 \
     -d "charges[description][0]"="Adhoc charge"
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Estimate.CreateInvoiceForItems()
		.InvoiceCustomerId("__test__KyVkjTS2onpk57")
		.ItemPriceItemPriceId(0, "ssl-charge-USD")
		.ItemPriceUnitPrice(0, 2000)
		.ChargeAmount(0, 1000)
		.ChargeDescription(0, "Adhoc charge")
		.Request();

Estimate estimate = result.Estimate;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    estimateAction "github.com/chargebee/chargebee-go/v3/actions/estimate"
    "github.com/chargebee/chargebee-go/v3/models/estimate"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := estimateAction.CreateInvoiceForItems(&estimate.CreateInvoiceForItemsRequestParams{
        ItemPrices : []*estimate.CreateInvoiceForItemsItemPriceParams{
            {
                ItemPriceId : "ssl-charge-USD",
                UnitPrice : chargebee.Int64(2000),
            },
        },
        Charges : []*estimate.CreateInvoiceForItemsChargeParams{
            {
                Amount : chargebee.Int64(1000),
                Description : "Adhoc charge",
            },
        },
        Invoice : &estimate.CreateInvoiceForItemsInvoiceParams{
            CustomerId : "__test__KyVkjTS2onpk57",
        },
    }).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Estimate := res.Estimate
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.EstimateCreateInvoiceForItemsRequest{
    ItemPrices : []*chargebee.EstimateCreateInvoiceForItemsItemPrice{
        {
            ItemPriceId : "ssl-charge-USD",
            UnitPrice : chargebee.Int64(2000),
        },
    },
    Charges : []*chargebee.EstimateCreateInvoiceForItemsCharge{
        {
            Amount : chargebee.Int64(1000),
            Description : "Adhoc charge",
        },
    },
    Invoice : &chargebee.EstimateCreateInvoiceForItemsInvoice{
        CustomerId : "__test__KyVkjTS2onpk57",
    },
}
  res, err := client.Estimate.CreateInvoiceForItems(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Estimate := res.Estimate
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Estimate.createInvoiceForItems()
            .invoiceCustomerId("__test__KyVkjTS2onpk57")
            .itemPriceItemPriceId(0, "ssl-charge-USD")
            .itemPriceUnitPrice(0, 2000L)
            .chargeAmount(0, 1000L)
            .chargeDescription(0, "Adhoc charge")
            .request();

        Estimate estimate = result.estimate();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.estimate.Estimate;
import com.chargebee.v4.models.estimate.params.EstimateCreateInvoiceForItemsParams;
import com.chargebee.v4.models.estimate.responses.EstimateCreateInvoiceForItemsResponse;
import java.util.List;

public class EstimateCreateInvoiceForItems {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        EstimateCreateInvoiceForItemsParams.InvoiceParams invoiceParams =
            EstimateCreateInvoiceForItemsParams.InvoiceParams.builder()
                .customerId("__test__KyVkjTS2onpk57")
                .build();

        EstimateCreateInvoiceForItemsParams.ItemPricesParams itemPrice0 =
            EstimateCreateInvoiceForItemsParams.ItemPricesParams.builder()
                .itemPriceId("ssl-charge-USD")
                .unitPrice(2000L)
                .build();

        List<EstimateCreateInvoiceForItemsParams.ItemPricesParams> itemPricesList =
            List.of(itemPrice0);

        EstimateCreateInvoiceForItemsParams.ChargesParams charge0 =
            EstimateCreateInvoiceForItemsParams.ChargesParams.builder()
                .amount(1000L)
                .description("Adhoc charge")
                .build();

        List<EstimateCreateInvoiceForItemsParams.ChargesParams> chargesList =
            List.of(charge0);

        EstimateCreateInvoiceForItemsParams params = EstimateCreateInvoiceForItemsParams.builder()
            .invoice(invoiceParams)
            .itemPrices(itemPricesList)
            .charges(chargesList)
            .build();

        EstimateCreateInvoiceForItemsResponse response = client.estimates().createInvoiceForItems(params);

        Estimate estimate = response.getEstimate();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.estimate.createInvoiceForItems({
        item_prices: [
            {
                item_price_id: "ssl-charge-USD",
                unit_price: 2000
            }
        ],
        charges: [
            {
                amount: 1000,
                description: "Adhoc charge"
            }
        ],
        invoice: {
            customer_id: "__test__KyVkjTS2onpk57"
        }
    });

    console.log(result);
    const estimate = result.estimate;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->estimate()->createInvoiceForItems([
    "item_prices" => [
        [
            "item_price_id" => "ssl-charge-USD",
            "unit_price" => 2000
        ]
    ],
    "charges" => [
        [
            "amount" => 1000,
            "description" => "Adhoc charge"
        ]
    ],
    "invoice" => [
        "customer_id" => "__test__KyVkjTS2onpk57"
    ]
]);
$estimate = $result->estimate;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Estimate.create_invoice_for_items(
    cb_client.Estimate.CreateInvoiceForItemsParams(
        item_prices=[
            cb_client.Estimate.CreateInvoiceForItemsItemPriceParams(
              item_price_id="ssl-charge-USD",
              unit_price=2000
            )
        ],
        charges=[
            cb_client.Estimate.CreateInvoiceForItemsChargeParams(
              amount=1000,
              description="Adhoc charge"
            )
        ],
        invoice=cb_client.Estimate.CreateInvoiceForItemsInvoiceParams(
            customer_id="__test__KyVkjTS2onpk57"
        )
    )
)
estimate = response.estimate
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Estimate.create_invoice_for_items({
  :invoice => {
    :customer_id => "__test__KyVkjTS2onpk57"
  },
  :item_prices => [
    {
      :item_price_id => "ssl-charge-USD",
      :unit_price => 2000
    }
  ],
  :charges => [
    {
      :amount => 1000,
      :description => "Adhoc charge"
    }
  ]
})

estimate = result.estimate
```

## Sample Response

```json
{
  "estimate": {
    "created_at": 1517492957,
    "invoice_estimate": {
      "amount_due": 3000,
      "amount_paid": 0,
      "credits_applied": 0,
      "currency_code": "USD",
      "customer_id": "__test__8asyKSOcea8tNt",
      "date": 1517492957,
      "line_item_discounts": {},
      "line_item_taxes": {},
      "line_items": [
        {
          "amount": 2000,
          "customer_id": "__test__8asyKSOcea8tNt",
          "date_from": 1517492957,
          "date_to": 1517492957,
          "description": "SSL Charge USD Monthly",
          "discount_amount": 0,
          "entity_id": "ssl-charge-USD",
          "entity_type": "charge_item_price",
          "id": "li___test__8asyKSOceaEYNx",
          "is_taxed": false,
          "item_level_discount_amount": 0,
          "object": "line_item",
          "pricing_model": "flat_fee",
          "quantity": 1,
          "tax_amount": 0,
          "unit_amount": 2000
        },
        {..}
      ],
      "object": "invoice_estimate",
      "price_type": "tax_exclusive",
      "recurring": false,
      "round_off_amount": 0,
      "sub_total": 3000,
      "taxes": {},
      "total": 3000
    },
    "object": "estimate"
  }
}
```

## URL Format

**POST** https://[site].chargebee.com/api/v2/estimates/create_invoice_for_items

## Input Parameters

- `currency_code` (required if Multicurrency is enabled, string, max chars=3)
  The currency code (ISO 4217 format) of the invoice amount.

- `invoice_note` (optional, string, max chars=2000)
  A note for this particular invoice. This, and [all other notes](/docs/api/invoices/invoice-object#notes) for the invoice are displayed on the PDF invoice sent to the customer.

- `remove_general_note` (optional, boolean, default=false)
  Set as `true` to remove the [**general note**](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes) from this invoice.

- `coupon_ids` (optional, string, max chars=100)
  List of Coupons to be added.

- `authorization_transaction_id` (optional, string, max chars=40)
  Authorization transaction to be captured.

- `payment_source_id` (optional, string, max chars=40)
  Payment source to be used for this payment.

- `auto_collection` (optional, enumerated string)
  The customer level auto collection will be override if specified.
  Possible enum values:
    - `on`
      Whenever an invoice is created, an automatic attempt will be made to charge.
    - `off`
      Whenever an invoice is created as payment due.

- `invoice_date` (optional, timestamp(UTC) in seconds)
  The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be 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.

- `invoice` (optional, string)
  Parameters for invoice
  - `customer_id` (optional, string, max chars=50)
    Identifier of the customer for which this invoice needs to be created.
  - `subscription_id` (optional, string, max chars=50)
    Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer\_id' is not specified.(not applicable for consolidated invoice)
  - `po_number` (optional, string, max chars=100)
    Purchase Order Number for this invoice.

- `shipping_address` (optional, string)
  Parameters for shipping\_address
  - `first_name` (optional, string, max chars=150)
    The first name of the contact.
  - `last_name` (optional, string, max chars=150)
    The last name of the contact.
  - `email` (optional, string, max chars=70)
    The email address.
  - `company` (optional, string, max chars=250)
    The company name.
  - `phone` (optional, string, max chars=50)
    The phone number.
  - `line1` (optional, string, max chars=150)
    Address line 1
  - `line2` (optional, string, max chars=150)
    Address line 2
  - `line3` (optional, string, max chars=150)
    Address line 3
  - `city` (optional, string, max chars=50)
    The name of the city.
  - `state_code` (optional, string, max chars=50)
    The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `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` (optional, string, max chars=50)
    The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided.
  - `zip` (optional, string, max chars=20)
    Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address) .
  - `country` (optional, string, max chars=50)
    The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html) .
    
    **Note**: If you enter an invalid country code, the system will return an error.
    
    **Brexit**
    
    If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.
  - `validation_status` (optional, enumerated string, default=not_validated)
    The address verification status.
    Possible enum values:
      - `not_validated`
        Address is not yet validated.
      - `valid`
        Address was validated successfully.
      - `partially_valid`
        The address is valid for taxability but has not been validated for shipping.
      - `invalid`
        Address is invalid.

- `billing_address` (optional, string)
  Parameters for billing\_address
  - `line1` (optional, string, max chars=150)
    Address line 1
  - `line2` (optional, string, max chars=150)
    Address line 2
  - `line3` (optional, string, max chars=150)
    Address line 3
  - `city` (optional, string, max chars=50)
    The name of the city.
  - `state_code` (optional, string, max chars=50)
    The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `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` ).
  - `zip` (optional, string, max chars=20)
    Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address) .
  - `country` (optional, string, max chars=50)
    The billing address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html) .
    
    **Note**: If you enter an invalid country code, the system will return an error.
    
    **Brexit**
    
    If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom - Northern Ireland**) is available as an option.
  - `validation_status` (optional, enumerated string, default=not_validated)
    The address verification status.
    Possible enum values:
      - `not_validated`
        Address is not yet validated.
      - `valid`
        Address was validated successfully.
      - `partially_valid`
        The address is valid for taxability but has not been validated for shipping.
      - `invalid`
        Address is invalid.

- `item_prices` (optional, array)
  Parameters for item\_prices
  - `item_price_id` (optional, string, max chars=100)
    A unique ID for your system to identify the item price.
  - `quantity` (optional, integer)
    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)
    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.
  - `date_from` (optional, timestamp(UTC) in seconds)
    The time when the service period for the item starts.
  - `date_to` (optional, timestamp(UTC) in seconds)
    The time when the service period for the item ends.
  - `description` (optional, string, max chars=250)
    The line item name to display on the invoice for this charge item.
    
    **Default value**
    
    -   The invoice name defined for the item in the product catalog.
  - `entity_description` (optional, string, max chars=500)
    Descriptive text displayed below the line item name on the invoice for this charge item.
    
    **Default value**
    
    -   The [item price description](/docs/api/item_prices/item_price-object#description) from the product catalog.

- `item_tiers` (optional, array)
  Parameters for item\_tiers
  - `item_price_id` (optional, string, max chars=100)
    The id of the item price to which this tier belongs.
  - `starting_unit` (optional, integer)
    The lowest value in the quantity tier.
  - `ending_unit` (optional, integer)
    The highest value in the quantity tier.
  - `price` (optional, in cents)
    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)
    Pricing type for the tier.
    Possible enum values:
      - `per_unit`
        Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).
      - `flat_fee`
        Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the **stairstep** pricing model, `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.
      - `package`
        Indicates 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).
  - `package_size` (optional, integer)
    Package size for the tier when pricing type is `package`. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

- `charges` (optional, array)
  Parameters for charges
  - `amount` (optional, in cents)
    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](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api/currencies) is enabled.
  - `description` (optional, string, max chars=250)
    The name of this one-time charge as displayed on the invoice line item.
  - `taxable` (optional, boolean)
    The amount to be charged is taxable or not.
  - `tax_profile_id` (optional, string, max chars=50)
    Tax profile of the charge.
  - `avalara_tax_code` (optional, string, max chars=50)
    The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html) .
  - `hsn_code` (optional, string, max chars=50)
    The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true:
    
    -   [**India**](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst) has been enabled as a **Tax Region**. (An error is returned when this condition is not true.)
    -   The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee.
  - `taxjar_product_code` (optional, string, max chars=50)
    The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html) .
  - `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.
  - `date_from` (optional, timestamp(UTC) in seconds)
    The time when the service period for the charge starts.
  - `date_to` (optional, timestamp(UTC) in seconds)
    The time when the service period for the charge ends.
  - `entity_description` (optional, string, max chars=500)
    Descriptive text for this one-time charge displayed on the invoice, shown below the line item name.

- `notes_to_remove` (optional, array)
  Parameters for notes\_to\_remove
  - `entity_type` (optional, enumerated string)
    Type of entity to which the [note](/docs/api/invoices/invoice-object#notes) belongs. To remove the general note, use the `remove_general_note` parameter.
    Possible enum values:
      - `customer`
        Entity that represents a customer.
      - `subscription`
        Entity that represents a subscription of customer.
      - `coupon`
        Entity that represents a coupon.
      - `plan_item_price`
        Indicates that this line item is based on plan Item Price
      - `addon_item_price`
        Indicates that this line item is based on addon Item Price
      - `charge_item_price`
        Indicates that this line item is based on charge Item Price
  - `entity_id` (optional, string, max chars=100)
    Unique identifier of the [note](/docs/api/invoices/invoice-object#notes) .

- `discounts` (optional, array)
  Parameters for discounts
  - `percentage` (optional, double)
    The percentage of the original amount that should be deducted from it.
  - `amount` (optional, in cents)
    The value of the discount. [The format of this value](/docs/api/currencies) depends on the kind of currency.
  - `quantity` (optional, integer)
    Specifies the number of free units provided for the item, without affecting the total quantity sold
  - `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`.

- `tax_providers_fields` (optional, array)
  Parameters for tax\_providers\_fields
  - `provider_name` (optional, string, max chars=50)
    Name of the tax provider.
  - `field_id` (optional, string, max chars=50)
    Field id of the attribute which tax vendor has provided while getting onboarded with Chargebee.
  - `field_value` (optional, string, max chars=50)
    The value of the related tax field

## Returns

- `estimate` (Estimate object)
  Resource object representing estimate
