# Create an invoice

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


[Idempotency Supported](/docs/api/v2/pcv-1/idempotency)

**Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/getting-started) and pass it as input parameter to this API.

Creates a one-off invoice for multiple 'Non Recurring' add-on & ad-hoc charges for a customer.

If the 'auto collection' has been turned 'on' for that customer then payment will be immediately collected using the payment method associated with the customer. The invoice will be generated upon successful collection of payments.

However, if the 'auto collection' is turned 'off', no collection attempt will be made and the invoice will be generated in the "Payment Due" status. Customer level auto collection property can be overridden by passing the auto\_collection parameter.

The Shipping Address can be passed, which will then be attached to the generated invoice.

A 'One Time' coupon can be explicitly specified while creating this invoice.

You can pass the authorization\_transaction\_id to capture the already blocked funds to collect the payment. The excess payments will be applied to the invoice followed by the captured authorization payment.

If capturing authorization fails, the invoice will not be created. The invoice creation can be retried by passing the auto-collection as OFF. If the invoice due amount is greater than the authorization & excess payment amount collectively, the invoice status will be returned as **payment\_due**. Collect payment for invoice API can be used to collect the remaining amount due.

-   The authorization transaction will not be captured if the fraud status is found as suspicious. This api will result in invalid\_state\_for\_request error. Read more on [fraud management using Stripe Radar](https://www.chargebee.com/docs/stripe-radar.html).
-   Passing **auto\_collection** will not update the customer level property.
-   Available Credits and Excess Payments will automatically be applied to this invoice.

## Sample Request

### creates an invoice for 'Non Recurring' addon for a customer.

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/invoices \
     -u {site_api_key}:\
     -d customer_id="__test__XpbBxQiS4HD18hX5" \
     -d "addons[id][0]"="non_recurring_addon" \
     -d "addons[unit_price][0]"=2000 \
     -d "addons[quantity][0]"=2 \
     -d "shipping_address[first_name]"="John" \
     -d "shipping_address[last_name]"="Mathew" \
     -d "shipping_address[city]"="Walnut" \
     -d "shipping_address[state]"="California" \
     -d "shipping_address[zip]"="91789" \
     -d "shipping_address[country]"="US"
```

#### .NET

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

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Invoice.Create()
		.CustomerId("__test__XpbBxQiS4HD18hX5")
		.AddonId(0, "non_recurring_addon")
		.AddonUnitPrice(0, 2000)
		.AddonQuantity(0, 2)
		.ShippingAddressFirstName("John")
		.ShippingAddressLastName("Mathew")
		.ShippingAddressCity("Walnut")
		.ShippingAddressState("California")
		.ShippingAddressZip("91789")
		.ShippingAddressCountry("US")
		.Request();

Invoice invoice = result.Invoice;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    invoiceAction "github.com/chargebee/chargebee-go/v3/actions/invoice"
    "github.com/chargebee/chargebee-go/v3/models/invoice"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := invoiceAction.Create(&invoice.CreateRequestParams{
        Addons : []*invoice.CreateAddonParams{
            {
                Id : "non_recurring_addon",
                UnitPrice : chargebee.Int64(2000),
                Quantity : chargebee.Int32(2),
            },
        },
        CustomerId : "__test__XpbBxQiS4HD18hX5",
        ShippingAddress : &invoice.CreateShippingAddressParams{
            FirstName : "John",
            LastName : "Mathew",
            City : "Walnut",
            State : "California",
            Zip : "91789",
            Country : "US",
        },
    }).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Invoice := res.Invoice
    }
}
```

#### 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.InvoiceCreateRequest{
    Addons : []*chargebee.InvoiceCreateAddon{
        {
            Id : "non_recurring_addon",
            UnitPrice : chargebee.Int64(2000),
            Quantity : chargebee.Int32(2),
        },
    },
    CustomerId : "__test__XpbBxQiS4HD18hX5",
    ShippingAddress : &chargebee.InvoiceCreateShippingAddress{
        FirstName : "John",
        LastName : "Mathew",
        City : "Walnut",
        State : "California",
        Zip : "91789",
        Country : "US",
    },
}
  res, err := client.Invoice.Create(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Invoice := res.Invoice
    }
}
```

#### 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 = Invoice.create()
            .customerId("__test__XpbBxQiS4HD18hX5")
            .addonId(0, "non_recurring_addon")
            .addonUnitPrice(0, 2000L)
            .addonQuantity(0, 2)
            .shippingAddressFirstName("John")
            .shippingAddressLastName("Mathew")
            .shippingAddressCity("Walnut")
            .shippingAddressState("California")
            .shippingAddressZip("91789")
            .shippingAddressCountry("US")
            .request();

        Invoice invoice = result.invoice();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.invoice.Invoice;
import com.chargebee.v4.models.invoice.params.InvoiceCreateParams;
import com.chargebee.v4.models.invoice.responses.InvoiceCreateResponse;
import java.util.List;

public class InvoiceCreate {

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

        InvoiceCreateParams.ShippingAddressParams shippingAddressParams =
            InvoiceCreateParams.ShippingAddressParams.builder()
                .firstName("John")
                .lastName("Mathew")
                .city("Walnut")
                .state("California")
                .zip("91789")
                .country("US")
                .build();

        InvoiceCreateParams.AddonsParams addon0 =
            InvoiceCreateParams.AddonsParams.builder()
                .id("non_recurring_addon")
                .unitPrice(2000L)
                .quantity(2)
                .build();

        List<InvoiceCreateParams.AddonsParams> addonsList =
            List.of(addon0);

        InvoiceCreateParams params = InvoiceCreateParams.builder()
            .customerId("__test__XpbBxQiS4HD18hX5")
            .addons(addonsList)
            .shippingAddress(shippingAddressParams)
            .build();

        InvoiceCreateResponse response = client.invoices().create(params);

        Invoice invoice = response.getInvoice();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

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

try {
    const result = await chargebee.invoice.create({
        addons: [
            {
                id: "non_recurring_addon",
                unit_price: 2000,
                quantity: 2
            }
        ],
        customer_id: "__test__XpbBxQiS4HD18hX5",
        shipping_address: {
            first_name: "John",
            last_name: "Mathew",
            city: "Walnut",
            state: "California",
            zip: 91789,
            country: "US"
        }
    });

    console.log(result);
    const invoice = result.invoice;
} 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->invoice()->create([
    "addons" => [
        [
            "id" => "non_recurring_addon",
            "unit_price" => 2000,
            "quantity" => 2
        ]
    ],
    "customer_id" => "__test__XpbBxQiS4HD18hX5",
    "shipping_address" => [
        "first_name" => "John",
        "last_name" => "Mathew",
        "city" => "Walnut",
        "state" => "California",
        "zip" => "91789",
        "country" => "US"
    ]
]);
$invoice = $result->invoice;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Invoice.create(
    cb_client.Invoice.CreateParams(
        addons=[
            cb_client.Invoice.CreateAddonParams(
              id="non_recurring_addon",
              unit_price=2000,
              quantity=2
            )
        ],
        customer_id="__test__XpbBxQiS4HD18hX5",
        shipping_address=cb_client.Invoice.CreateShippingAddressParams(
            first_name="John",
            last_name="Mathew",
            city="Walnut",
            state="California",
            zip="91789",
            country="US"
        )
    )
)
invoice = response.invoice
```

