API Version
Product Catalog
Library

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.

Chargebee supports two types of Credit Notes - Adjustment Credit Note and Refundable Credit Note.

  • Adjustment Credit Notes are created for the 'unpaid' component of the invoice and it can have statuses - Adjusted and Voided.
  • Refundable Credit Notes are created for 'paid' component of the invoice and it can have statuses - Refunded, Refund Due and Voided.

The credits available in the Refundable Credit Notes will be automatically applied when a new invoice gets generated for the customer.

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 note [ JSON ]

{ "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 }

API Index URL GET

https://{site}.chargebee.com/api/v2/credit_notes

Model Class

id
string, max chars=50
Credit-note id.
customer_id
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
string, max chars=50
The identifier of the invoice against which this Credit Note is issued
type
enumerated string
The credit note type.
Possible values are
adjustmentAdjustment Credit NoterefundableRefundable Credit Note
Show all values[+]
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 values are
write_offThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.subscription_changeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabledsubscription_cancellationThis reason will be set automatically for Credit Notes created during cancel subscription operationsubscription_pauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.
Show all values[+]
status
enumerated string
The credit note status.
Possible values are
adjustedWhen the Credit Note has been adjusted against an invoice.refundedWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).refund_dueWhen the credits are yet to be used, or have been partially used.voidedWhen the Credit Note has been cancelled.
Show all values[+]
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
enumerated string, default=tax_exclusive
The price type of the Credit Note.
Possible values are
tax_exclusiveAll amounts in the document are exclusive of tax.tax_inclusiveAll amounts in the document are inclusive of tax.
Show all values[+]
currency_code
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 the invoices.
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 values are
webThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.app_storeThe 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_storeThe 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.
Show all values[+]
sub_total
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
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
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.
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.
optional, list of line_item
The line items of this Credit Note
optional, list of discount
The list of discounts applied to this Credit Note
line_item_discounts
Show attributes [+]
optional, list of line_item_discount
The list of discount(s) applied for each line item of this invoice.
line_item_tiers
Show attributes [+]
optional, list of line_item_tier
The list of tiers applicable for this line item
optional, list of tax
The tax-lines of this Credit Note
line_item_taxes
Show attributes [+]
optional, list of line_item_tax
The list of taxes applied on line items
linked_refunds
Show attributes [+]
optional, list of credit_note_transaction
Payment Refunds issued from this Credit Note
linked_tax_withheld_refunds
Show attributes [+]
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
Show attributes [+]
optional, list of applied_credit
Invoice allocations made from this Credit Note.
shipping_address
Show attributes [+]
optional, shipping_address
Shipping address for the quote.
billing_address
Show attributes [+]
optional, billing_address
Billing address for the quote.
id id
string, max chars=50
Credit-note id.
customer_id customer_id
string, max chars=50
The identifier of the customer this Credit Note belongs to.
subscription_id 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 reference_invoice_id
string, max chars=50
The identifier of the invoice against which this Credit Note is issued
type type
enumerated string
The credit note type.
reason_code 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]
status status
enumerated string
The credit note status.
vat_number vat_number
optional, string, max chars=20
VAT number of the customer for whom this Credit Note is raised.
date date
optional, timestamp(UTC) in seconds
The date the Credit Note is issued.
price_type price_type
enumerated string, default=tax_exclusive
The price type of the Credit Note.
currency_code currency_code
string, max chars=3
The currency code (ISO 4217 format) for the credit note
total total
optional, in cents, default=0, min=0
Credit Note amount in cents.
amount_allocated amount_allocated
optional, in cents, default=0, min=0
The amount allocated to the invoices.
amount_refunded amount_refunded
optional, in cents, default=0, min=0
The refunds issued from this Credit Note.
amount_available amount_available
optional, in cents, default=0, min=0
The yet to be used credits of this Credit Note.
refunded_at 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 voided_at
optional, timestamp(UTC) in seconds
Timestamp indicating the date and time this Credit Note gets voided.
generated_at 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 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 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 channel
optional, enumerated string
The subscription channel this object originated from and is maintained in.
sub_total sub_total
in cents, min=0
The Credit Note sub-total
sub_total_in_local_currency sub_total_in_local_currency
optional, in cents, min=0
Invoice subtotal in the currency of the place of supply.
total_in_local_currency total_in_local_currency
optional, in cents, min=0
Total invoice amount in the currency of the place of supply.
local_currency_code 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 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 fractional_correction
optional, in cents, min=-50000, max=50000
Indicates the fractional correction amount.
deleted deleted
boolean
Indicates that this resource has been deleted.
tax_category 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 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 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 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 business_entity_id
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.
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.
line_items
optional, list of line_item
The line items of this Credit Note
discounts
optional, list of discount
The list of discounts applied to this Credit Note
line_item_discounts
optional, list of line_item_discount
The list of discount(s) applied for each line item of this invoice.
line_item_tiers
optional, list of line_item_tier
The list of tiers applicable for this line item
taxes
optional, list of tax
The tax-lines of this Credit Note
line_item_taxes
optional, list of line_item_tax
The list of taxes applied on line items
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 quote.
billing_address
optional, billing_address
Billing address for the quote.

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.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes \
     -u {site_api_key}:\
     -d reference_invoice_id="__demo_inv__1" \
     -d total=500 \
     -d type="REFUNDABLE" \
     -d reason_code="PRODUCT_UNSATISFACTORY" \
     -d customer_notes="Products were returned because they were defective"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "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
    },
    "invoice": {
        "adjustment_credit_notes": [],
        "amount_adjusted": 0,
        "amount_due": 0,
        "amount_paid": 1000,
        "amount_to_collect": 0,
        "applied_credits": [],
        "base_currency_code": "USD",
        "billing_address": {
            "first_name": "Duncan",
            "last_name": "Walpole",
            "object": "billing_address",
            "validation_status": "not_validated"
        },
        "credits_applied": 0,
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWSy4m5e",
        "date": 1517501404,
        "deleted": false,
        "due_date": 1517501404,
        "dunning_attempts": [],
        "exchange_rate": 1,
        "first_invoice": true,
        "has_advance_charges": false,
        "id": "__demo_inv__1",
        "is_gifted": false,
        "issued_credit_notes": [
            {
                "cn_create_reason_code": "Product Unsatisfactory",
                "cn_date": 1517501405,
                "cn_id": "__demo_cn__1",
                "cn_reason_code": "product_unsatisfactory",
                "cn_status": "refund_due",
                "cn_total": 500
            },
            {..}
        ],
        "line_items": [
            {
                "amount": 1000,
                "customer_id": "__test__KyVnHhSBWSy4m5e",
                "date_from": 1517501404,
                "date_to": 1517501404,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWSy9k5l",
                "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": 1000
            },
            {..}
        ],
        "linked_orders": [],
        "linked_payments": [
            {
                "applied_amount": 1000,
                "applied_at": 1517501404,
                "txn_amount": 1000,
                "txn_date": 1517501404,
                "txn_id": "txn___test__KyVnHhSBWSyEh5m",
                "txn_status": "success"
            },
            {..}
        ],
        "net_term_days": 0,
        "new_sales_amount": 1000,
        "object": "invoice",
        "paid_at": 1517501404,
        "price_type": "tax_exclusive",
        "recurring": false,
        "resource_version": 1517501405000,
        "round_off_amount": 0,
        "status": "paid",
        "sub_total": 1000,
        "tax": 0,
        "term_finalized": true,
        "total": 1000,
        "updated_at": 1517501405,
        "write_off_amount": 0
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes

Method

reference_invoice_id[]
required, string, max chars=50
The identifier of the invoice against which this Credit Note is issued.
total[]
optional, in cents, default=0, min=0
Credit Note amount in cents. You can either pass the total parameter or the line_items parameter. Passing both will result in an error.
type[]
required, enumerated string
The credit note type.
Possible values are
adjustmentAdjustment Credit NoterefundableRefundable Credit Note
Show all values[+]
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 values are
product_unsatisfactoryProduct Unsatisfactoryservice_unsatisfactoryService Unsatisfactoryorder_changeOrder Changeorder_cancellationOrder Cancellation
Show all values[+]
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.
date[]
optional, timestamp(UTC) in seconds
The date the Credit Note is issued.
customer_notes[]
optional, string, max chars=2000
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.
comment[]
optional, string, max chars=300
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.
line_items[reference_line_item_id][0..n]
required, string, max chars=40
line_items[unit_amount][0..n]
optional, in cents
line_items[unit_amount_in_decimal][0..n]
optional, string, max chars=39
line_items[quantity][0..n]
optional, integer, default=1
line_items[quantity_in_decimal][0..n]
optional, string, max chars=33
line_items[amount][0..n]
optional, in cents
line_items[date_from][0..n]
optional, timestamp(UTC) in seconds
line_items[date_to][0..n]
optional, timestamp(UTC) in seconds
line_items[description][0..n]
optional, string, max chars=250
credit_note credit_note
always returned
Resource object representing credit_note
invoice invoice
always returned
Resource object representing invoice

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x
Retrieves the Credit Note identified by the specified Credit Note number.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__7 \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "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__KyVnHhSBWT0XH7a",
        "date": 1517501414,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__7",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWT0XH7a",
                "date_from": 1517501414,
                "date_to": 1517501414,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0c77n",
                "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__7",
        "resource_version": 1517501414000,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517501414
    }
}

