ChargebeeAPI

Credit notes

A Credit Note 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.

Credit Note Types

Credit notes in Chargebee are categorized into three types: 1. adjustment: Adjustment credit notes are used to adjust the amount of an existing invoice in the payment_due or not_paid status. 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:

  • When an invoice is written off.
  • When a subscription is modified with proration enabled, and the invoice for the current term is in the payment_due or not_paid status. 2. refundable: Refundable credit notes allow you to return a certain amount to the customer. These credits can be:
  • Retained for automatic application on future invoices.
  • Applied to existing unpaid invoices.
  • Refunded to the customer. Refundable credit notes are automatically created in the following cases:
  • When an invoice is refunded.
  • When a subscription is changed or canceled with proration enabled, the invoice for the current term is in the paid status. Refundable credits are applied to future invoices or can be refunded to the original payment method. 3. store: Store credit notes are created for paid or partially_paid invoice status during subscription changes, such as upgrades, downgrades, or cancellations. Key characteristics of store credits:
  • No tax component is included at the time of creation.
  • A credit note document is generated, similar to refundable credits.
  • Store credits are applied before tax calculations on future invoices.

Note: If you have enabled consolidated invoicing , to know the subscriptions attached with a credit note you have to refer line_item's subscription_id . The credit note's subscription_id should not be used (which will be null if the credit note has lines from multiple subscriptions).

Sample Credit noteJSON

Credit notes attributes

id
required, string, max chars=50

Credit-note id.

customer_id
required, string, max chars=50

The identifier of the customer this credit note belongs to.

subscription_id
optional, string, max chars=50

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 subscription_id. This attribute should not be used (which will be null if this credit note has lines from multiple subscriptions).

reference_invoice_id
optional, string, max chars=50

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

type
required, enumerated string

The credit note type. Learn more about credit note types.

Possible Enum Values
adjustment

Adjustment Credit Note

refundable

Refundable Credit Note

store

Store Credit Note

reason_code
optional, enumerated string

The reason for issuing this credit note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead]

Possible Enum Values
write_off

This reason will be set automatically for the Credit Notes created during invoice Write Off operation.

subscription_change

This reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabled

subscription_cancellation

This reason will be set automatically for Credit Notes created during cancel subscription operation

subscription_pause

This reason will be automatically set to credit notes created during pause/resume subscription operation.

chargeback

Can be set when you are recording your customer Chargebacks

status
required, enumerated string

The credit note status.

Possible Enum Values
adjusted

When the Credit Note has been adjusted against an invoice.

refunded

When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).

refund_due

When the credits are yet to be used, or have been partially used.

voided

When the Credit Note has been cancelled.

vat_number
optional, string, max chars=20

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

date
optional, timestamp(UTC) in seconds

The date the credit note is issued.

price_type
required, enumerated string, default=tax_exclusive

The price type of the credit note.

Possible Enum Values
tax_exclusive

All amounts in the document are exclusive of tax.

tax_inclusive

All amounts in the document are inclusive of tax.

currency_code
required, string, max chars=3

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

total
optional, in cents, default=0, min=0

Credit Note amount in cents.

amount_allocated
optional, in cents, default=0, min=0

The amount allocated to invoices from the credit note.

amount_refunded
optional, in cents, default=0, min=0

The refunds issued from this credit note.

amount_available
optional, in cents, default=0, min=0

The yet to be used credits of this credit note.

refunded_at
optional, timestamp(UTC) in seconds

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

voided_at
optional, timestamp(UTC) in seconds

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

generated_at
optional, timestamp(UTC) in seconds

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_version
optional, long

Version number of this resource. The resource_version 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.

updated_at
optional, timestamp(UTC) in seconds

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.

channel
optional, enumerated string

The subscription channel this object originated from and is maintained in.

Possible Enum Values
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) created in Apple App Store. Direct manipulation of this object via UI or API is disallowed.

play_store

The object data is synchronized with data from in-app subscription(s) 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 for more information.

line_items_next_offset
optional, string, max chars=1000

This attribute is returned only if additional resources are available. Use this value as the input parameter for line_items_offset to retrieve the next set of resources.

Note:

  • Applicable only when Enterprise-scale Invoicing is enabled.
  • Enterprise-scale Invoicing is currently in Private Beta. Please reach out to Chargebee Support to enable this feature.
sub_total
required, in cents, min=0

The Credit Note sub-total

sub_total_in_local_currency
optional, in cents, min=0

Invoice subtotal in the currency of the place of supply.

total_in_local_currency
optional, in cents, min=0

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

local_currency_code
optional, string, max chars=3

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

round_off_amount
optional, in cents, min=-99, max=99

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 round_off_amount. If there is no round-off amount , it will display 0 .

fractional_correction
optional, in cents, min=-50000, max=50000

Indicates the fractional correction amount.

deleted
required, boolean

Indicates that this resource has been deleted.

tax_category
optional, string

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_rate
optional, bigdecimal, min=1E-9, max=999999999.999999999

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_code
optional, string, max chars=100

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_prefix
optional, string, max chars=10

An overridden value for the first two characters of the full VAT number. Only applicable specifically for customers with billing_address

country as XI (which is United Kingdom - Northern Ireland ).

When you have enabled EU VAT in 2021 or have manually enabled the Brexit configuration, you have the option of setting billing_address

country as XI. That's the code for United Kingdom - Northern Ireland. The first two characters of the VAT number in such a case is XI by default. However, if the VAT number was registered in UK, the value should be GB. Set vat_number_prefix to GB for such cases.

business_entity_id
optional, string, max chars=50

The unique ID of the business entity of this credit_note. This is always the same as the business entity of the invoice referred to by reference_invoice_id.

discounts
optional, list of discount

The list of discounts applied to this credit note

taxes
optional, list of tax

The tax-lines of this credit note

tax_origin
optional, tax_origin

contains information about the tax details which is applied on the invoice.

linked_refunds
optional, list of credit_note_transaction

Payment Refunds issued from this credit note

linked_tax_withheld_refunds
optional, list of linked_tax_withheld_refund

The details of refunds recorded against the invoice.linked_taxes_withheld component of the invoice associated with this credit_note.

allocations
optional, list of applied_credit

Invoice allocations made from this credit note.

shipping_address
optional, shipping_address

Shipping address for the credit note.

billing_address
optional, billing_address

Billing address for the credit note.

einvoice
optional, einvoice

An e-invoice or electronic invoice is a structured representation of an invoice that is interoperable between computerized invoicing systems. Depending on the country, e-invoicing can be necessary to meet financial/taxation authority regulations.

site_details_at_creation
optional, site_details_at_creation

It contains site-specific information, including timezone and organisational address.

line_items
optional, list of line_item

The line items of this credit note

line_item_tiers
optional, list of line_item_tier

The list of tiers applicable for this line item

line_item_discounts
optional, list of line_item_discount

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

line_item_taxes
optional, list of line_item_tax

The list of taxes applied on line items

line_item_addresses
optional, list of line_item_address

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