Menu
Import Credit Note
Import credit note
/credit_notes/import_credit_noteUse it in a workflow
- Add a step and choose the Chargebee connector.
- Pick the Import Credit Note action (under Chargebee API).
- Fill in the fields below, then reference the result from later steps as
{{importCreditNote.response.data}}.
Request
Headers
chargebee-request-origin-devicestringThe 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-ipstringThe IP address of the customer where the request originated
chargebee-event-actionsstringskip all actions to be done on the events
One ofall-disabled
chargebee-event-emailstringskip only emails
One ofall-disabled
chargebee-event-webhookstringskip only webhooks
One ofall-disabled
chargebee-business-entity-idstringIf 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.
idstringrequiredThe unique identifier for the credit note (credit note number). **Constraints** * Must not conflict with existing credit note numbers in your Chargebee Billing site. * Must not conflict with future credit note numbers that your Chargebee Billing site may [generate](https://www.chargebee.com/docs/billing/2.0/invoices-credit-notes-and-quotes/invoice-numbering).
customer_idstring<p class="mb-2">The unique identifier of the customer for whom the credit note is created.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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 not provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match the <a href="/docs/api/invoices/invoice-object#invoice_customer_id" class="text-blue-600 hover:text-blue-800 underline">customer</a> 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">reference_invoice_id</code>.</li> </ul></div>
subscription_idstring<p class="mb-2">The unique identifier of the subscription for which this credit note is created.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">customer_id</code> is not provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match the <a href="/docs/api/invoices/invoice-object#invoice_subscription_id" class="text-blue-600 hover:text-blue-800 underline">subscription</a> 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">reference_invoice_id</code>.</li> <li class="text-base leading-relaxed">Must not be provided 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">line_items[subscription_id][]</code> is provided.</li> </ul></div>
reference_invoice_idstringrequiredThe unique identifier of the invoice against which this credit note is issued. The invoice must already exist in your Chargebee Billing site.
typestringrequired<p class="mb-2">The credit note type. Determines how the credit note can be used. <a href="/docs/api/credit_notes/credit-note-object#credit_note_types">Learn more</a> about credit note types.</p> * refundable - <p class="mb-2">Refundable credit note.</p> * store - <p class="mb-2">Store credit note.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">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">type</code> value <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> is not supported for this API operation.</li> </ul></div> * adjustment - <p class="mb-2">Adjustment credit note.</p>
One ofadjustmentrefundablestore
currency_codestring<p class="mb-2">The currency code (<a href="https://www.iso.org/iso-4217-currency-codes.html" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">ISO 4217</a> format) for the credit note.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><a href="https://www.chargebee.com/docs/billing/2.0/site-configuration/multi-currency-pricing" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Multi-currency pricing</a> is enabled for the site and <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">customer_id</code> is provided.</li> </ul></div>
create_reason_codestringrequiredThe [reason code](https://www.chargebee.com/docs/billing/2.0/site-configuration/reason-codes#managing-reason-codes-for-credit-notes) for creating the credit note. **Required if** * Reason codes are mandatory in Chargebee Billing. **Constraints** * Must be a valid and enabled reason code from the list configured in Chargebee Billing. * The reason code can also be from **Refund Credit Note** reason codes. * The codes are case-sensitive.
dateinteger (unix-time)required<p class="mb-2">The date when the credit note was issued.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must be a date in the past.</li> <li class="text-base leading-relaxed">Must be after the <a href="/docs/api/invoices/invoice-object#invoice_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">date</code></a> of the reference invoice.</li> </ul></div>
statusstring<p class="mb-2">The status of the credit note. Determines the current state of the credit note and how it can be used.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Default value</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">adjusted</code> 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">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>.</li> <li class="text-base leading-relaxed">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">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"><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> 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">total</code> is equal to the sum of <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_refunds[amount][]</code> plus the sum of <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">allocations[allocated_amount][]</code>.</li> <li class="text-base leading-relaxed"><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> otherwise.</li> </ul> </li> </ul></div> * refund_due - <p class="mb-2">The credits are yet to be used or have been partially used.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must only be set 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">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>.</li> <li class="text-base leading-relaxed">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> must be greater than the sum of <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_refunds[amount][]</code> plus the sum of <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">allocations[allocated_amount][]</code>.</li> </ul></div> * refunded - <p class="mb-2">The entire credit note amount has been used (either allocated to invoices or refunded).</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must only be set 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">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>.</li> <li class="text-base leading-relaxed">Requires <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_refunds[]</code> and/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">allocations[]</code> to be provided.</li> <li class="text-base leading-relaxed">The sum of <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_refunds[amount][]</code> plus the sum of <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">allocations[allocated_amount][]</code> must equal 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> </ul></div> * voided - <p class="mb-2">The credit note has been cancelled.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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_refunds[]</code> and <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">allocations[]</code> must not be provided 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">voided</code>.</li> </ul></div> * adjusted - <p class="mb-2">The credit note has been adjusted against an invoice.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must only be set 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">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>.</li> <li class="text-base leading-relaxed">Requires <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">allocations[]</code> to be provided and <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_refunds[]</code> must not be provided.</li> </ul></div>
One ofadjustedrefundedrefund_duevoided
totalinteger (int64)<p class="mb-2">The total amount of the credit note.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">For refundable credit notes (<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> = <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>), this must be less than or equal to the reference invoice's <a href="/docs/api/invoices/invoice-object#refundable-amount" class="text-blue-600 hover:text-blue-800 underline">refundable amount</a>.</li> <li class="text-base leading-relaxed">For adjustment credit notes (<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> = <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>), this must be less than or equal to the reference invoice's <a href="/docs/api/invoices/invoice-object#invoice_amount_to_collect" 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_to_collect</code></a>.</li> </ul></div>
Default 0
refunded_atinteger (unix-time)<p class="mb-2">The timestamp when this credit note was fully used (refunded or allocated). This field is automatically set when 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">status</code> becomes <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">adjusted</code>.</p>
voided_atinteger (unix-time)<p class="mb-2">The timestamp indicating when this credit note was voided.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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> must 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">voided</code>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Default value</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">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">date</code>.</li> </ul></div>
sub_totalinteger (int64)The credit note sub-total (total before round-off, fractional correction, and taxes).
round_off_amountinteger (int64)<p class="mb-2">The rounded-off amount for the credit note. For example, if the credit note amount is $99.99 and it is rounded off to $100.00, then $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>.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Not supported for zero-decimal <a href="/docs/api/currencies" class="text-blue-600 hover:text-blue-800 underline">currencies</a>.</li> </ul></div>
fractional_correctioninteger (int64)Indicates the fractional correction amount.
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'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>
line_itemsobjectParameters for line items. At least one line item is required.
reference_line_item_idarray<string><p class="mb-2">The unique identifier of the <a href="/docs/api/invoices/invoice-object#invoice_line_items" class="text-blue-600 hover:text-blue-800 underline">line item</a> from the reference invoice that this credit note line item reverses.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If <strong class="font-semibold">Validate credit note lines against invoice</strong> is enabled, the <a href="/docs/api/invoices/invoice-object#invoice_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_item.id</code></a> must exist in the reference invoice. <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Contact Support</a> to enable this feature.</li> </ul></div>
idarray<string>The unique identifier for this 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">The unique identifier of the subscription this line item belongs to.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must not be provided 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">subscription_id</code> is provided.</li> <li class="text-base leading-relaxed">The subscription's <a href="/docs/api/subscriptions/subscription-object#subscription_customer_id" class="text-blue-600 hover:text-blue-800 underline">customer</a> must match the <a href="/docs/api/invoices/invoice-object#invoice_customer_id" class="text-blue-600 hover:text-blue-800 underline">customer</a> of the reference invoice.</li> </ul></div>
descriptionarray<string>requiredDescription for this line item
unit_amountarray<integer (int64)><p class="mb-2">The unit amount of the line item.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Pricing model for the line item 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">flat_fee</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">per_unit</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>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If <strong class="font-semibold">Validate credit note lines against invoice</strong> is enabled, the amount must not exceed 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">unit_amount</code> of the <a href="/docs/api/invoices/invoice-object#invoice_line_items" class="text-blue-600 hover:text-blue-800 underline">line item</a> in the reference invoice. <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Contact Support</a> to enable this feature.</li> </ul></div>
quantityarray<integer (int32)><p class="mb-2">The quantity of the line item.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Pricing model for the line item 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">per_unit</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>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">If <strong class="font-semibold">Validate credit note lines against invoice</strong> is enabled, the quantity must not exceed the quantity of the <a href="/docs/api/invoices/invoice-object#invoice_line_items" class="text-blue-600 hover:text-blue-800 underline">line item</a> in the reference invoice. <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Contact Support</a> to enable this feature.</li> </ul></div>
amountarray<integer (int64)><p class="mb-2">The total amount of this line item.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Pricing model for the line item 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> 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">tiered</code>.</li> <li class="text-base leading-relaxed"><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[unit_amount]</code> is not provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must be consistent 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">line_items[unit_amount]</code> and <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[quantity]</code>, when both are provided.</li> <li class="text-base leading-relaxed">If <strong class="font-semibold">Validate credit note lines against invoice</strong> is enabled, the amount must not exceed 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">amount</code> of the <a href="/docs/api/invoices/invoice-object#invoice_line_items" class="text-blue-600 hover:text-blue-800 underline">line item</a> in the reference invoice. <a href="https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-800 underline">Contact Support</a> to enable this feature.</li> </ul></div>
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 identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type
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><p class="mb-2">First tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax1_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax1_amountarray<integer (int64)><p class="mb-2">First tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax1_name]</code> is provided.</li> </ul></div>
tax2_namearray<string><p class="mb-2">Second tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax2_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax2_amountarray<integer (int64)><p class="mb-2">Second tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax2_name]</code> is provided.</li> </ul></div>
tax3_namearray<string><p class="mb-2">Third tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax3_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax3_amountarray<integer (int64)><p class="mb-2">Third tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax3_name]</code> is provided.</li> </ul></div>
tax4_namearray<string><p class="mb-2">Fourth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax4_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax4_amountarray<integer (int64)><p class="mb-2">Fourth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax4_name]</code> is provided.</li> </ul></div>
tax5_namearray<string><p class="mb-2">Fifth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax5_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax5_amountarray<integer (int64)><p class="mb-2">Fifth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax5_name]</code> is provided.</li> </ul></div>
tax6_namearray<string><p class="mb-2">Sixth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax6_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax6_amountarray<integer (int64)><p class="mb-2">Sixth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax6_name]</code> is provided.</li> </ul></div>
tax7_namearray<string><p class="mb-2">Seventh tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax7_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax7_amountarray<integer (int64)><p class="mb-2">Seventh tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax7_name]</code> is provided.</li> </ul></div>
tax8_namearray<string><p class="mb-2">Eighth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax8_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax8_amountarray<integer (int64)><p class="mb-2">Eighth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax8_name]</code> is provided.</li> </ul></div>
tax9_namearray<string><p class="mb-2">Ninth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax9_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax9_amountarray<integer (int64)><p class="mb-2">Ninth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax9_name]</code> is provided.</li> </ul></div>
tax10_namearray<string><p class="mb-2">Tenth tax name.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax10_amount]</code> is provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match one of <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">taxes[name]</code>.</li> </ul></div>
tax10_amountarray<integer (int64)><p class="mb-2">Tenth tax amount.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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[tax10_name]</code> is provided.</li> </ul></div>
proration_modearray<string>line_item_tiersobject<p class="mb-2">Parameters for line item tiers. Used to specify tiered pricing details for line items 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">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> pricing models.</p>
line_item_idarray<string>requiredThe unique identifier of the line item this tier belongs to.
starting_unitarray<integer (int32)>The lower limit of a range of units for the tier
ending_unitarray<integer (int32)>The upper limit of the unit range for this tier. Not applicable for the highest tier.
quantity_usedarray<integer (int32)>The number of units purchased within this tier 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>
discountsobjectParameters for discounts. Used to specify discounts, coupons, or promotional credits applied to the credit note at the document level or item level.
line_item_idarray<string><p class="mb-2">The unique identifier of the line item that this deduction is for. This must match 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[id]</code> of the line item to which the discount is applied.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">discounts[entity_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">item_level_coupon</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">item_level_discount</code>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The line item must have an <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> specified (i.e., <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[id]</code> must be provided for the line item).</li> </ul></div>
entity_typearray<string>requiredentity_idarray<string><p class="mb-2">The unique identifier of the <a href="/docs/api/coupons" class="text-blue-600 hover:text-blue-800 underline">coupon</a>.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">discounts[entity_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">item_level_coupon</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">document_level_coupon</code>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must not be provided 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">discounts[entity_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">document_level_discount</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">item_level_discount</code>.</li> <li class="text-base leading-relaxed">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">item_level_coupon</code>, the coupon must be applicable to the plan or addon associated with the line item.</li> <li class="text-base leading-relaxed">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">document_level_coupon</code>, the coupon must 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">apply_on</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">invoice_amount</code>.</li> </ul></div>
descriptionarray<string>Description for this deduction.
amountarray<integer (int64)>requiredThe amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies) .
taxesobject<p class="mb-2">Parameters for document-level taxes. Used to specify tax information at the credit note level.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Prerequisite</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">taxes[]</code> must not be provided if the reference invoice has <strong class="font-semibold">all</strong> line items exempted from tax for any one of the following reasons: <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">customer_exempt</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">reverse_charge</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">export</code> (i.e. if all <a href="/docs/api/invoices/invoice-object#invoice_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[].tax_exempt_reason</code></a> on the reference invoice are 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">customer_exempt</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">reverse_charge</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">export</code>).</li> </ul></div>
namearray<string>required<p class="mb-2">The name of the tax applied.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match at least one <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[tax*_name]</code>.</li> </ul></div>
ratearray<number (double)>required<p class="mb-2">The rate of tax.</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">This parameter is only used to disambiguate between multiple taxes with the same <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">name</code> and other tax metadata. It is not used to calculate or validate the tax amount.</li> </ul></div>
amountarray<integer (int64)><p class="mb-2">The total tax amount for this credit note.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must match the sum of the line-level tax amounts (<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[tax*_amount][]</code>) for the given combination of <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">name</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">rate</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">juris_type</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">juris_name</code>, and <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">juris_code</code>.</li> </ul></div>
descriptionarray<string>Description of tax
juris_typearray<string>juris_namearray<string>The name of the tax jurisdiction
juris_codearray<string>The tax jurisdiction code
allocationsobject<p class="mb-2">Parameters for credit allocations. Used to specify how the credit note amount is allocated to invoices.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">adjusted</code>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">For adjustment credit notes (<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> = <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>), only one allocation is allowed.</li> <li class="text-base leading-relaxed">Must not be provided 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">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">voided</code>.</li> </ul></div>
invoice_idarray<string>requiredThe unique identifier of the invoice to which this credit note amount is allocated. The invoice must already exist in Chargebee.
allocated_amountarray<integer (int64)>required<p class="mb-2">The amount allocated from this credit note to the specified invoice.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The sum of <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">allocated_amount[]</code> plus the sum of <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_refunds[amount][]</code> must not exceed 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">total</code>.</li> </ul></div>
allocated_atarray<integer (unix-time)>required<p class="mb-2">The timestamp when the allocation occurred.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must be equal to or after 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">date</code>.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Default value</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">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">date</code>.</li> </ul></div>
linked_refundsobject<p class="mb-2">Parameters for linked refunds. Used to record refund transactions associated with this credit note.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Required if</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><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">refunded</code> and 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">allocations[]</code> are provided.</li> </ul></div> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Must not be provided 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">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">adjusted</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">voided</code>.</li> </ul></div>
idarray<string>amountarray<integer (int64)>required<p class="mb-2">The amount of this refund transaction.</p> <div class="alert alert-info"><p class="mb-2"><strong class="font-semibold">Constraints</strong></p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">The sum of <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_refunds[amount][]</code> plus the sum of <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">allocations[allocated_amount][]</code> must not exceed 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">total</code> of the credit note.</li> </ul></div>
payment_methodarray<string>requireddatearray<integer (unix-time)>requiredThe date when the refund occurred. **Constraints** * Must be a date in the past.
reference_numberarray<string>Reference number for this refund.
{
"id": null,
"reference_invoice_id": null,
"type": null,
"create_reason_code": null,
"date": null,
"customer_id": null,
"subscription_id": null,
"currency_code": null,
"status": null,
"total": null,
"refunded_at": null,
"voided_at": null
}
Response
Returns 200 with an object. Read it in later steps with {{importCreditNote.response.data.<field>}}.
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 'due' 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's</a> <em class="italic">subscription_id</em> . The credit note'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>
idstringrequiredCredit-note id.
customer_idstringrequiredThe identifier of the customer this credit note belongs to.
subscription_idstringThe 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_idstringThe identifier of the invoice against which this Credit Note is issued
typestringrequiredThe 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_codestringThe 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
statusstringrequiredThe 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_numberstringVAT number of the customer for whom this credit note is raised.
dateinteger (unix-time)The date the credit note is issued.
price_typestringrequiredThe 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_codestringrequiredThe 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.
channelstringThe 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&utm_medium=content&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)requiredThe 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_codestringThe 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.
deletedbooleanrequiredIndicates that this resource has been deleted.
tax_categorystringSpecifies 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_codestringReason 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'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 fieldsThe line items of this credit note
line_item_tiersarray<object>11 fieldsThe list of tiers applicable for this line item
line_item_discountsarray<object>5 fieldsThe list of discount(s) applied for each line item of this credit note.
line_item_taxesarray<object>15 fieldsThe list of taxes applied on line items
line_item_addressesarray<object>15 fieldsThe list of addresses used for tax calculation on line items.
{
"credit_note": null
}
Need more? See the Chargebee guide for connection setup and behaviour shared by every action.