URL Format GET

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}

Method

credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x
Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__4/pdf \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "download": {
        "download_url": "https://cb-local-downloads.s3.amazonaws.com/yourapp/credit_note/__test__KyVnHhSBWSzKF6n.pdf?response-content-disposition=attachment%3Bfilename%3Dyourapp%2Fcredit_note%2F__test__KyVnHhSBWSzKF6n.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200924T161012Z&X-Amz-SignedHeaders=host&X-Amz-Expires=59&X-Amz-Credential=AKIAJI4SN7ONHAOGLOGA%2F20200924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=e4aae0313d24d0b5bd73d4292711dd15f94811f0e7a28a271fc92ce3606037ff",
        "object": "download",
        "valid_till": 1600963872
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/pdf

Method

disposition_type[]
optional, enumerated string, default=attachment
Determines the pdf should be rendered as inline or attachment in the browser.
Possible values are
attachmentPDF is rendered as attachment in the browserinlinePDF is rendered as inline in the browser
Show all values[+]
download download
always returned
Resource object representing download

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

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

  • You can only download e-invoices when their status is success or registered.
  • There are some cases in which the PDF is not available for download. In such cases, you can obtain it from the XML by decoding the value for cbc:EmbeddedDocumentBinaryObject, which is the Base64-encoded version of the PDF.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__1/download_einvoice \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "downloads": [
        {
            "download_url": "https://dj-temp.s3.eu-west-1.amazonaws.com/596b46e3f21011b29678bc15f5c938075755c163ae4fdb15b98f3e8e5ca6eab7cf16afc6c788b29f91e6362a7aae4867ba4153eef2838556ee541ba85af09369?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI5G5MTYS7SBP4ZEQ%2F20211123%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20211123T070845Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=4d99603c2f7bcdd6cf450a27372ee2f95003afb64a0188b4ebe142a403e14acf",
            "mime_type": "application/xml",
            "object": "download",
            "valid_till": 1638236325
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/download_einvoice

Method

downloads downloads
always returned
Resource object representing downloads

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

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.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__6/refund \
     -u {site_api_key}:\
     -d customer_notes="Refunding as customer canceled the order." \
     -d refund_amount=1000
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "allocations": [],
        "amount_allocated": 0,
        "amount_available": 0,
        "amount_refunded": 1000,
        "base_currency_code": "USD",
        "create_reason_code": "Product Unsatisfactory",
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWT0N17C",
        "date": 1517501413,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__6",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 1000,
                "customer_id": "__test__KyVnHhSBWT0N17C",
                "date_from": 1517501413,
                "date_to": 1517501413,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0Rm7P",
                "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": 1000
            },
            {..}
        ],
        "linked_refunds": [
            {
                "applied_amount": 1000,
                "applied_at": 1517501413,
                "txn_amount": 1000,
                "txn_date": 1517501413,
                "txn_id": "txn___test__KyVnHhSBWT0Tk7T",
                "txn_status": "success"
            },
            {..}
        ],
        "object": "credit_note",
        "price_type": "tax_exclusive",
        "reason_code": "product_unsatisfactory",
        "reference_invoice_id": "__demo_inv__6",
        "refunded_at": 1517501413,
        "resource_version": 1517501413000,
        "round_off_amount": 0,
        "status": "refunded",
        "sub_total": 1000,
        "taxes": [],
        "total": 1000,
        "type": "refundable",
        "updated_at": 1517501413
    },
    "transaction": {
        "amount": 1000,
        "base_currency_code": "USD",
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWT0N17C",
        "date": 1517501413,
        "deleted": false,
        "exchange_rate": 1,
        "gateway": "chargebee",
        "gateway_account_id": "gw___test__KyVnGlSBWSxm7Jj",
        "id": "txn___test__KyVnHhSBWT0Tk7T",
        "id_at_gateway": "cb___test__KyVnHhSBWT0Q57L",
        "linked_credit_notes": [
            {
                "applied_amount": 1000,
                "applied_at": 1517501413,
                "cn_create_reason_code": "Product Unsatisfactory",
                "cn_date": 1517501413,
                "cn_id": "__demo_cn__6",
                "cn_reason_code": "product_unsatisfactory",
                "cn_reference_invoice_id": "__demo_inv__6",
                "cn_status": "refunded",
                "cn_total": 1000
            },
            {..}
        ],
        "masked_card_number": "************1111",
        "object": "transaction",
        "payment_method": "card",
        "payment_source_id": "pm___test__KyVnHhSBWT0Ni7E",
        "refunded_txn_id": "txn___test__KyVnHhSBWT0Py7K",
        "resource_version": 1517501413000,
        "status": "success",
        "type": "refund",
        "updated_at": 1517501413
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/refund

Method

refund_amount[]
optional, in cents, min=1
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.
customer_notes[]
optional, string, max chars=2000
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.
refund_reason_code[]
optional, string, max chars=100
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.
credit_note credit_note
always returned
Resource object representing credit_note
transaction transaction
always returned
Resource object representing transaction

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

Refunds a (refundable) credit note. The refund is provided against linked_payments first and then against any linked_taxes_withheld for the invoice associated with the credit_note. For payments made via online transactions, the refund request is processed via the payment source associated with the transaction.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__5/record_refund \
     -u {site_api_key}:\
     -d comment="Refunding as customer canceled the order." \
     -d transaction[amount]=100 \
     -d transaction[payment_method]="BANK_TRANSFER" \
     -d transaction[date]=1517501412
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "allocations": [],
        "amount_allocated": 0,
        "amount_available": 400,
        "amount_refunded": 100,
        "base_currency_code": "USD",
        "create_reason_code": "Product Unsatisfactory",
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWT0B66o",
        "date": 1517501412,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__5",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWT0B66o",
                "date_from": 1517501412,
                "date_to": 1517501412,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0IE71",
                "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": [
            {
                "applied_amount": 100,
                "applied_at": 1517501412,
                "txn_amount": 100,
                "txn_date": 1517501412,
                "txn_id": "txn___test__KyVnHhSBWT0Jm75",
                "txn_status": "success"
            },
            {..}
        ],
        "object": "credit_note",
        "price_type": "tax_exclusive",
        "reason_code": "product_unsatisfactory",
        "reference_invoice_id": "__demo_inv__5",
        "resource_version": 1517501413000,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517501413
    },
    "transaction": {
        "amount": 100,
        "base_currency_code": "USD",
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWT0B66o",
        "date": 1517501412,
        "deleted": false,
        "exchange_rate": 1,
        "gateway": "not_applicable",
        "id": "txn___test__KyVnHhSBWT0Jm75",
        "linked_credit_notes": [
            {
                "applied_amount": 100,
                "applied_at": 1517501412,
                "cn_create_reason_code": "Product Unsatisfactory",
                "cn_date": 1517501412,
                "cn_id": "__demo_cn__5",
                "cn_reason_code": "product_unsatisfactory",
                "cn_reference_invoice_id": "__demo_inv__5",
                "cn_status": "refund_due",
                "cn_total": 500
            },
            {..}
        ],
        "object": "transaction",
        "payment_method": "bank_transfer",
        "resource_version": 1517501413000,
        "status": "success",
        "type": "refund",
        "updated_at": 1517501413
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/record_refund

Method

refund_reason_code[]
optional, string, max chars=100
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.
comment[]
optional, string, max chars=300
Remarks, if any, on the refund.
transaction[amount]
optional, in cents, min=1
transaction[payment_method]
required, enumerated string
Possible values are
cashCashcheckCheckchargebackOnly applicable for a transaction of type = refund. This value is set by Chargebee when an automated chargeback occurs. You can also set this explicitly when recording a refund.bank_transferBank Transfer
Show all values[+]
transaction[reference_number]
optional, string, max chars=100
transaction[custom_payment_method_id]
optional, string, max chars=50
transaction[date]
required, timestamp(UTC) in seconds
credit_note credit_note
always returned
Resource object representing credit_note
transaction transaction
optional
Resource object representing transaction

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

Use this API to void a credit note. A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void.

Note: When adjustment credit notes are voided, the associated invoice will reflect as NOT PAID, and the amount in the invoice will be recalculated to reflect the amount after considering the voided credit note.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__8/void \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "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__KyVnHhSBWT0fn7r",
        "date": 1517501414,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__8",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWT0fn7r",
                "date_from": 1517501414,
                "date_to": 1517501414,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0kV84",
                "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__8",
        "resource_version": 1517501414000,
        "round_off_amount": 0,
        "status": "voided",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517501414,
        "voided_at": 1517501414
    },
    "invoice": {
        "adjustment_credit_notes": [],
        "amount_adjusted": 0,
        "amount_due": 0,
        "amount_paid": 1000,
        "amount_to_collect": 0,
        "applied_credits": [],
        "base_currency_code": "USD",
        "billing_address": {
            "first_name": "Duncan",
            "last_name": "Walpole",
            "object": "billing_address",
            "validation_status": "not_validated"
        },
        "credits_applied": 0,
        "currency_code": "USD",
        "customer_id": "__test__KyVnHhSBWT0fn7r",
        "date": 1517501414,
        "deleted": false,
        "due_date": 1517501414,
        "dunning_attempts": [],
        "exchange_rate": 1,
        "first_invoice": true,
        "has_advance_charges": false,
        "id": "__demo_inv__8",
        "is_gifted": false,
        "issued_credit_notes": [
            {
                "cn_create_reason_code": "Product Unsatisfactory",
                "cn_date": 1517501414,
                "cn_id": "__demo_cn__8",
                "cn_reason_code": "product_unsatisfactory",
                "cn_status": "voided",
                "cn_total": 500
            },
            {..}
        ],
        "line_items": [
            {
                "amount": 1000,
                "customer_id": "__test__KyVnHhSBWT0fn7r",
                "date_from": 1517501414,
                "date_to": 1517501414,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0iC7y",
                "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": 1000
            },
            {..}
        ],
        "linked_orders": [],
        "linked_payments": [
            {
                "applied_amount": 1000,
                "applied_at": 1517501414,
                "txn_amount": 1000,
                "txn_date": 1517501414,
                "txn_id": "txn___test__KyVnHhSBWT0ir7z",
                "txn_status": "success"
            },
            {..}
        ],
        "net_term_days": 0,
        "new_sales_amount": 1000,
        "object": "invoice",
        "paid_at": 1517501414,
        "price_type": "tax_exclusive",
        "recurring": false,
        "resource_version": 1517501414000,
        "round_off_amount": 0,
        "status": "paid",
        "sub_total": 1000,
        "tax": 0,
        "term_finalized": true,
        "total": 1000,
        "updated_at": 1517501414,
        "write_off_amount": 0
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/void

Method

comment[]
optional, string, max chars=300
Reason for voiding credit note. This comment will be added to the credit note.
credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

Lists all the Credit Notes.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=3 \
     --data-urlencode type[is]="refundable" \
     --data-urlencode sort_by[asc]=date
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "credit_note": {
                "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
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/credit_notes

Method

limit[]
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
offset[]
optional, string, max chars=1000
Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
include_deleted[]
optional, boolean, default=false
If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted' attribute will be 'true'.
sort_by[<sort-order>]
optional, string filter
Sorts based on the specified attribute.
Supported attributes : date
Supported sort-orders : asc, desc

Example sort_by[asc] = "date"
This will sort the result based on the 'date' attribute in ascending(earliest first) order.
Filter Params
For operator usages, see the Pagination and Filtering section.
id[<operator>]
optional, string filter
Credit-note id. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in

Example id[is] = "CN_123"
id[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
id[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
id[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
id[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
id[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
customer_id[<operator>]
optional, string filter
The identifier of the customer this Credit Note belongs to. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in

Example customer_id[is] = "4gmiXbsjdm"
customer_id[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
customer_id[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
customer_id[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
subscription_id[<operator>]
optional, string filter
To filter based on subscription_id.
NOTE: Not to be used if consolidated invoicing feature is enabled.
Possible values are :
Supported operators : is, is_not, starts_with, is_present, in, not_in

Example subscription_id[is] = "4gmiXbsjdm"
subscription_id[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
subscription_id[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
subscription_id[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
subscription_id[is_present][operator]
optional, enumerated string filter
Possible values are : true, false
Supported operators :

Example
subscription_id[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
subscription_id[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
reference_invoice_id[<operator>]
optional, string filter
The identifier of the invoice against which this Credit Note is issued. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in

Example reference_invoice_id[is] = "INVOICE_876"
reference_invoice_id[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
reference_invoice_id[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
reference_invoice_id[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
reference_invoice_id[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
reference_invoice_id[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
type[<operator>]
optional, enumerated string filter
The credit note type. Possible values are : adjustment, refundable
Supported operators : is, is_not, in, not_in

Example type[is] = "adjustment"
type[is][operator]
optional, enumerated string filter
Possible values are : adjustment, refundable
Supported operators :

Example
type[is_not][operator]
optional, enumerated string filter
Possible values are : adjustment, refundable
Supported operators :

Example
type[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
type[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
reason_code[<operator>]
optional, enumerated string filter
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, fraudulent
Supported operators : is, is_not, in, not_in

Example reason_code[is] = "waiver"
reason_code[is][operator]
optional, enumerated string filter
Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulent
Supported operators :

Example
reason_code[is_not][operator]
optional, enumerated string filter
Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulent
Supported operators :

Example
reason_code[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
reason_code[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
create_reason_code[<operator>]
optional, string filter
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. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in

Example create_reason_code[is] = "Other"
create_reason_code[is][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
create_reason_code[is_not][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
create_reason_code[starts_with][operator]
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
create_reason_code[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
create_reason_code[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
status[<operator>]
optional, enumerated string filter
The credit note status. Possible values are : adjusted, refunded, refund_due, voided
Supported operators : is, is_not, in, not_in

Example status[is] = "adjusted"
status[is][operator]
optional, enumerated string filter
Possible values are : adjusted, refunded, refund_due, voided
Supported operators :

Example
status[is_not][operator]
optional, enumerated string filter
Possible values are : adjusted, refunded, refund_due, voided
Supported operators :

Example
status[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
status[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
date[<operator>]
optional, timestamp(UTC) in seconds filter
The date the Credit Note is issued. Possible values are :
Supported operators : after, before, on, between

Example date[after] = "1435054328"
date[after][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
date[before][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
date[on][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
date[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
total[<operator>]
optional, number filter
Credit Note amount in cents. Possible values are :
Supported operators : is, is_not, lt, lte, gt, gte, between

Example total[is] = "1200"
total[is][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[is_not][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[lt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[lte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[gt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[gte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
total[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
price_type[<operator>]
optional, enumerated string filter
The price type of the Credit Note. Possible values are : tax_exclusive, tax_inclusive
Supported operators : is, is_not, in, not_in

Example price_type[is] = "tax_exclusive"
price_type[is][operator]
optional, enumerated string filter
Possible values are : tax_exclusive, tax_inclusive
Supported operators :

Example
price_type[is_not][operator]
optional, enumerated string filter
Possible values are : tax_exclusive, tax_inclusive
Supported operators :

Example
price_type[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
price_type[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
amount_allocated[<operator>]
optional, number filter
The amount allocated to the invoices. Possible values are :
Supported operators : is, is_not, lt, lte, gt, gte, between

Example amount_allocated[is] = "1200"
amount_allocated[is][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[is_not][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[lt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[lte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[gt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[gte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_allocated[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
amount_refunded[<operator>]
optional, number filter
The refunds issued from this Credit Note. Possible values are :
Supported operators : is, is_not, lt, lte, gt, gte, between

Example amount_refunded[is] = "130"
amount_refunded[is][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[is_not][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[lt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[lte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[gt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[gte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_refunded[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
amount_available[<operator>]
optional, number filter
The yet to be used credits of this Credit Note. Possible values are :
Supported operators : is, is_not, lt, lte, gt, gte, between

Example amount_available[is] = "1400"
amount_available[is][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[is_not][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[lt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[lte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[gt][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[gte][operator]
optional, number filter
Possible values are :
Supported operators :

Example
amount_available[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
voided_at[<operator>]
optional, timestamp(UTC) in seconds filter
Timestamp indicating the date and time this Credit Note gets voided. Possible values are :
Supported operators : after, before, on, between

Example voided_at[after] = "1435054328"
voided_at[after][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
voided_at[before][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
voided_at[on][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
voided_at[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
updated_at[<operator>]
optional, timestamp(UTC) in seconds filter
To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28. Possible values are :
Supported operators : after, before, on, between

Example updated_at[after] = "1243545465"
updated_at[after][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[before][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[on][operator]
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
updated_at[between][operator]
optional, string filter
Possible values are :
Supported operators :

Example
channel[<operator>]
optional, enumerated string filter
The subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store
Supported operators : is, is_not, in, not_in

Example channel[is] = "APP STORE"
channel[is][operator]
optional, enumerated string filter
Possible values are : web, app_store, play_store
Supported operators :

Example
channel[is_not][operator]
optional, enumerated string filter
Possible values are : web, app_store, play_store
Supported operators :

Example
channel[in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
channel[not_in][operator]
optional, string filter
Possible values are :
Supported operators :

Example
einvoice[<operator>]
optional, enumerated string filter
Parameters for einvoice Possible values are :
Supported operators : status

Example einvoice[status] = "undefined"
einvoice[status][operator]
optional, enumerated string filter
The status of processing the e-invoice. To obtain detailed information about the current status, see message. Possible values are : scheduled, skipped, in_progress, success, failed, registered
Supported operators : is, is_not, in, not_in

Example einvoice[status][is] = "failed"
credit_note credit_note
always returned
Resource object representing credit_note
next_offset next_offset
optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

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.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__2/delete \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "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__KyVnHhSBWSyLN5v",
        "date": 1517501405,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__2",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWSyLN5v",
                "date_from": 1517501405,
                "date_to": 1517501405,
                "description": "Service Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWSyQ668",
                "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__2",
        "resource_version": 1517501405000,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517501405
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/delete

Method

comment[]
optional, string, max chars=300
Reason for deleting this credit note. This comment will be added to the associated invoice entity.
credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x
Removes a linked_tax_withheld_refunds record from the credit_note.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__1/remove_tax_withheld_refund \
     -u {site_api_key}:\
     -d tax_withheld[id]="tax_wh___test__8astRSmw2zLr24"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "allocations": [],
        "amount_allocated": 0,
        "amount_available": 200,
        "amount_refunded": 800,
        "base_currency_code": "USD",
        "channel": "web",
        "create_reason_code": "Other",
        "currency_code": "USD",
        "customer_id": "__test__8astRSmw2z1q1j",
        "date": 1517475512,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "generated_at": 1517475512,
        "id": "__demo_cn__1",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 1000,
                "customer_id": "__test__8astRSmw2z1q1j",
                "date_from": 1517475512,
                "date_to": 1517475512,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__8astRSmw2zMR26",
                "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": 1000
            },
            {..}
        ],
        "linked_refunds": [
            {
                "applied_amount": 800,
                "applied_at": 1517475512,
                "txn_amount": 800,
                "txn_date": 1517475512,
                "txn_id": "txn___test__8astRSmw2zLp23",
                "txn_status": "success"
            },
            {..}
        ],
        "object": "credit_note",
        "price_type": "tax_exclusive",
        "reason_code": "other",
        "reference_invoice_id": "__demo_inv__1",
        "resource_version": 1517475512664,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 1000,
        "taxes": [],
        "total": 1000,
        "type": "refundable",
        "updated_at": 1517475512
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/remove_tax_withheld_refund

Method

tax_withheld[id]
required, string, max chars=40
credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x
Resend failed einvoice in credit notes.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__1/resend_einvoice \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "id": "__demo_cn__1",
        "customer_id": "customer",
        "reference_invoice_id": "__demo_inv__1",
        "type": "refundable",
        "reason_code": "other",
        "status": "refund_due",
        "date": 1624442701,
        "price_type": "tax_exclusive",
        "exchange_rate": 1,
        "total": 1000,
        "amount_allocated": 0,
        "amount_refunded": 0,
        "amount_available": 1000,
        "generated_at": 1624442701,
        "updated_at": 1624442701,
        "channel": "web",
        "resource_version": 1624442701287,
        "deleted": false,
        "object": "credit_note",
        "create_reason_code": "Other",
        "currency_code": "USD",
        "round_off_amount": 0,
        "fractional_correction": 0,
        "is_digital": true,
        "base_currency_code": "USD",
        "sub_total": 840,
        "einvoice": {
            "id": "HmaT0avT2mtbTL3mR",
            "status": "scheduled",
            "message": "E-invoice sending is scheduled and not yet processed.",
            "object": "einvoice"
        },
        "line_items": [
            {
                "id": "li_B1hE1ST2y3hHT3sV",
                "date_from": 1624442701,
                "date_to": 1624442701,
                "unit_amount": 840,
                "quantity": 1,
                "amount": 840,
                "pricing_model": "flat_fee",
                "is_taxed": true,
                "tax_amount": 160,
                "tax_rate": 19,
                "object": "line_item",
                "customer_id": "customer",
                "description": "none",
                "entity_type": "adhoc",
                "metered": false,
                "discount_amount": 0,
                "item_level_discount_amount": 0
            },
            {..}
        ],
        "taxes": [
            {
                "object": "tax",
                "name": "VAT",
                "description": "VAT @ 19%",
                "amount": 160
            },
            {..}
        ],
        "line_item_taxes": [
            {
                "tax_name": "VAT",
                "tax_rate": 19,
                "tax_juris_type": "country",
                "tax_juris_name": "Germany",
                "tax_juris_code": "DE",
                "object": "line_item_tax",
                "line_item_id": "li_B1hE1ST2y3hHT3sV",
                "tax_amount": 160,
                "is_partial_tax_applied": false,
                "taxable_amount": 840,
                "is_non_compliance_tax": false
            },
            {..}
        ],
        "line_item_discounts": [],
        "linked_refunds": [],
        "allocations": []
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/resend_einvoice

Method

credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x

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.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/__demo_cn__1/send_einvoice \
     -X POST  \
     -u {site_api_key}:
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "allocations": [],
        "amount_allocated": 0,
        "amount_available": 500,
        "amount_refunded": 0,
        "base_currency_code": "USD",
        "billing_address": {
            "first_name": "Duncan",
            "last_name": "Walpole",
            "object": "billing_address",
            "validation_status": "not_validated"
        },
        "channel": "web",
        "create_reason_code": "Product Unsatisfactory",
        "currency_code": "USD",
        "customer_id": "__test__8astSTVO2Rag1",
        "customer_notes": "Products were returned because they were defective",
        "date": 1517504571,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "generated_at": 1517504571,
        "id": "__demo_cn__1",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "einvoice": {
            "id": "HmaT0avT2mtbTL3mR",
            "status": "scheduled",
            "message": "E-invoice sending is scheduled and not yet processed.",
            "object": "einvoice"
        },
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__8astSTVO2Rag1",
                "date_from": 1517504571,
                "date_to": 1517504571,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__8astSTVO2TPdG",
                "is_taxed": false,
                "item_level_discount_amount": 0,
                "object": "line_item",
                "pricing_model": "flat_fee",
                "quantity": 1,
                "reference_line_item_id": "li___test__8astSTVO2SsQ9",
                "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": 1517504571791,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517504571
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/{credit-note-id}/send_einvoice

Method

credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x
Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice.
This API is not enabled for live sites by default. Please contact support to get this enabled.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/credit_notes/import_credit_note \
     -u {site_api_key}:\
     -d id="old_cn_001" \
     -d customer_id="__test__XpbBxQiS4HD1nWYL" \
     -d subscription_id="__test__XpbBxQiS4HD1nWYL" \
     -d date=1517429430 \
     -d total=4900 \
     -d status="REFUND_DUE" \
     -d line_items[date_from][1]=1517429430 \
     -d line_items[date_to][1]=1519848630 \
     -d line_items[description][1]="Support Charge" \
     -d line_items[unit_amount][1]=4900 \
     -d line_items[quantity][1]=1 \
     -d line_items[entity_type][1]="PLAN" \
     -d line_items[entity_id][1]="plan1" 
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "credit_note": {
        "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__KyVnHhSBWT0XH7a",
        "date": 1517501414,
        "deleted": false,
        "exchange_rate": 1,
        "fractional_correction": 0,
        "id": "__demo_cn__7",
        "line_item_discounts": [],
        "line_item_taxes": [],
        "line_items": [
            {
                "amount": 500,
                "customer_id": "__test__KyVnHhSBWT0XH7a",
                "date_from": 1517501414,
                "date_to": 1517501414,
                "description": "Support Charge",
                "discount_amount": 0,
                "entity_type": "adhoc",
                "id": "li___test__KyVnHhSBWT0c77n",
                "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__7",
        "resource_version": 1517501414000,
        "round_off_amount": 0,
        "status": "refund_due",
        "sub_total": 500,
        "taxes": [],
        "total": 500,
        "type": "refundable",
        "updated_at": 1517501414
    }
}

URL Format POST

https://{site}.chargebee.com/api/v2/credit_notes/import_credit_note

Method

id[]
required, string, max chars=50
Credit Note Number.
customer_id[]
optional, string, max chars=50
This identifies the customer for whom the credit note needs to be created.
subscription_id[]
optional, string, max chars=50
The identifier of the subscription for which this credit note needs to be created.
reference_invoice_id[]
required, string, max chars=50
The identifier of the invoice against which this Credit Note is issued.
type[]
required, enumerated string
The credit note type.
Possible values are
adjustmentAdjustment Credit NoterefundableRefundable Credit Note
Show all values[+]
currency_code[]
required if Multicurrency is enabled, string, max chars=3
The currency code (ISO 4217 format) for the credit note.
create_reason_code[]
required, 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.
date[]
required, timestamp(UTC) in seconds
The date the Credit Note is issued.
status[]
optional, enumerated string
The credit note status.
Possible values are
adjustedWhen the Credit Note has been adjusted against an invoice.refundedWhen the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded).refund_dueWhen the credits are yet to be used, or have been partially used.voidedWhen the Credit Note has been cancelled.
Show all values[+]
total[]
optional, in cents, default=0, min=0
Credit Note amount in cents.
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.
sub_total[]
optional, in cents, min=0
The Credit Note sub-total.
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.
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.
line_items[reference_line_item_id][0..n]
optional, string, max chars=40
line_items[id][0..n]
optional, string, max chars=40
line_items[date_from][0..n]
optional, timestamp(UTC) in seconds
line_items[date_to][0..n]
optional, timestamp(UTC) in seconds
line_items[subscription_id][0..n]
optional, string, max chars=50
line_items[description][0..n]
required, string, max chars=250
line_items[unit_amount][0..n]
optional, in cents
line_items[quantity][0..n]
optional, integer, default=1
line_items[amount][0..n]
optional, in cents
line_items[unit_amount_in_decimal][0..n]
optional, string, max chars=39
line_items[quantity_in_decimal][0..n]
optional, string, max chars=33
line_items[amount_in_decimal][0..n]
optional, string, max chars=39
line_items[entity_type][0..n]
optional, enumerated string
Possible values are
adhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this caseplan_item_priceIndicates that this line item is based on plan Item Priceaddon_item_priceIndicates that this line item is based on addon Item Pricecharge_item_priceIndicates that this line item is based on charge Item Price
Show all values[+]
line_items[entity_id][0..n]
optional, string, max chars=100
line_items[item_level_discount1_entity_id][0..n]
optional, string, max chars=100
line_items[item_level_discount1_amount][0..n]
optional, in cents, min=0
line_items[item_level_discount2_entity_id][0..n]
optional, string, max chars=100
line_items[item_level_discount2_amount][0..n]
optional, in cents, min=0
line_items[tax1_name][0..n]
optional, string, max chars=50
line_items[tax1_amount][0..n]
optional, in cents, min=0
line_items[tax2_name][0..n]
optional, string, max chars=50
line_items[tax2_amount][0..n]
optional, in cents, min=0
line_items[tax3_name][0..n]
optional, string, max chars=50
line_items[tax3_amount][0..n]
optional, in cents, min=0
line_items[tax4_name][0..n]
optional, string, max chars=50
line_items[tax4_amount][0..n]
optional, in cents, min=0
line_items[tax5_name][0..n]
optional, string, max chars=50
line_items[tax5_amount][0..n]
optional, in cents, min=0
line_items[tax6_name][0..n]
optional, string, max chars=50
line_items[tax6_amount][0..n]
optional, in cents, min=0
line_items[tax7_name][0..n]
optional, string, max chars=50
line_items[tax7_amount][0..n]
optional, in cents, min=0
line_items[tax8_name][0..n]
optional, string, max chars=50
line_items[tax8_amount][0..n]
optional, in cents, min=0
line_items[tax9_name][0..n]
optional, string, max chars=50
line_items[tax9_amount][0..n]
optional, in cents, min=0
line_items[tax10_name][0..n]
optional, string, max chars=50
line_items[tax10_amount][0..n]
optional, in cents, min=0
line_item_tiers[line_item_id][0..n]
required, string, max chars=40
line_item_tiers[starting_unit][0..n]
optional, integer, min=0
line_item_tiers[ending_unit][0..n]
optional, integer
line_item_tiers[quantity_used][0..n]
optional, integer, min=0
line_item_tiers[unit_amount][0..n]
optional, in cents, min=0
line_item_tiers[starting_unit_in_decimal][0..n]
optional, string, max chars=33
line_item_tiers[ending_unit_in_decimal][0..n]
optional, string, max chars=33
line_item_tiers[quantity_used_in_decimal][0..n]
optional, string, max chars=33
line_item_tiers[unit_amount_in_decimal][0..n]
optional, string, max chars=40
discounts[line_item_id][0..n]
optional, string, max chars=40
discounts[entity_type][0..n]
required, enumerated string
Possible values are
item_level_couponThe deduction is due to a coupon applied to line item. The coupon id is passed as entity_id.document_level_couponThe deduction is due to a coupon applied to the invoice sub_total. The coupon id is passed as entity_id.promotional_creditsThe deduction is due to a promotional credit applied to the invoice.item_level_discountThe deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id.
Show all values[+]
discounts[entity_id][0..n]
optional, string, max chars=100
discounts[description][0..n]
optional, string, max chars=250
discounts[amount][0..n]
required, in cents, min=0
taxes[name][0..n]
required, string, max chars=100
taxes[rate][0..n]
required, double, default=0.0, min=0.0, max=100.0
taxes[amount][0..n]
optional, in cents, min=0
taxes[description][0..n]
optional, string, max chars=50
taxes[juris_type][0..n]
optional, enumerated string, default=other
Possible values are
countryThe tax jurisdiction is a countryfederalThe tax jurisdiction is a federalstateThe tax jurisdiction is a statecountyThe tax jurisdiction is a county
Show all values[+]
taxes[juris_name][0..n]
optional, string, max chars=250
taxes[juris_code][0..n]
optional, string, max chars=250
allocations[invoice_id][0..n]
required, string, max chars=50
allocations[allocated_amount][0..n]
required, in cents, min=1
allocations[allocated_at][0..n]
required, timestamp(UTC) in seconds
linked_refunds[amount][0..n]
required, in cents, min=1
linked_refunds[payment_method][0..n]
required, enumerated string
Possible values are
cashCashcheckCheckbank_transferBank TransferotherPayment Methods other than the above types
Show all values[+]
linked_refunds[date][0..n]
required, timestamp(UTC) in seconds
linked_refunds[reference_number][0..n]
optional, string, min chars=1, max chars=100
credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

https://{site}.chargebee.com/admin-console/credit_notes/123x