younifyd
Menu

Import Invoice

Import invoice

POST/invoices/import_invoice

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the Import Invoice action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{importInvoice.response.data}}.

Request

Headers

chargebee-request-origin-devicestring

The device from which the customer has made the request

chargebee-request-origin-userstring (email)

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-user-encodedstring (email)

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-request-origin-ipstring

The IP address of the customer where the request originated

chargebee-event-actionsstring

skip all actions to be done on the events

One ofall-disabled

chargebee-event-emailstring

skip only emails

One ofall-disabled

chargebee-event-webhookstring

skip only webhooks

One ofall-disabled

chargebee-business-entity-idstring

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

Request body

Enter the body as JSON in the step's Body field.

idstringrequired

<p class="mb-2">The invoice ID (also known as the invoice number). Must be unique so that it does not conflict with any existing <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">invoice.id</code>.</p>

currency_codestring

The currency code (ISO 4217 format) for the invoice.

customer_idstring

Identifier of the [customer](/docs/api/customers) resource to which this invoice belongs.

subscription_idstring

The ID of the [subscription](/docs/api/subscriptions) resource to which this invoice belongs.

po_numberstring

Purchase Order Number for this invoice.

price_typestring

The price type of the invoice. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.

One oftax_exclusivetax_inclusiveDefault "tax_exclusive"

tax_override_reasonstring

The reason for exempting the invoice from tax. (Applicable only for exempted invoices.). \* zero_rated - If the rate of tax is 0% and no Sales/ GST tax is collectable for that line item \* export - The customer is from a non-taxable region or the billing address and shipping address are unavailable. \* customer_exempt - The customer is [exempted](/docs/api/customers/customer-object#taxability) from tax. \* tax_not_configured_external_provider - If the tax is not configured for the country in 3rd party tax provider. \* id_exempt - The customer is from a different country than your business and they have a valid VAT number or, the customer is a business entity. (This reason is only applicable when [EU VAT](https://www.chargebee.com/docs/eu-vat.html) or [UK VAT](https://www.chargebee.com/docs/uk-vat.html) is enabled.) \* high_value_physical_goods - If physical goods are sold from outside Australia to customers in Australia, and the price of all the physical good line items is greater than AUD 1000, then tax will not be applied \* product_exempt - If the Plan or Addon is marked as Tax exempt \* region_non_taxable - If the product sold is not taxable in this region, but it is taxable in other regions, hence this region is not part of the Taxable jurisdiction \* zero_value_item - If the total invoice value/amount is equal to zero. E.g., If the total order value is $10 and a $10 coupon has been applied against that order, the total order value becomes $0. Hence the invoice value also becomes $0.

One ofzero_ratedid_exemptcustomer_exemptregion_non_taxableproduct_exemptexporthigh_value_physical_goodszero_value_itemtax_not_configured_external_provider

vat_numberstring

Vat Number. Required if this invoice is VAT exempted.

vat_number_prefixstring

<p class="mb-2">An overridden value for the first two characters of the <a href="https://en.wikipedia.org/wiki/VAT_identification_number" target="_blank">full VAT number</a>. Only applicable specifically for customers with <code><a href="/docs/api/customers/customer-object#billing_address">billing_address</a></code></p> <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">country</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (which is <strong class="font-semibold">United Kingdom - Northern Ireland</strong> ).</p> <p class="mb-2">When you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank">EU VAT</a> in 2021 or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank">manually enabled</a> the Brexit configuration, you have the option of setting <code><a href="/docs/api/customers/customer-object#billing_address">billing_address</a></code></p> <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">country</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code>. That&#x27;s the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>. The first two characters of the VAT number in such a case is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> by default. However, if the VAT number was registered in UK, the value should be <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">GB</code>. Set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">vat_number_prefix</code> to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">GB</code> for such cases.</p>

dateinteger (unix-time)required

Date when invoice raised.

totalinteger (int64)required

Invoice total amount.

round_offinteger (int64)

[Round off amount](/docs/api/invoices/invoice-object#round_off_amount).

statusstring

<p class="mb-2">Current status of this invoice.</p> * not_paid - <p class="mb-2">Indicates the payment is not made and all attempts to collect is failed.</p> * voided - <p class="mb-2">Indicates a voided invoice.</p> * paid - <p class="mb-2">Indicates a paid invoice.</p> * posted - <p class="mb-2">Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period.</p> * pending - <p class="mb-2">The <a href="/docs/api/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). An invoice is generated with this <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> when it has line items that belong to items that are <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">metered</code> or when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">subscription.create_pending_invoices</code>attribute is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code>. The <a href="/docs/api/v2/pcv-1/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). All invoices are generated with this <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> when <a href="https://www.chargebee.com/docs/1.0/metered_billing.html" target="_blank">Metered Billing</a> is enabled for the site.</p> * payment_due - <p class="mb-2">Indicates the payment is not yet collected and is being retried as per retry settings.</p>

One ofpaidpostedpayment_duenot_paidvoidedpending

voided_atinteger (unix-time)

Timestamp indicating the date \& time this invoice got voided.

void_reason_codestring

Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive.

is_written_offboolean

If is_written_off is true then the invoice is written off.

Default false

write_off_amountinteger (int64)

Amount written off against this invoice. If this value is not present then the due amount of the invoice will be written off.

Default 0

write_off_dateinteger (unix-time)

The date on which the write_off invoice has occurred. This is a mandatory field if is_written_off is true. The same date reflects on the created credit note.

due_dateinteger (unix-time)

The due date of the invoice.

net_term_daysinteger (int32)

<p class="mb-2">The number of days from <a href="/docs/api/invoices/invoice-object#date" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">invoice.date</code></a> until payment for the invoice is due.</p>

Default 0

has_advance_chargesboolean

Boolean indicating any advance charge is present in this invoice.

Default false

use_for_prorationboolean

If the invoice falls within the subscription current term will be used for proration.

Default false

paid_atinteger (unix-time)

<p class="mb-2">Timestamp when the invoice was paid. Applicable only when <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code>.</p>

credit_noteobject

Parameters for credit_note

idstring

A unique identifier for the credit note. This is a mandatory field if is_written_off is true.

billing_addressobject

Parameters for billing_address

first_namestring

The first name of the billing contact.

last_namestring

The last name of the billing contact.

emailstring (email)

The email address.

companystring

The company name.

phonestring

The phone number.

line1string

Address line 1

line2string

Address line 2

line3string

Address line 3

citystring

The name of the city.

state_codestring

<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">AZ</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">US-AZ</code> ). For Tamil Nadu (India), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">TN</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">IN-TN</code> ). For British Columbia (Canada), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">BC</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">CA-BC</code> ).</p>