#### Ruby

```ruby
require 'chargebee'

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

result = ChargeBee::Invoice.create({
  :customer_id => "__test__XpbBxQiS4HD18hX5",
  :addons => [
    {
      :id => "non_recurring_addon",
      :unit_price => 2000,
      :quantity => 2
    }
  ],
  :shipping_address => {
    :first_name => "John",
    :last_name => "Mathew",
    :city => "Walnut",
    :state => "California",
    :zip => "91789",
    :country => "US"
  }
})

invoice = result.invoice
```

### creates an invoice for a one-time charge.

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/invoices \
     -u {site_api_key}:\
     -d customer_id="__test__XpbBxQiS4HD1DPXH" \
     -d "charges[amount][0]"=1000 \
     -d "charges[description][0]"="Support Charge"
```

#### .NET

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

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Invoice.Create()
		.CustomerId("__test__XpbBxQiS4HD1DPXH")
		.ChargeAmount(0, 1000)
		.ChargeDescription(0, "Support Charge")
		.Request();

Invoice invoice = result.Invoice;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    invoiceAction "github.com/chargebee/chargebee-go/v3/actions/invoice"
    "github.com/chargebee/chargebee-go/v3/models/invoice"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := invoiceAction.Create(&invoice.CreateRequestParams{
        Charges : []*invoice.CreateChargeParams{
            {
                Amount : chargebee.Int64(1000),
                Description : "Support Charge",
            },
        },
        CustomerId : "__test__XpbBxQiS4HD1DPXH",
    }).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Invoice := res.Invoice
    }
}
```

