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 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:
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: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: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).
{
"allocations": [],
"amount_allocated": 0,
"amount_available": 500,
"amount_refunded": 0,
"base_currency_code": "USD",
"create_reason_code": "Product Unsatisfactory",
"currency_code": "USD",
"customer_id": "__test__KyVnHhSBWSy4m5e",
"date": 1517501405,
"deleted": false,
"exchange_rate": 1,
"fractional_correction": 0,
"id": "__demo_cn__1",
"line_item_discounts": [],
"line_item_taxes": [],
"line_items": [
{
"amount": 500,
"customer_id": "__test__KyVnHhSBWSy4m5e",
"date_from": 1517501405,
"date_to": 1517501405,
"description": "Support Charge",
"discount_amount": 0,
"entity_type": "adhoc",
"id": "li___test__KyVnHhSBWSyHE5r",
"is_taxed": false,
"item_level_discount_amount": 0,
"object": "line_item",
"pricing_model": "flat_fee",
"quantity": 1,
"tax_amount": 0,
"tax_exempt_reason": "tax_not_configured",
"unit_amount": 500
}
],
"linked_refunds": [],
"object": "credit_note",
"price_type": "tax_exclusive",
"reason_code": "product_unsatisfactory",
"reference_invoice_id": "__demo_inv__1",
"resource_version": 1517501405000,
"round_off_amount": 0,
"status": "refund_due",
"sub_total": 500,
"taxes": [],
"total": 500,
"type": "refundable",
"updated_at": 1517501405
}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).
The reason for issuing this credit note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead]
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
.
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.
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
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.
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.
The line items of this credit note
The list of tiers applicable for this line item
The list of discount(s) applied for each line item of this credit note.
The list of taxes applied on line items
The list of addresses used for tax calculation on line items.
The list of discounts applied to this credit note
The tax-lines of this credit note
contains information about the tax details which is applied on the invoice.
Payment Refunds issued from this credit note
The details of refunds recorded against the invoice.linked_taxes_withheld
component of the invoice
associated
with this credit_note.
Invoice allocations made from this credit note.
Shipping address for the credit note.
Billing address for the credit note.
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.
It contains site-specific information, including timezone and organisational address.
Creates a credit_note for the specified invoice.
Note:
If the credit_note type is refundable, then linked_taxes_withheld.amount for the invoice specified can also be included in the total.
The credit note type. Learn more about credit note types.
The reason for issuing this Credit Note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead].
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.
A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the Credit Note PDF .
An internal comment to be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Credit Note PDF .
Retrieves the Credit Note identified by the specified Credit Note number.
Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.
Download the e-invoice for the credit note in both XML and PDF formats. The response consists of a download object for each format. The XML format follows the structure as per Peppol BIS Billing v3.0.
Note
status is success or registered.cbc:EmbeddedDocumentBinaryObject, which is the Base64-encoded version of the PDF.Refunds a (refundable) credit note to the payment source associated with the transaction. Any linked_tax_withheld_refunds recorded against the credit note are not refunded.
The amount to be refunded. If not specified, the entire refundable amount
for this credit_note
is refunded.
Note:
Any linked_tax_withheld_refunds
associated with the credit_note
cannot be refunded via this operation.
A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the Credit Note PDF .
Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Credit Notes > Refund Credit Note. Must be passed if set as mandatory in the app. The codes are case-sensitive.
Records a refund for a refundable credit note.
This API does not process an actual refund for online payments by returning money to customers.
Use this API to record refunds processed outside Chargebee (for example, directly through a payment gateway or via offline methods such as bank transfers or checks) so you can reconcile them in Chargebee.
To process refunds via Chargebee for online payments and automatically return money to customers, use the Refund a credit note API instead.
Transactions
Chargebee records the refunds by creating transactions of type refund and links them to the credit note. The refund transactions are recorded in the following order:
linked_payments of the invoice associated with the credit note. This is recorded as linked_refunds[] in the credit note.linked_taxes_withheld (if available). This is recorded as linked_tax_withheld_refunds[] in the credit note.Before using this API, ensure:
type is refundable.status is refund_due.refund_reason_code parameter with a value from the configured list of codes.Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Credit Notes > Refund Credit Note. Must be passed if set as mandatory in the app. The codes are case-sensitive.
Void or invalidate the specified credit note.
Use this operation for incorrectly generated credit notes, such as those with wrong details or created by mistake. This is a preferred method over deleting the credit note, as it preserves the audit trail, allowing for future reference and compliance without removing the original record.
status must not be refunded or voided.type refundable, you must remove any allocations or linked refunds before voiding it. Note that only offline refunds can be removed; online refunds cannot.See Implementation Notes for more details.
Invoices
If the credit note type is adjustment, the associated invoice status changes to not_paid, and the amount_due on the invoice increases by the amount that was allocated via the credit note.
Before calling this API, ensure the following:
status must not be refunded or voided.type refundable:
Lists all the Credit Notes.
The identifier of the customer this Credit Note belongs to. Supported operators : is, is_not, starts_with, in, not_in
Example → customer_id[is] = "4gmiXbsjdm"
To filter based on subscription_id. NOTE: Not to be used if consolidated invoicing feature is enabled. Supported operators : is, is_not, starts_with, is_present, in, not_in
Example → subscription_id[is] = "4gmiXbsjdm"
The identifier of the invoice against which this Credit Note is issued. Supported operators : is, is_not, starts_with, in, not_in
Example → reference_invoice_id[is] = "INVOICE_876"
The reason for issuing this Credit Note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead].
Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulentReason 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. Supported operators : is, is_not, starts_with, in, not_in
Example → create_reason_code[is] = "Other"
The yet to be used credits of this Credit Note. Supported operators : is, is_not, lt, lte, gt, gte, between
Example → amount_available[gt] = "1400"
Timestamp indicating the date and time this Credit Note gets voided. Supported operators : after, before, on, between
Example → voided_at[before] = "1435054328"
To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28. Supported operators : after, before, on, between
Example → updated_at[on] = "1243545465"
Parameters for einvoice
The status of processing the e-invoice. To obtain detailed information about the current status
, see message
.
This API deletes a credit note. A credit note once deleted, is deleted permanently. You cannot delete a credit which has already been deleted or refunded. If you try to delete a refunded or deleted credit note, an error message will be displayed.
Removes a linked_tax_withheld_refunds
record from the credit_note
.
Resend failed einvoice in credit notes.
This endpoint is used to send an e-invoice for invoice. To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually. This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches:
If e-invoicing is not enabled at the site and customer level.
If there is an e-invoice generated already for the invoice.
If the Use automatic e-invoicing option is selected.
If there are no generated e-invoices with the failed or skipped status.
If the invoice status is voided or pending.
Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice.
The credit note type. Learn more about credit note types.
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.
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
.
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.