statestring

<p class="mb-2">The state/province name. Is set by Chargebee automatically for US, Canada and India If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> is provided.</p>

zipstring

Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address) .

countrystring

<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>

validation_statusstring

The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated.

One ofnot_validatedvalidpartially_validinvalidDefault "not_validated"

shipping_addressobject

Parameters for shipping_address

first_namestring

The first name of the contact.

last_namestring

The last name of the contact.

emailstring (email)

The email address.

companystring

The company name.

phonestring

The phone number.

line1string

Address line 1

line2string

Address line 2

line3string

Address line 3

citystring

The name of the city.

state_codestring

<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search/code" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">AZ</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">US-AZ</code> ). For Tamil Nadu (India), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">TN</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">IN-TN</code> ). For British Columbia (Canada), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">BC</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">CA-BC</code> ).</p>

statestring

<p class="mb-2">The state/province name. Is set by Chargebee automatically for US, Canada and India If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> is provided.</p>

zipstring

Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address) .

countrystring

<p class="mb-2">The billing address country of the customer. Must be one of <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener noreferrer">ISO 3166 alpha-2 country code</a> .</p> <p class="mb-2"><strong class="font-semibold">Note</strong>: If you enter an invalid country code, the system will return an error.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Brexit</strong></p><p class="mb-2">If you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank" rel="noopener noreferrer">EU VAT</a> in 2021 or later, or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank" rel="noopener noreferrer">manually enable</a> the Brexit configuration, then <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>) is available as an option.</p></div>

validation_statusstring

The address verification status. \* 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.

One ofnot_validatedvalidpartially_validinvalidDefault "not_validated"

line_itemsobject

Parameters for line_items

idarray<string>

Uniquely identifies a line_item

date_fromarray<integer (unix-time)>

Start date of this line item.

date_toarray<integer (unix-time)>

End date of this line item.

subscription_idarray<string>

<p class="mb-2">A unique identifier for the <a href="/docs/api/subscriptions" class="text-blue-600 hover:text-blue-800 underline">subscription</a> resource to which this line item belongs.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">When multiple different <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items.subscription_id[]</code> are specified, this indicates a <a href="https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/consolidated-invoicing" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">consolidated invoice</a>.</li> </ul></div>

descriptionarray<string>required

<p class="mb-2">Description for this line item. Append <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">- prorated charges</code> to the description if the line item is prorated. This will prevent it from being considered for <a href="/docs/api/subscriptions/subscription-object#mrr" class="text-blue-600 hover:text-blue-800 underline">MRR</a> calculations.</p>

unit_amountarray<integer (int64)>

Unit amount of the line item.

quantityarray<integer (int32)>

<p class="mb-2"><a href="/docs/api/invoices/invoice-object#line_items_quantity">Quantity of the recurring item</a> which is represented by this line item. For <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">metered</code> line items, this value is updated from <a href="/docs/api/usages">usages</a> once when the invoice is generated as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pending</code> and finally when the invoice is <a href="/docs/api/invoices/close-a-pending-invoice">closed</a>. <a href="/docs/api/v2/pcv-1/invoices/invoice-object#line_items_quantity">Quantity of the recurring item</a> which is represented by this line item.</p>

amountarray<integer (int64)>

Total amount of this lineitem. Not required if the line_items\[unit_amount\] param is passed

unit_amount_in_decimalarray<string>

<p class="mb-2">The decimal representation of the unit amount of the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code>. The value is in major units of the currency. Returned when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code> is quantity-based and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

quantity_in_decimalarray<string>

<p class="mb-2">The decimal representation of the quantity of this line_item. Returned when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code> is quantity-based and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

amount_in_decimalarray<string>