#### 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.InvoiceCreateRequest{
    Charges : []*chargebee.InvoiceCreateCharge{
        {
            Amount : chargebee.Int64(1000),
            Description : "Support Charge",
        },
    },
    CustomerId : "__test__XpbBxQiS4HD1DPXH",
}
  res, err := client.Invoice.Create(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Invoice := res.Invoice
    }
}
```

#### 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 = Invoice.create()
            .customerId("__test__XpbBxQiS4HD1DPXH")
            .chargeAmount(0, 1000L)
            .chargeDescription(0, "Support Charge")
            .request();

        Invoice invoice = result.invoice();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.invoice.Invoice;
import com.chargebee.v4.models.invoice.params.InvoiceCreateParams;
import com.chargebee.v4.models.invoice.responses.InvoiceCreateResponse;
import java.util.List;

public class InvoiceCreate {

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

        InvoiceCreateParams.ChargesParams charge0 =
            InvoiceCreateParams.ChargesParams.builder()
                .amount(1000L)
                .description("Support Charge")
                .build();

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

        InvoiceCreateParams params = InvoiceCreateParams.builder()
            .customerId("__test__XpbBxQiS4HD1DPXH")
            .charges(chargesList)
            .build();

        InvoiceCreateResponse response = client.invoices().create(params);

        Invoice invoice = response.getInvoice();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

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

try {
    const result = await chargebee.invoice.create({
        charges: [
            {
                amount: 1000,
                description: "Support Charge"
            }
        ],
        customer_id: "__test__XpbBxQiS4HD1DPXH"
    });

    console.log(result);
    const invoice = result.invoice;
} 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->invoice()->create([
    "charges" => [
        [
            "amount" => 1000,
            "description" => "Support Charge"
        ]
    ],
    "customer_id" => "__test__XpbBxQiS4HD1DPXH"
]);
$invoice = $result->invoice;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Invoice.create(
    cb_client.Invoice.CreateParams(
        charges=[
            cb_client.Invoice.CreateChargeParams(
              amount=1000,
              description="Support Charge"
            )
        ],
        customer_id="__test__XpbBxQiS4HD1DPXH"
    )
)
invoice = response.invoice
```

#### Ruby

```ruby
require 'chargebee'

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

result = ChargeBee::Invoice.create({
  :customer_id => "__test__XpbBxQiS4HD1DPXH",
  :charges => [
    {
      :amount => 1000,
      :description => "Support Charge"
    }
  ]
})

invoice = result.invoice
```

## Sample Response