<p class="mb-2">The decimal representation of the amount for the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code> , in major units of the currency. Typically equals to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">unit_amount_in_decimal</code> x <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">quantity_in_decimal</code>. Returned when <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

entity_typearray<string>
entity_idarray<string>

The ID of the entity that this line item corresponds to.

item_level_discount1_entity_idarray<string>

First item level discount entity id

item_level_discount1_amountarray<integer (int64)>

First item level discount amount

item_level_discount2_entity_idarray<string>

Second item level discount entity id

item_level_discount2_amountarray<integer (int64)>

Second item level discount amount

tax1_namearray<string>

First tax name

tax1_amountarray<integer (int64)>

First tax amount

tax2_namearray<string>

Second tax name

tax2_amountarray<integer (int64)>

Second tax amount

tax3_namearray<string>

Third tax name

tax3_amountarray<integer (int64)>

Third tax amount

tax4_namearray<string>

Fourth tax name

tax4_amountarray<integer (int64)>

Fourth tax amount

tax5_namearray<string>

Fifth tax name

tax5_amountarray<integer (int64)>

Fifth tax amount

tax6_namearray<string>

Sixth tax name

tax6_amountarray<integer (int64)>

Sixth tax amount

tax7_namearray<string>

Seventh tax name

tax7_amountarray<integer (int64)>

Seventh tax amount

tax8_namearray<string>

Eighth tax name

tax8_amountarray<integer (int64)>

Eighth tax amount

tax9_namearray<string>

Ninth tax name

tax9_amountarray<integer (int64)>

Ninth tax amount

tax10_namearray<string>

Tenth tax name

tax10_amountarray<integer (int64)>

Tenth tax amount

proration_modearray<string>
created_atarray<integer (unix-time)>
payment_reference_numbersobject

Parameters for payment_reference_numbers

idarray<string>

<p class="mb-2">If <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">id</code> is not provided then our system will automatically generate a unique id.</p>

typearray<string>required
numberarray<string>required

<p class="mb-2">If you have already generated a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_reference_number</code> in another system, you can provide it in this field. This number will then be made available to you both in PDF format and via the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">/api/v2/invoices/payment_reference_numbers</code> API.</p>

line_item_tiersobject

Parameters for line_item_tiers

line_item_idarray<string>required

Uniquely identifies a line_item

starting_unitarray<integer (int32)>

The lower limit of a range of units for the tier

ending_unitarray<integer (int32)>

The upper limit of a range of units for the tier

quantity_usedarray<integer (int32)>

The number of units purchased in a range.

unit_amountarray<integer (int64)>

<p class="mb-2">The price of the tier if the charge model is a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairtstep</code> pricing , or the price of each unit in the tier if the charge model is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> /<code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code> pricing.</p>

starting_unit_in_decimalarray<string>

<p class="mb-2">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 <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">ending_unit_in_decimal</code> of the next lower tier. Returned only when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items.pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> , <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairstep</code> and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

ending_unit_in_decimalarray<string>

<p class="mb-2">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 <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">starting_unit_in_decimal</code> of the next higher tier. Returned only when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items.pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> , <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code> or stairstep and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

quantity_used_in_decimalarray<string>

<p class="mb-2">The decimal representation of the quantity purchased from this tier. Returned when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code> is quantity-based and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

unit_amount_in_decimalarray<string>

<p class="mb-2">The decimal representation of the per-unit price for the tier when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">tiered</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">volume</code>. When the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pricing_model</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">stairstep</code> , it is the decimal representation of the total price for <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code>. The value is in major units of the currency. Returned when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_item</code> is quantity-based and <a href="/docs/api/currencies" target="_blank">multi-decimal pricing</a> is enabled.</p>

discountsobject

Parameters for discounts

line_item_idarray<string>

The unique id of the line item that this deduction is for.

entity_typearray<string>required
entity_idarray<string>

<p class="mb-2">When the deduction is due to a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">coupon</code> , then this is the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">id</code> of the coupon.</p>

descriptionarray<string>

Description for this deduction.

amountarray<integer (int64)>required

The amount deducted.

taxesobject

Parameters for taxes

namearray<string>required

The name of the tax applied.

ratearray<number (double)>required

The rate of tax used to calculate tax amount. **Impacts** * None. Although required, this parameter is not used by Chargebee.

amountarray<integer (int64)>

Total tax amount charged for this invoice

descriptionarray<string>

Description of tax

juris_typearray<string>
juris_namearray<string>

The name of the tax jurisdiction

juris_codearray<string>

The tax jurisdiction code

paymentsobject

Parameters for payments

idarray<string>
amountarray<integer (int64)>required

Payment made for this invoice.

payment_methodarray<string>required
datearray<integer (unix-time)>

Payment date

reference_numberarray<string>

Reference number for this payment

notesobject

Parameters for notes

entity_typearray<string>
entity_idarray<string>

Id of the mentioned entity type.

notearray<string>

Actual note.

line_item_addressesobject

The list of addresses used for tax calculation on line items.

line_item_idarray<string>

Line item reference

first_namearray<string>

First name of the customer

last_namearray<string>

Last name of the customer

emailarray<string (email)>

Email address of the customer

companyarray<string>

Name of the company