```json
{
  "invoice": {
    "adjustment_credit_notes": {},
    "amount_adjusted": 0,
    "amount_due": 0,
    "amount_paid": 4000,
    "amount_to_collect": 0,
    "applied_credits": {},
    "base_currency_code": "USD",
    "billing_address": {
      "first_name": "John",
      "last_name": "Mathew",
      "object": "billing_address",
      "validation_status": "not_validated"
    },
    "credits_applied": 0,
    "currency_code": "USD",
    "customer_id": "__test__XpbBxQiS4HD18hX5",
    "date": 1517429428,
    "deleted": false,
    "due_date": 1517429428,
    "dunning_attempts": {},
    "exchange_rate": 1,
    "first_invoice": true,
    "has_advance_charges": false,
    "id": "__demo_inv__13",
    "is_gifted": false,
    "issued_credit_notes": {},
    "line_items": [
      {
        "amount": 4000,
        "customer_id": "__test__XpbBxQiS4HD18hX5",
        "date_from": 1517429428,
        "date_to": 1517429428,
        "description": "non_recurring_addon",
        "discount_amount": 0,
        "entity_id": "non_recurring_addon",
        "entity_type": "addon",
        "id": "li___test__XpbBxQiS4HD1AUXC",
        "is_taxed": false,
        "item_level_discount_amount": 0,
        "object": "line_item",
        "pricing_model": "per_unit",
        "quantity": 2,
        "tax_amount": 0,
        "tax_exempt_reason": "tax_not_configured",
        "unit_amount": 2000
      },
      {..}
    ],
    "linked_orders": {},
    "linked_payments": [
      {
        "applied_amount": 4000,
        "applied_at": 1517429428,
        "txn_amount": 4000,
        "txn_date": 1517429428,
        "txn_id": "txn___test__XpbBxQiS4HD1ArXD",
        "txn_status": "success"
      },
      {..}
    ],
    "net_term_days": 0,
    "new_sales_amount": 4000,
    "object": "invoice",
    "paid_at": 1517429428,
    "price_type": "tax_exclusive",
    "recurring": false,
    "resource_version": 1517429428000,
    "round_off_amount": 0,
    "shipping_address": {
      "city": "Walnut",
      "country": "US",
      "first_name": "John",
      "last_name": "Mathew",
      "object": "shipping_address",
      "state": "California",
      "state_code": "CA",
      "validation_status": "not_validated",
      "zip": "91789"
    },
    "status": "paid",
    "sub_total": 4000,
    "tax": 0,
    "term_finalized": true,
    "total": 4000,
    "updated_at": 1517429428,
    "write_off_amount": 0
  }
}
```

## URL Format

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

## Input Parameters

- `customer_id` (optional, string, max chars=50)
  Identifier of the customer for which this invoice needs to be created. Should be specified if 'subscription\_id' is not specified.

- `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).

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

- `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_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.

- `po_number` (optional, string, max chars=100)
  Purchase Order Number for 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)
  If specified, the customer level auto collection will be overridden.
  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.

- `token_id` (optional, string, max chars=40)
  Token generated by Chargebee JS representing payment method details.

- `replace_primary_payment_source` (optional, boolean, default=false)
  Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False.

- `retain_payment_source` (optional, boolean, default=true)
  Indicates whether the payment source should be retained for the customer.

- `payment_initiator` (optional, enumerated string)
  The type of initiator to be used for the payment request triggered by this operation.
  Possible enum values:
    - `customer`
      Pass this value to indicate that the request is initiated by the customer
    - `merchant`
      Pass this value to indicate that the request is initiated by the merchant

- `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, India and UAE. 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` ). For Dubai (UAE), set as `DU` (not `AE-DU` ).
  - `state` (optional, string, max chars=50)
    The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, 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.

- `statement_descriptor` (optional, string)
  Parameters for statement\_descriptor
  - `descriptor` (optional, string, max chars=65k)
    Payment descriptor text

- `card` (optional, string)
  Parameters for card
  - `gateway_account_id` (optional, string, max chars=50)
    The gateway account in which this payment source is stored.
  - `first_name` (optional, string, max chars=50)
    Cardholder's first name
  - `last_name` (optional, string, max chars=50)
    Cardholder's last name
  - `number` (required if card provided, string, max chars=1500)
    The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js) , you can specify the Braintree encrypted card number here.
  - `expiry_month` (required if card provided, integer, min=1, max=12)
    Card expiry month.
  - `expiry_year` (required if card provided, integer)
    Card expiry year.
  - `cvv` (optional, string, max chars=520)
    The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js) , you can specify the Braintree encrypted CVV here.
  - `preferred_scheme` (optional, enumerated string)
    The customer's preferred card scheme for co-branded cards.
    
    **Note**: Currently, this parameter is only supported for Stripe.
    Possible enum values:
      - `cartes_bancaires`
        A Cartes Bancaires card scheme.
      - `mastercard`
        A MasterCard scheme.
      - `visa`
        A Visa card scheme.
  - `billing_addr1` (optional, string, max chars=150)
    Address line 1, as available in card billing address.
  - `billing_addr2` (optional, string, max chars=150)
    Address line 2, as available in card billing address.
  - `billing_city` (optional, string, max chars=50)
    City, as available in card billing address.
  - `billing_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, India and UAE. For instance, for Arizona (USA), set `billing_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` ). For Dubai (UAE), set as `DU` (not `AE-DU` ).
  - `billing_state` (optional, string, max chars=50)
    The state/province name. Is set by Chargebee automatically for US, Canada, India and UAE, if `billing_state_code` is provided.
  - `billing_zip` (optional, string, max chars=20)
    Postal or Zip code, as available in card billing address.
  - `billing_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.
  - `additional_information` (optional, jsonobject)
    -   `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
        
        -   `payer`: User related information.
            -   `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
            -   `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
    -   `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
    -   `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
            -   `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
    -   `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
    -   `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
    -   `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
        
        -   `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
    -   `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
        
        -   `payer`: User related information.
            -   `document`: Document is the user's identification number based on their country.
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device

- `bank_account` (optional, string)
  Parameters for bank\_account
  - `gateway_account_id` (optional, string, max chars=50)
    The gateway account in which this payment source is stored.
  - `iban` (optional, string, min chars=10, max chars=50)
    Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html) platform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
  - `first_name` (optional, string, max chars=150)
    Account holder's first name as per bank account. If not passed, details from customer details will be considered.
  - `last_name` (optional, string, max chars=150)
    Account holder's last name as per bank account. If not passed, details from customer details will be considered.
  - `company` (optional, string, max chars=250)
    Account holder's company name as per bank account. If not passed, details from customer details will be considered.
  - `email` (optional, string, max chars=70)
    Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address.
  - `phone` (optional, string, max chars=50)
    Phone number of the account holder that is linked to the bank account.
  - `bank_name` (optional, string, max chars=100)
    Name of account holder's bank.
  - `account_number` (optional, string, min chars=4, max chars=17)
    Account holder's bank account number.
  - `routing_number` (optional, string, min chars=3, max chars=9)
    Bank account routing number.
  - `bank_code` (optional, string, max chars=20)
    Indicates the bank code.
  - `account_type` (optional, enumerated string)
    Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null.
    Possible enum values:
      - `checking`
        Checking Account
      - `savings`
        Savings Account
      - `business_checking`
        Business Checking Account
      - `current`
        Current Account
  - `account_holder_type` (optional, enumerated string)
    For Stripe ACH users only. Indicates the account holder type.
    Possible enum values:
      - `individual`
        Individual Account.
      - `company`
        Company Account.
  - `echeck_type` (optional, enumerated string)
    For Authorize.net ACH users only. Indicates the type of eCheck.
    Possible enum values:
      - `web`
        Payment Authorization obtained from the customer via the internet.
      - `ppd`
        Payment Authorization is prearranged between the customer and the merchant.
      - `ccd`
        Payment Authorization agreement from the corporate customer is required. Applicable for business\_checking account\_type.
  - `issuing_country` (optional, string, max chars=50)
    [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code. Required when local bank details are provided, and not IBAN.
  - `swedish_identity_number` (optional, string, min chars=10, max chars=12)
    For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
  - `billing_address` (optional, jsonobject)
    The billing address associated with the bank account. The value is a JSON object with the following keys and their values:- `first_name`:(string, max chars=150) The first name of the contact.
    
    -   `last_name`:(string, max chars=150) The last name of the contact.
    -   `company_name`:(string, max chars=250) The company name for the address.
    -   `line1`:(string, max chars=180) The first line of the address.
    -   `line2`:(string, max chars=180) The second line of the address.
    -   `country`:(string) The name of the country for the address.
    -   `country_code`:(string, max chars=50) The two-letter, [ISO 3166 alpha-2](https://www.iso.org/iso-3166-country-codes.html) country code for the address.
    -   `state`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, India, and UAE.
    -   `state_code`:(string, max chars=50) The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is supported for USA, Canada, India, and UAE. 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`). For Dubai (UAE), set as `DU` (not `AE-DU`).
    -   `city`:(string, max chars=50) The city name for the address.
    -   `postal_code`:(string, max chars=20) The postal or ZIP code for the address.
    -   `phone`:(string, max chars=50) The contact phone number for the address.
    -   `email`:(string, max chars=70) The contact email address for the address.