phonearray<string>

Phone number of the customer

line1array<string>

Address line 1

line2array<string>

Address line 2

line3array<string>

Address line 3

cityarray<string>

Name of the city

state_codearray<string>

<p class="mb-2">The <a href="https://www.iso.org/obp/ui/#search" target="_blank">ISO 3166-2 state/province code</a> without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">state_code</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">AZ</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">US-AZ</code> ). For Tamil Nadu (India), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">TN</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">IN-TN</code> ). For British Columbia (Canada), set as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">BC</code> (not <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">CA-BC</code> ).</p>

statearray<string>

State or Province

ziparray<string>

Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address) .

countryarray<string>

The billing address of the customer, specified as an [ISO 3166 alpha-2 code](https://www.iso.org/iso-3166-country-codes.html). Entering an invalid code will return an error. If [EU VAT](https://www.chargebee.com/docs/eu-vat.html) (2021 or later) or [Brexit configuration](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) is enabled, 'United Kingdom-Northern Ireland' is a valid option.

validation_statusarray<string>
json
{
  "id": null,
  "date": null,
  "total": null,
  "currency_code": null,
  "customer_id": null,
  "subscription_id": null,
  "po_number": null,
  "price_type": null,
  "tax_override_reason": null,
  "vat_number": null,
  "vat_number_prefix": null,
  "round_off": null
}

Response

Returns 200 with an object. Read it in later steps with {{importInvoice.response.data.<field>}}.

invoiceobject

<div class="api-description"><p class="mb-2">An invoice is a commercial document representing a sale of products/services offered by you to a customer. It enumerates all the charges, adjustments, payments, discounts and taxes associated with the sale.</p><p class="mb-2">An invoice is said to be a recurring one when it is has at least one charge for <a href="/docs/api/items">a plan or an addon item price</a>. It is a non-recurring one when it has charges for only charge-item prices or <a href="https://www.chargebee.com/docs/2.0/charges.html" target="_blank">one-time charges</a>.</p><p class="mb-2">The item prices for any given billing term of a subscription are billed via an invoice at the beginning of the term (unless the charges are left unbilled). However, item prices that belong to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">metered</code> items are billed at the end of the term via a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pending</code> invoice that can <a href="https://www.chargebee.com/docs/billing/2.0/usage-based-billing/metered_billing#configuring-metered-billing" target="_blank">close automatically</a> or via <a href="/docs/api/invoices/close-a-pending-invoice">an API call</a>. Moreover, when there are no <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">metered</code> items in the subscription, the invoices can still be generated as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pending</code> while <a href="/docs/api/subscriptions/create-subscription-for-items">creating</a> or <a href="/docs/api/subscriptions/update-subscription-for-items">updating</a> a subscription.</p><h4>Auto-collection</h4><p class="mb-2">If <a href="https://www.chargebee.com/docs/2.0/customers.html#auto-collection-status" target="_blank">auto-collection</a> is enabled, then immediately on invoice generation (or, in case of subscriptions that have <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">create_pending_invoices</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code>, on <a href="/docs/api/invoices/close-a-pending-invoice">invoice closure</a>), the <a href="/docs/api/customers/customer-object#payment_method">payment method</a> on file is charged:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If the payment succeeds, the invoice is marked as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code>.</li> <li class="text-base leading-relaxed">On payment failure, the invoice is marked as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> and <a href="https://www.chargebee.com/docs/2.0/dunning-v2.html" target="_blank">dunning settings</a> are taken into account for payment retries.</li> <li class="text-base leading-relaxed">If no retry attempts are configured, or when retries are exhausted, the invoice is marked as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">not_paid</code>.</li> <li class="text-base leading-relaxed">the amount due is zero or negative, the invoice is immediately marked as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code> and the balance, if any, is added to <a href="https://www.chargebee.com/docs/2.0/customers.html#excess-payments" target="_blank">excess payments</a> for the customer.</li> </ul><div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong> If <a href="https://www.chargebee.com/docs/2.0/consolidated-invoicing.html" target="_blank">consolidated invoicing</a> is enabled, the attribute <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">subscription_id</code> is unavailable when the invoice has line items from multiple subscriptions. The individual subscription ids are seen under <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items.subscription_id</code>.</p></div><div id="recurring-invoice" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#recurring-invoice-content" aria-expanded="false" aria-controls="recurring-invoice-content"><h4>Recurring and non-recurring invoices</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="recurring-invoice-content"><p class="mb-2">A recurring invoice contains at least one line item that is billed on a recurring basis. Specifically, it has at least one <a href="/docs/api/invoices/invoice-object#line_items" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items[]</code></a> with <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">entity_type</code> set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">plan_item_price</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">addon_item_price</code>. A non-recurring invoice contains no recurring line items.</p></div></div><div id="refundable-amount" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#refundable-amount-content" aria-expanded="false" aria-controls="refundable-amount-content"><h4>Refundable amount for an invoice</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="refundable-amount-content"><p class="mb-2">The refundable amount for an invoice is the (amount paid on the invoice + refundable credit applied on the invoice + taxes withheld on the invoice) minus (amount issued as refundable credit notes from the invoice). Each of these amounts is obtained from the invoice resource as follows:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Amount paid on the invoice: <a href="/docs/api/invoices/invoice-object#invoice_amount_paid" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">amount_paid</code></a></li> <li class="text-base leading-relaxed">Refundable credit applied on the invoice: <a href="/docs/api/invoices/invoice-object#invoice_credits_applied" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">credits_applied</code></a></li> <li class="text-base leading-relaxed">Taxes withheld on the invoice: Sum of <a href="/docs/api/invoices/invoice-object#invoice_linked_taxes_withheld" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">linked_taxes_withheld[].amount</code></a></li> <li class="text-base leading-relaxed">Amount issued as refundable credit notes from the invoice: Sum of <a href="/docs/api/invoices/invoice-object#invoice_issued_credit_notes" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">issued_credit_notes[i].cn_total</code></a> where <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">issued_credit_notes[i].cn_status</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">refunded</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">refund_due</code>.</li> </ul></div></div></div>

idstringrequired

The invoice number. Acts as a identifier for invoice and typically generated sequentially.

customer_idstringrequired

The identifier of the customer this invoice belongs to.

payment_ownerstring

Payment owner of an invoice

subscription_idstring

<p class="mb-2">The identifier of the subscription this invoice belongs to. <strong class="font-semibold">Note</strong>: When consolidated invoicing is enabled, you have to refer to <a href="/docs/api/invoices/invoice-object#line_items">line_item`s</a> <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">subscription_id</code> to identify the subscriptions associated with this invoice. However, it is important to avoid using this attribute if the invoice includes charges from multiple subscriptions, as it will be null in such cases.</p>

recurringbooleanrequired

Boolean indicating whether this invoice belongs to a subscription

Default true

statusstringrequired

<p class="mb-2">Current status of this invoice.</p> * paid - <p class="mb-2">Indicates a paid invoice.</p> * posted - <p class="mb-2">Indicates the payment is not yet collected and will be in this state till the due date to indicate the due period</p> * pending - <p class="mb-2">The <a href="/docs/api/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). An invoice is generated with this <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> when it has line items that belong to items that are <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">metered</code> or when the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">subscription.create_pending_invoices</code>attribute is set to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code>. The <a href="/docs/api/v2/pcv-1/invoices/invoice-object#status">invoice</a> is yet to be closed (sent for payment collection). All invoices are generated with this <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> when <a href="https://www.chargebee.com/docs/1.0/metered_billing.html" target="_blank">Metered Billing</a> is enabled for the site.</p> * payment_due - <p class="mb-2">Indicates the payment is not yet collected and is being retried as per retry settings.</p> * not_paid - <p class="mb-2">Indicates the payment is not made and all attempts to collect is failed.</p> * voided - <p class="mb-2">Indicates a voided invoice.</p>

One ofpaidpostedpayment_duenot_paidvoidedpending

dateinteger (unix-time)

<p class="mb-2">The document date displayed on the invoice PDF. By default, it has the same value as the effective date of the action that created the invoice (subscription creation, update, or invoice creation). This date can be backdated (set to a value in the past) while performing the actions. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription or non-recurring charge is effective as of a past date. However, if the invoice is created as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pending</code> , and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date.</p>

due_dateinteger (unix-time)

Due date of the invoice

net_term_daysinteger (int32)

<p class="mb-2">The number of days from <a href="/docs/api/invoices/invoice-object#date" class="text-blue-600 hover:text-blue-800 underline"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">invoice.date</code></a> until payment for the invoice is due.</p>

Default 0

po_numberstring

Purchase Order Number for this invoice

vat_numberstring

VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number)

price_typestringrequired

The price type of the invoice. \* tax_exclusive - All amounts in the document are exclusive of tax. \* tax_inclusive - All amounts in the document are inclusive of tax.

One oftax_exclusivetax_inclusiveDefault "tax_exclusive"

exchange_ratenumber (decimal)

Exchange rate used for base currency conversion.Note that when converting foreign currency invoices to local currency for VAT purposes, the exchange rates used differ from the base currency exchange rate provided in this field. This is due to regulations set by tax authorities, which require the use of official sources such as European Central Bank rates for local currency conversion.

local_currency_exchange_ratenumber (decimal)

This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency. For example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.

currency_codestringrequired

The currency code (ISO 4217 format) for the invoice

local_currency_codestring

The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.

taxinteger (int64)required

Total tax amount for this invoice

sub_totalinteger (int64)required

<p class="mb-2">The sum of all the line item amounts minus the sum of all line item discounts. In other words, this is the sum of all <code><a href="/docs/api/invoices/invoice-object#line_items">line_items[]</a>.amount</code></p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">the sum of all <code><a href="/docs/api/invoices/invoice-object#line_item_discounts">line_item_discounts[]</a>.discount_amount</code>.</li> </ul>

sub_total_in_local_currencyinteger (int64)

Invoice subtotal in the currency of the place of supply.

totalinteger (int64)

Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.

total_in_local_currencyinteger (int64)

Total invoice amount in the currency of the place of supply.

amount_dueinteger (int64)

<p class="mb-2">The unpaid amount that is due on the invoice. This is calculated as: <code><a href="/docs/api/invoices/invoice-object#total">total</a></code></p> <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"> <code><a href="/docs/api/invoices/invoice-object#amount_paid">amount_paid</a></code> </li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#applied_credits">applied_credits</a>.applied_amount</code></li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#adjustment_credit_notes">adjustment_credit_notes</a>.cn_total</code></li> <li class="text-base leading-relaxed">sum of <code><a href="/docs/api/invoices/invoice-object#linked_taxes_withheld">linked_taxes_withheld</a>.amount</code>.</li> </ul>

amount_adjustedinteger (int64)

Total adjustments made against this invoice.

Default 0

amount_paidinteger (int64)

<p class="mb-2">Payments collected successfully for the invoice. This is the sum of <code><a href="/docs/api/invoices/invoice-object#linked_payments">linked_payments[]</a>.txn_amount</code> for all <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">linked_payments[]</code> that have <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">txn_status</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">success</code>.</p>

paid_atinteger (unix-time)

Timestamp indicating the date \& time this invoice got paid.

write_off_amountinteger (int64)

Amount written off against this invoice.

Default 0

credits_appliedinteger (int64)

Total credits applied against this invoice.

Default 0

dunning_statusstring

Current dunning status of the invoice. \* exhausted - Maximum number of attempts have been made. \* stopped - Dunning has stopped for this invoice. \* success - Payment successfully collected during dunning process. \* in_progress - Dunning is still in progress.

One ofin_progressexhaustedstoppedsuccess

next_retry_atinteger (unix-time)

Timestamp indicating when will the next attempt to collect payment for this invoice occur.

voided_atinteger (unix-time)

Timestamp indicating the date \& time this invoice got voided.

resource_versioninteger (int64)

<p class="mb-2">The version number of this resource. For every change made to the resource, <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">resource_version</code> is updated with a new timestamp in milliseconds.</p>

updated_atinteger (unix-time)

Timestamp indicating when this invoice was last updated. This attribute will be present only if the resource has been updated after 2016-09-28. **Note** : This value does not change when the following attributes are changed: *next_retry_at, dunning_status, has_advance_charges*

line_items_next_offsetstring

<p class="mb-2">This attribute is returned only if additional resources are available. Use this value as the input parameter for <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items_offset</code> to retrieve the next set of resources.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Applicable only when Enterprise-scale Invoicing is enabled.</li> <li class="text-base leading-relaxed">Enterprise-scale Invoicing is currently in <strong class="font-semibold">Private Beta</strong>. Please reach out to <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&amp;utm_medium=content&amp;utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Chargebee Support</a> to enable this feature.</li> </ul></div>

first_invoiceboolean

Boolean indicating the first invoice raised for the subscription. In the case of a non-recurring invoice, it indicates the first invoice raised for the customer.

new_sales_amountinteger (int64)

<p class="mb-2">The share of the invoice total due to new sales. When <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">first_invoice</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">true</code> , this attribute is the same as total. However, when the invoice is a <a href="https://www.chargebee.com/docs/2.0/consolidated-invoicing.html " target="_blank">consolidated</a> one, then it is the sum of all <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items.amount</code> belonging to a new.</p>

has_advance_chargesboolean

Indicates whether an [advance charge](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/advance-invoices) is present in this invoice.

term_finalizedbooleanrequired

Boolean indicating this invoice line_items terms are finalized or not.

Default true

is_giftedbooleanrequired

Boolean indicating this invoice is gifted or not.

Default false

generated_atinteger (unix-time)

<p class="mb-2">The date when the invoice is finalized. This is the date in the invoice lifecycle when its <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> becomes any one of the following for the first time: <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> , <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">posted</code> , or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code>. For an invoice with <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">pending</code> , this happens when it gets closed.</p>

expected_payment_dateinteger (unix-time)

The date and time at which [dunning](https://www.chargebee.com/docs/payments/2.0/dunning-v2.html) should resume automatically for the invoice. This attribute is present only if dunning is currently [paused](/docs/api/invoices/pause-dunning-for-invoice) for the invoice. **See also** : [Dunning resumption process](/docs/api/invoices/resume-dunning-for-invoice).

credit_noteobject

<div class="api-description"><p class="mb-2">A <a href="https://www.chargebee.com/docs/credit-notes.html" target="_blank">Credit Note</a> is a document that specifies the money owed by a business to its customer. The seller usually issues a Credit Note for the same or lower amount than the invoice, and then repays the money to the customer or set it off against other &#x27;due&#x27; invoices.</p><h3>Credit Note Types</h3><p class="mb-2">Credit notes in Chargebee are categorized into three types: 1. <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">adjustment</code>: Adjustment credit notes are used to adjust the amount of an existing invoice in the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">not_paid</code> <a href="/docs/api/invoices/invoice-object#status">status</a>. Use this type of credit note to reduce the invoice amount, typically as a discount to the customer. Adjustment credit notes are automatically created in the following cases:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">When an invoice is written off.</li> <li class="text-base leading-relaxed">When a subscription is modified with proration enabled, and the invoice for the current term is in the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">payment_due</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">not_paid</code> <a href="/docs/api/invoices/invoice-object#status">status</a>. 2. <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">refundable</code>: Refundable credit notes allow you to return a certain amount to the customer. These credits can be:</li> <li class="text-base leading-relaxed">Retained for automatic application on future invoices.</li> <li class="text-base leading-relaxed">Applied to existing unpaid invoices.</li> <li class="text-base leading-relaxed">Refunded to the customer. Refundable credit notes are automatically created in the following cases:</li> <li class="text-base leading-relaxed">When an invoice is refunded.</li> <li class="text-base leading-relaxed">When a subscription is changed or canceled with proration enabled, the invoice for the current term is in the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code> <a href="/docs/api/invoices/invoice-object#status">status</a>. Refundable credits are applied to future invoices or can be refunded to the original payment method. 3. <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">store</code>: Store credit notes are created for <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code> or <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">partially_paid</code> invoice <a href="/docs/api/invoices/invoice-object#status">status</a> during subscription changes, such as upgrades, downgrades, or cancellations. Key characteristics of store credits:</li> <li class="text-base leading-relaxed">No tax component is included at the time of creation.</li> <li class="text-base leading-relaxed">A credit note document is generated, similar to refundable credits.</li> <li class="text-base leading-relaxed">Store credits are applied before tax calculations on future invoices.</li> </ul><div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong> If you have enabled <em class="italic">consolidated invoicing</em> , to know the subscriptions attached with a credit note you have to refer <a href="/docs/api/credit_notes/credit_note-object#line_items">line_item&#x27;s</a> <em class="italic">subscription_id</em> . The credit note&#x27;s <em class="italic">subscription_id</em> should <strong class="font-semibold">not</strong> be used (which will be <em class="italic">null</em> if the credit note has lines from multiple subscriptions).</p></div><div id="ref-invoice-impact" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#ref-invoice-impact-content" aria-expanded="false" aria-controls="ref-invoice-impact-content"><p class="mb-2">Impact on reference invoice</p><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="ref-invoice-impact-content"><p class="mb-2">The following updates are made to the reference invoice when a credit note is created/imported:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If the credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">adjustment</code>: <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The adjustment credit note details are added to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">adjustment_credit_notes[]</code> attribute of the invoice.</li> <li class="text-base leading-relaxed">The invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">amount_due</code> is reduced by the credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">total</code>.</li> <li class="text-base leading-relaxed">The invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> is updated to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">paid</code> if the invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">amount_due</code> equals the credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">total</code>.</li> <li class="text-base leading-relaxed">The invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> does not change if the invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">amount_due</code> is greater than credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">total</code>.</li> </ul> </li> <li class="text-base leading-relaxed">If the credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">refundable</code>: <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The refundable credit note details are added to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">issued_credit_notes[]</code> attribute of the invoice.</li> <li class="text-base leading-relaxed">The invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> does not change.</li> </ul> </li> <li class="text-base leading-relaxed">If the credit note <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">store</code>: <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The store credit note details are added to the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">issued_credit_notes[]</code> attribute of the invoice.</li> <li class="text-base leading-relaxed">The invoice <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">status</code> does not change.</li> </ul> </li> </ul></div></div></div>

idstringrequired

Credit-note id.

customer_idstringrequired

The identifier of the customer this credit note belongs to.

subscription_idstring

The identifier of the subscription this Credit Note belongs to. **Note:** If *consolidated invoicing* is enabled, to know the subscriptions attached with this Credit Note you have to refer [line_item's](/docs/api/credit_notes/credit_note-object#line_items) *subscription_id* . This attribute should **not** be used (which will be *null* if this credit note has lines from multiple subscriptions).

reference_invoice_idstring

The identifier of the invoice against which this Credit Note is issued

typestringrequired

The credit note type. [Learn more](/docs/api/credit_notes/credit-note-object) about credit note types. \* store - Store Credit Note \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note

One ofadjustmentrefundablestore

reason_codestring

The reason for issuing this credit note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes/credit_note-object#create_reason_code) parameter instead\] \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* order_change - Order Change \* other - Can be set when none of the above reason codes are applicable \* fraudulent - FRAUDULENT \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* waiver - Waiver \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* product_unsatisfactory - Product Unsatisfactory \* order_cancellation - Order Cancellation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* service_unsatisfactory - Service Unsatisfactory

One ofwrite_offsubscription_changesubscription_cancellationsubscription_pausechargebackproduct_unsatisfactoryservice_unsatisfactoryorder_changeorder_cancellationwaiverotherfraudulent

statusstringrequired

The credit note status. \* voided - When the Credit Note has been cancelled. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* adjusted - When the Credit Note has been adjusted against an invoice.

One ofadjustedrefundedrefund_duevoided

vat_numberstring

VAT number of the customer for whom this credit note is raised.

dateinteger (unix-time)

The date the credit note is issued.

price_typestringrequired

The price type of the credit note. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax.

One oftax_exclusivetax_inclusiveDefault "tax_exclusive"

currency_codestringrequired

The currency code (ISO 4217 format) for the credit note

totalinteger (int64)

Credit Note amount in cents.

Default 0

amount_allocatedinteger (int64)

The amount allocated to invoices from the credit note.

Default 0

amount_refundedinteger (int64)

The refunds issued from this credit note.

Default 0

amount_availableinteger (int64)

The yet to be used credits of this credit note.

Default 0

refunded_atinteger (unix-time)

The time this credit note gets fully used. Please note that this field is not present when partial refunds are issued.

voided_atinteger (unix-time)

Timestamp indicating the date and time this credit note gets voided.

generated_atinteger (unix-time)

The date/time when the credit note was raised. This date/time can be backdated, which means that the date/time can be earlier than the date/time the credit note was created.

resource_versioninteger (int64)

<p class="mb-2">Version number of this resource. The <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">resource_version</code> is updated with a new timestamp in milliseconds for every change made to the resource. This attribute will be present only if the resource has been updated after 2016-09-28.</p>

updated_atinteger (unix-time)

Timestamp indicating when this credit note was last updated. This attribute will be present only if the resource has been updated after 2016-09-28.

channelstring

The subscription channel this object originated from and is maintained in. \* play_store - The object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions) created in Google Play Store. Direct manipulation of this object via UI or API is disallowed. In-App Subscriptions is currently in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com) for more information. \* web - The object was created (and is maintained) for the web channel directly in Chargebee via API or UI. \* app_store - The object data is synchronized with data from [in-app subscription(s)](/docs/api/in_app_subscriptions) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.

One ofwebapp_storeplay_store

line_items_next_offsetstring

<p class="mb-2">This attribute is returned only if additional resources are available. Use this value as the input parameter for <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">line_items_offset</code> to retrieve the next set of resources.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Note:</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Applicable only when Enterprise-scale Invoicing is enabled.</li> <li class="text-base leading-relaxed">Enterprise-scale Invoicing is currently in <strong class="font-semibold">Private Beta</strong>. Please reach out to <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&amp;utm_medium=content&amp;utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Chargebee Support</a> to enable this feature.</li> </ul></div>

sub_totalinteger (int64)required

The Credit Note sub-total

sub_total_in_local_currencyinteger (int64)

Invoice subtotal in the currency of the place of supply.

total_in_local_currencyinteger (int64)

Total invoice amount in the currency of the place of supply.

local_currency_codestring

The currency code (ISO 4217 format) of the place of supply in which VAT needs to be converted and displayed.

round_off_amountinteger (int64)

<p class="mb-2">Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">round_off_amount</code>. If there is no <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">round-off amount</code> , it will display <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">0</code> .</p>

fractional_correctioninteger (int64)

Indicates the fractional correction amount.

notesarray<string>

The list of notes attached to this credit note. Each note is displayed on customer-facing documents such as the [Credit Note PDF](/docs/api/credit_notes#retrieve_credit_note_as_pdf). Currently this list contains the note configured for the customer; additional note types may be added in future.

deletedbooleanrequired

Indicates that this resource has been deleted.

tax_categorystring

Specifies the customer's category for the Goods and Services Tax (GST). This field is returned only if you've configured GST for the India region.

local_currency_exchange_ratenumber (decimal)

This parameter represents the exchange rate as a relative price of the base currency that appears as local currency in invoices and credit notes. The local currency exchange rate specifically refers to the exchange rate of a country's currency when converting it to another currency. For example, if you want to convert US dollars to euros, the local currency exchange rate would be the rate at which you can convert US dollars to euros.

create_reason_codestring

Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive

vat_number_prefixstring

<p class="mb-2">An overridden value for the first two characters of the <a href="https://en.wikipedia.org/wiki/VAT_identification_number" target="_blank">full VAT number</a>. Only applicable specifically for customers with <code><a href="/docs/api/customers/customer-object#billing_address">billing_address</a></code></p> <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">country</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> (which is <strong class="font-semibold">United Kingdom - Northern Ireland</strong> ).</p> <p class="mb-2">When you have enabled <a href="https://www.chargebee.com/docs/eu-vat.html" target="_blank">EU VAT</a> in 2021 or have <a href="https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee" target="_blank">manually enabled</a> the Brexit configuration, you have the option of setting <code><a href="/docs/api/customers/customer-object#billing_address">billing_address</a></code></p> <p class="mb-2"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">country</code> as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code>. That&#x27;s the code for <strong class="font-semibold">United Kingdom - Northern Ireland</strong>. The first two characters of the VAT number in such a case is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">XI</code> by default. However, if the VAT number was registered in UK, the value should be <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">GB</code>. Set <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">vat_number_prefix</code> to <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">GB</code> for such cases.</p>

business_entity_idstring

<p class="mb-2">The unique ID of the <a href="/docs/api/advanced-features">business entity</a> of this credit_note. This is always the same as the business entity of the invoice referred to by <code><a href="/docs/api/credit_notes/credit_note-object#reference_invoice_id">reference_invoice_id</a></code>.</p> <span featureId="cb-mbe" isMicro="true"></span>

line_itemsarray<object>26 fields

The line items of this credit note

line_item_tiersarray<object>11 fields

The list of tiers applicable for this line item

line_item_discountsarray<object>5 fields

The list of discount(s) applied for each line item of this credit note.

line_item_taxesarray<object>15 fields

The list of taxes applied on line items

line_item_addressesarray<object>15 fields

The list of addresses used for tax calculation on line items.

json
{
  "invoice": null,
  "credit_note": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.