- `payment_method` (optional, enumerated string)
  Parameters for payment\_method
  - `type` (optional, enumerated string)
    The type of payment method. For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer) API under Customer resource.
    Possible enum values:
      - `card`
        Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource.
      - `paypal_express_checkout`
        Payments made via PayPal Express Checkout.
      - `amazon_payments`
        Payments made via Amazon Payments.
      - `direct_debit`
        Represents bank account for which the direct debit or ACH agreement/mandate is created.
      - `generic`
        Payments made via Generic Payment Method.
      - `alipay`
        Payments made via Alipay.
        
        This payment source is deprecated.
      - `unionpay`
        Payments made via UnionPay.
      - `apple_pay`
        Payments made via Apple Pay.
      - `wechat_pay`
        Payments made via WeChat Pay.
        
        This payment source is deprecated.
      - `ideal`
        Payments made via iDEAL.
      - `google_pay`
        Payments made via Google Pay.
      - `sofort`
        Payments made via Sofort.
      - `bancontact`
        Payments made via Bancontact Card.
      - `giropay`
        Payments made via giropay.
      - `dotpay`
        Payments made via Dotpay.
      - `upi`
        UPI Payments.
      - `netbanking_emandates`
        Netbanking (eMandates) Payments.
      - `venmo`
        Payments made via Venmo
      - `pay_to`
        Payments made via PayTo
      - `faster_payments`
        Payments made via Faster Payments
      - `sepa_instant_transfer`
        Payments made via Sepa Instant Transfer
      - `automated_bank_transfer`
        Represents virtual bank account using which the payment will be done.
      - `klarna_pay_now`
        Payments made via Klarna Pay Now
      - `online_banking_poland`
        Payments made via Online Banking Poland
      - `payconiq_by_bancontact`
        Payments made via Payconiq by Bancontact.
      - `electronic_payment_standard`
        Electronic Payment Standard
      - `kbc_payment_button`
        KBC Payment Button
      - `pay_by_bank`
        Pay By Bank
      - `trustly`
        Trustly
      - `stablecoin`
        Payments made via Stablecoin.
      - `kakao_pay`
        Payments made via Kakao Pay.
      - `naver_pay`
        Payments made via Naver Pay.
      - `revolut_pay`
        Payments made via Revolut Pay.
      - `cash_app_pay`
        Payments made via Cash App Pay.
      - `twint`
        Payments made via Twint
      - `go_pay`
        Payments made via GoPay
      - `grab_pay`
        Payments made via GrabPay
      - `pay_co`
        Payments made via PayCo
      - `after_pay`
        Payments made via Afterpay
      - `swish`
        Payments made via Swish
      - `payme`
        Payments made via PayMe
      - `pix`
        Payments made via Pix
      - `klarna`
        Payments made via Klarna.
      - `alipay_hk`
        Payments made via Alipay HK.
      - `paypay`
        Payments made via PayPay
      - `gcash`
        Payments made via GCash.
      - `south_korean_cards`
        Payments made via South Korean Cards
      - `paynow`
      - `bizum`
      - `promptpay`
      - `dana`
        Payments made via Dana.
      - `touch_n_go`
        Payments made via Touch 'n Go.
      - `tamara`
        Payments made via Tamara.
      - `qpay`
        Payments made via Qpay.
      - `ovo`
      - `momo`
      - `mercado_pago`
      - `nequi`
      - `nupay`
      - `picpay`
      - `thai_qr`
      - `blik`
      - `fpx`
      - `wero`
      - `p24`
      - `affirm_pay`
      - `rakuten_pay`
  - `gateway_account_id` (optional, string, max chars=50)
    The gateway account in which this payment source is stored.
  - `reference_id` (optional, string, max chars=200)
    The reference id. In the case of Amazon and PayPal this will be the _billing agreement id_. For GoCardless direct debit this will be 'mandate id'. In the case of card this will be the identifier provided by the gateway/card vault for the specific payment method resource. **Note:** This is not the one-time temporary token provided by gateways like Stripe.
    
    For more details refer [Update payment method for a customer](/docs/api/customers/update-payment-method-for-a-customer) API under Customer resource.
  - `tmp_token` (required if reference_id not provided, string, max chars=65k)
    Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.
  - `issuing_country` (optional, string, max chars=50)
    [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.
    
    If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or have [manually enabled](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.
  - `additional_information` (optional, jsonobject)
    -   `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
        
        -   `payer`: User related information.
            -   `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
            -   `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
    -   `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
    -   `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
            -   `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
    -   `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
    -   `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
    -   `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
        
        -   `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
    -   `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
        
        -   `payer`: User related information.
            -   `document`: Document is the user's identification number based on their country.
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device

- `payment_intent` (optional, string)
  Parameters for payment\_intent
  - `id` (optional, string, max chars=150)
    Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed.
  - `gateway_account_id` (required if payment intent token provided, string, max chars=50)
    The gateway account used for performing the 3DS flow.
  - `gw_token` (optional, string, max chars=65k)
    Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments) to find out the gateway-specific gw\_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow.
  - `payment_method_type` (optional, enumerated string)
    The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay.
    Possible enum values:
      - `card`
        card
      - `ideal`
        ideal
      - `sofort`
        sofort
      - `bancontact`
        bancontact
      - `google_pay`
        google\_pay
      - `dotpay`
        dotpay
      - `giropay`
        giropay
      - `apple_pay`
        apple\_pay
      - `upi`
        upi
      - `netbanking_emandates`
        netbanking\_emandates
      - `paypal_express_checkout`
        paypal\_express\_checkout
      - `direct_debit`
        direct\_debit
      - `boleto`
        boleto
      - `venmo`
      - `amazon_payments`
        amazon\_payments
      - `pay_to`
      - `faster_payments`
      - `sepa_instant_transfer`
      - `klarna_pay_now`
        Klarna Pay Now
      - `online_banking_poland`
        Online Banking Poland
      - `payconiq_by_bancontact`
        Payments made via Payconiq by Bancontact.
      - `electronic_payment_standard`
        Electronic Payment Standard
      - `kbc_payment_button`
        KBC Payment Button
      - `pay_by_bank`
        Pay By Bank
      - `trustly`
        Trustly
      - `stablecoin`
        Payments made via Stablecoin.
      - `kakao_pay`
        Payments made via Kakao Pay.
      - `naver_pay`
        Payments made via Naver Pay.
      - `revolut_pay`
        Payments made via Revolut Pay.
      - `cash_app_pay`
        Payments made via Cash App Pay.
      - `wechat_pay`
        Payments made via WeChat Pay.
      - `alipay`
        Payments made via Alipay.
      - `twint`
        Payments made via Twint
      - `go_pay`
        Payments made via GoPay
      - `grab_pay`
        Payments made via GrabPay
      - `pay_co`
        Payments made via PayCo
      - `after_pay`
        Payments made via Afterpay
      - `swish`
        Payments made via Swish
      - `payme`
        Payments made via PayMe
      - `pix`
        Pix
      - `klarna`
        Payments made via Klarna.
      - `alipay_hk`
        Payments made via Alipay HK.
      - `paypay`
        PayPay
      - `gcash`
        Payments made via GCash.
      - `south_korean_cards`
        Payments made via South Korean Cards
      - `paynow`
      - `bizum`
      - `promptpay`
      - `dana`
        Payments made via Dana.
      - `touch_n_go`
        Payments made via Touch 'n Go.
      - `tamara`
        Payments made via Tamara.
      - `qpay`
        Payments made via Qpay.
      - `ovo`
      - `momo`
      - `mercado_pago`
      - `nequi`
      - `nupay`
      - `picpay`
      - `thai_qr`
      - `blik`
      - `fpx`
      - `wero`
      - `p24`
      - `affirm_pay`
      - `rakuten_pay`
  - `reference_id` (optional, string, max chars=65k)
    Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow.
  - `additional_information` (optional, jsonobject)
    -   `checkout_com`: While adding a new payment method using [permanent token](/docs/api/payment_sources/create-using-permanent-token) or passing raw card details to Checkout.com, `document` ID and `country_of_residence` are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
        
        -   `payer`: User related information.
            -   `country_of_residence`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a [two-character ISO code](https://docs.checkout.com/resources/codes/country-codes).
            -   `document`: Document ID is the user's [identification number](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country.
    -   `bluesnap`: While passing raw card details to BlueSnap, if `fraud_session_id` is added, [additional validation](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
    -   `braintree`: While passing raw card details to Braintree, your `fraud_merchant_id` and the user's `device_session_id` can be added to perform [additional validation](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
            -   `fraud_merchant_id`: Your [merchant ID](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
    -   `chargebee_payments`: While passing raw card details to Chargebee Payments, if `fraud_session_id` is added, additional validation is performed to avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `fraud_session_id`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
    -   `bank_of_america`: While passing raw card details to Bank of America, your user's `device_session_id` can be added to perform additional validation and avoid fraudulent transactions.
        
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device.
    -   `ecentric`: This parameter is used to verify and process payment method details in Ecentric. If the `merchant_id` parameter is included, Chargebee will vault it / perform a lookup and verification against this `merchant_id`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part.
        
        -   `merchant_id`: Merchant GUID where the card is vaulted or need to be vaulted.
    -   `ebanx`: While passing raw card details to EBANX, the user's `document` is required for some countries and `device_session_id` can be added to perform [additional validation](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions.
        
        -   `payer`: User related information.
            -   `document`: Document is the user's identification number based on their country.
        -   `fraud`: Fraud identification related information.
            -   `device_session_id`: Session ID associated with the user's device

- `addons` (optional, array)
  Parameters for addons
  - `id` (optional, string, max chars=100)
    Identifier of the addon. Multiple addons can be passed.
  - `quantity` (optional, integer)
    Quantity of the addon. Applicable for addons with `pricing_model` other than `flat_fee` .
  - `unit_price` (optional, in cents)
    The price or per-unit-price of the addon. The value depends on the [type of currency](/docs/api/getting-started).
    
    **Note:**
    
    For recurring addons, this is the final price or per-unit price for each billing period of the subscription, regardless of the [addon period](/docs/api/v2/pcv-1/addons/addon-object#period). For example, consider the following details:
    
    -   The `unit_price` provided is $10
    -   The addon billing period is 1 month.
    -   The plan billing period is 3 months.
    -   The addon is only billed for $10 on each subscription renewal.
  - `quantity_in_decimal` (optional, string, max chars=33)
    The decimal representation of the quantity of the [non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon ). Provide the value in major units of the currency. Must be provided when the addon is quantity-based. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies) is enabled.
  - `unit_price_in_decimal` (optional, string, max chars=39)
    When [price overriding](http://chargebee.com/docs/price-override.html ) is enabled for the site, the price or per-unit price of the [non-recurring addon](https://www.chargebee.com/docs/charges.html#non-recurring-addon ) can be set here. The value [set for the addon](/docs/api/v2/pcv-1/addons/addon-object#price) is used by default. Provide the value as a decimal string in major units of the currency. This parameter can only be passed when [multi-decimal pricing](/docs/api/v2/pcv-1/currencies) is enabled.
  - `date_from` (optional, timestamp(UTC) in seconds)
    The time when the service period for the addon starts.
  - `date_to` (optional, timestamp(UTC) in seconds)
    The time when the service period for the addon ends.

- `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/v2/pcv-1/currencies) is enabled.
  - `description` (optional, string, max chars=250)
    Description for this charge
  - `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.

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

- `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:
      - `plan`
        Entity that represents a plan.
      - `addon`
        Entity that represents an addon.
      - `customer`
        Entity that represents a customer.
      - `subscription`
        Entity that represents a subscription of customer.
      - `coupon`
        Entity that represents a coupon.
  - `entity_id` (optional, string, max chars=100)
    Unique identifier of the [note](/docs/api/invoices/invoice-object#notes) .

## Returns

- `invoice` (Invoice object)
  Resource object representing invoice
