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.

Credit Note Types

Credit notes in Chargebee are categorized into three types:

1. adjustment: Adjustment credit notes are used to adjust the amount of an existing invoice in the payment_due or not_paid status. Use this type of credit note to reduce the invoice amount, typically as a discount to the customer.
Adjustment credit notes are automatically created in the following cases:

  • When an invoice is written off.
  • When a subscription is modified with proration enabled, and the invoice for the current term is in the payment_due or not_paid status.

2. refundable: Refundable credit notes allow you to return a certain amount to the customer. These credits can be:

  • Retained for automatic application on future invoices.
  • Applied to existing unpaid invoices.
  • Refunded to the customer.

Refundable credit notes are automatically created in the following cases:

  • When an invoice is refunded.
  • When a subscription is changed or canceled with proration enabled, the invoice for the current term is in the paid status. Refundable credits are applied to future invoices or can be refunded to the original payment method.

3. store: Store credit notes are created for paid or partially_paid invoice status during subscription changes, such as upgrades, downgrades, or cancellations.

Key characteristics of store credits:

  • No tax component is included at the time of creation.
  • A credit note document is generated, similar to refundable credits.
  • Store credits are applied before tax calculations on future invoices.
Note: If you have enabled consolidated invoicing, to know the subscriptions attached with a credit note you have to refer line_item's subscription_id. The credit note's subscription_id should not be used (which will be null if the credit note has lines from multiple subscriptions).

Sample credit 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

ChargeBee.Models.CreditNote
Id
string, max chars=50
Credit-note id.
CustomerId
string, max chars=50
The identifier of the customer this Credit Note belongs to.
SubscriptionId
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).

ReferenceInvoiceId
optional, string, max chars=50
The identifier of the invoice against which this Credit Note is issued
Type
enumerated string
The credit note type. Learn more about credit note types.
Possible values are
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
Show all values[+]
ReasonCode
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
WriteOffThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.SubscriptionChangeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabledSubscriptionCancellationThis reason will be set automatically for Credit Notes created during cancel subscription operationSubscriptionPauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.ChargebackCan be set when you are recording your customer ChargebacksProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder CancellationWaiverWaiverOtherCan be set when none of the above reason codes are applicableFraudulentFRAUDULENT
WriteOffThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.SubscriptionChangeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabledSubscriptionCancellationThis reason will be set automatically for Credit Notes created during cancel subscription operationSubscriptionPauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.
ChargebackCan be set when you are recording your customer ChargebacksProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder CancellationWaiverWaiverOtherCan be set when none of the above reason codes are applicableFraudulentFRAUDULENT
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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
Show all values[+]
VatNumber
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.
PriceType
enumerated string, default=tax_exclusive
The price type of the Credit Note.
Possible values are
TaxExclusiveAll amounts in the document are exclusive of tax.TaxInclusiveAll amounts in the document are inclusive of tax.
TaxExclusiveAll amounts in the document are exclusive of tax.TaxInclusiveAll amounts in the document are inclusive of tax.
Show all values[+]
CurrencyCode
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.
AmountAllocated
optional, in cents, default=0, min=0
The amount allocated to the invoices.
AmountRefunded
optional, in cents, default=0, min=0
The refunds issued from this Credit Note.
AmountAvailable
optional, in cents, default=0, min=0
The yet to be used credits of this Credit Note.
RefundedAt
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.
VoidedAt
optional, timestamp(UTC) in seconds
Timestamp indicating the date and time this Credit Note gets voided.
GeneratedAt
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.
ResourceVersion
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.
UpdatedAt
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.AppStoreThe 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.PlayStoreThe 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.
WebThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.AppStoreThe 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.PlayStoreThe 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[+]
SubTotal
in cents, min=0
The Credit Note sub-total
SubTotalInLocalCurrency
optional, in cents, min=0
Invoice subtotal in the currency of the place of supply.
TotalInLocalCurrency
optional, in cents, min=0
Total invoice amount in the currency of the place of supply.
LocalCurrencyCode
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.
RoundOffAmount
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.
FractionalCorrection
optional, in cents, min=-50000, max=50000
Indicates the fractional correction amount.
Deleted
boolean
Indicates that this resource has been deleted.
TaxCategory
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.
LocalCurrencyExchangeRate
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.
CreateReasonCode
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
VatNumberPrefix
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.

BusinessEntityId
optional, string, max chars=50
The unique ID of the business entity of this credit_note. This is always the same as the business entity of the invoice referred to by reference_invoice_id.
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
LineItemDiscounts
Show attributes [+]
optional, list of line_item_discount
The list of discount(s) applied for each line item of this invoice.
LineItemTiers
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
LineItemTaxes
Show attributes [+]
optional, list of line_item_tax
The list of taxes applied on line items
LinkedRefunds
Show attributes [+]
optional, list of credit_note_transaction
Payment Refunds issued from this Credit Note
LinkedTaxWithheldRefunds
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.
ShippingAddress
Show attributes [+]
optional, shipping_address
Shipping address for the quote.
BillingAddress
Show attributes [+]
optional, billing_address
Billing address for the quote.
SiteDetailsAtCreation
Show attributes [+]
optional, site_details_at_creation
It contains site-specific information, including timezone and organisational address.
optional, tax_origin
contains information about the tax details which is applied on the invoice.
LineItemAddresses
Show attributes [+]
optional, list of line_item_address
The list of addresses used for tax calculation on line items.
Id Id
string, max chars=50
Credit-note id.
CustomerId CustomerId
string, max chars=50
The identifier of the customer this Credit Note belongs to.
SubscriptionId SubscriptionId
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).

ReferenceInvoiceId ReferenceInvoiceId
optional, string, max chars=50
The identifier of the invoice against which this Credit Note is issued
Type Type
enumerated string
The credit note type. Learn more about credit note types.
Possible values are
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
Show all values[+]
ReasonCode ReasonCode
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
WriteOffThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.SubscriptionChangeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabledSubscriptionCancellationThis reason will be set automatically for Credit Notes created during cancel subscription operationSubscriptionPauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.ChargebackCan be set when you are recording your customer ChargebacksProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder CancellationWaiverWaiverOtherCan be set when none of the above reason codes are applicableFraudulentFRAUDULENT
WriteOffThis reason will be set automatically for the Credit Notes created during invoice Write Off operation.SubscriptionChangeThis reason will be set automatically for Credit Notes created during Change Subscription operation when proration is enabledSubscriptionCancellationThis reason will be set automatically for Credit Notes created during cancel subscription operationSubscriptionPauseThis reason will be automatically set to credit notes created during pause/resume subscription operation.
ChargebackCan be set when you are recording your customer ChargebacksProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder CancellationWaiverWaiverOtherCan be set when none of the above reason codes are applicableFraudulentFRAUDULENT
Show all values[+]
Status 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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
Show all values[+]
VatNumber VatNumber
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.
PriceType PriceType
enumerated string, default=tax_exclusive
The price type of the Credit Note.
Possible values are
TaxExclusiveAll amounts in the document are exclusive of tax.TaxInclusiveAll amounts in the document are inclusive of tax.
TaxExclusiveAll amounts in the document are exclusive of tax.TaxInclusiveAll amounts in the document are inclusive of tax.
Show all values[+]
CurrencyCode CurrencyCode
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.
AmountAllocated AmountAllocated
optional, in cents, default=0, min=0
The amount allocated to the invoices.
AmountRefunded AmountRefunded
optional, in cents, default=0, min=0
The refunds issued from this Credit Note.
AmountAvailable AmountAvailable
optional, in cents, default=0, min=0
The yet to be used credits of this Credit Note.
RefundedAt RefundedAt
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.
VoidedAt VoidedAt
optional, timestamp(UTC) in seconds
Timestamp indicating the date and time this Credit Note gets voided.
GeneratedAt GeneratedAt
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.
ResourceVersion ResourceVersion
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.
UpdatedAt UpdatedAt
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.
Possible values are
WebThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.AppStoreThe 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.PlayStoreThe 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.
WebThe object was created (and is maintained) for the web channel directly in Chargebee via API or UI.AppStoreThe 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.PlayStoreThe 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[+]
SubTotal SubTotal
in cents, min=0
The Credit Note sub-total
SubTotalInLocalCurrency SubTotalInLocalCurrency
optional, in cents, min=0
Invoice subtotal in the currency of the place of supply.
TotalInLocalCurrency TotalInLocalCurrency
optional, in cents, min=0
Total invoice amount in the currency of the place of supply.
LocalCurrencyCode LocalCurrencyCode
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.
RoundOffAmount RoundOffAmount
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.
FractionalCorrection FractionalCorrection
optional, in cents, min=-50000, max=50000
Indicates the fractional correction amount.
Deleted Deleted
boolean
Indicates that this resource has been deleted.
TaxCategory TaxCategory
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.
LocalCurrencyExchangeRate LocalCurrencyExchangeRate
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.
CreateReasonCode CreateReasonCode
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
VatNumberPrefix VatNumberPrefix
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.

BusinessEntityId BusinessEntityId
optional, string, max chars=50
The unique ID of the business entity of this credit_note. This is always the same as the business entity of the invoice referred to by reference_invoice_id.
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.
LineItems
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
LineItemDiscounts
optional, list of line_item_discount
The list of discount(s) applied for each line item of this invoice.
LineItemTiers
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
LineItemTaxes
optional, list of line_item_tax
The list of taxes applied on line items
LinkedRefunds
optional, list of credit_note_transaction
Payment Refunds issued from this Credit Note
LinkedTaxWithheldRefunds
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.
ShippingAddress
optional, shipping_address
Shipping address for the quote.
BillingAddress
optional, billing_address
Billing address for the quote.
SiteDetailsAtCreation
optional, site_details_at_creation
It contains site-specific information, including timezone and organisational address.
TaxOrigin
optional, tax_origin
contains information about the tax details which is applied on the invoice.
LineItemAddresses
optional, list of line_item_address
The list of addresses used for tax calculation on line items.

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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Create()
		.ReferenceInvoiceId("__demo_inv__1")
		.Total(500)
		.Type(TypeEnum.Refundable)
		.ReasonCode(ReasonCodeEnum.ProductUnsatisfactory)
		.CustomerNotes("Products were returned because they were defective")
		.Request();

CreditNote creditNote = result.CreditNote;
Invoice invoice = result.Invoice;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Create()
		.ReferenceInvoiceId("__demo_inv__1")
		.Total(500)
		.Type(TypeEnum.Refundable)
		.ReasonCode(ReasonCodeEnum.ProductUnsatisfactory)
		.CustomerNotes("Products were returned because they were defective")
		.Request();

CreditNote creditNote = result.CreditNote;
Invoice invoice = result.Invoice;

Sample Result [ 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

CreditNote.Create()
ReferenceInvoiceId[(val)](val)
optional, string, max chars=50
The identifier of the invoice against which this Credit Note is issued.
CustomerId[(val)](val)
optional, string, max chars=50
Total[(val)](val)
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[(val)](val)
required, enumerated string
The credit note type. Learn more about credit note types.
Possible values are
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
Show all values[+]
ReasonCode[(val)](val)
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
ProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder CancellationWaiverWaiverOtherCan be set when none of the above reason codes are applicable
ProductUnsatisfactoryProduct UnsatisfactoryServiceUnsatisfactoryService UnsatisfactoryOrderChangeOrder ChangeOrderCancellationOrder Cancellation
WaiverWaiverOtherCan be set when none of the above reason codes are applicable
Show all values[+]
CreateReasonCode[(val)](val)
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[(val)](val)
optional, timestamp(UTC) in seconds
The date the Credit Note is issued.
CustomerNotes[(val)](val)
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.
CurrencyCode[(val)](val)
required if Multicurrency is enabled, string, max chars=3
Comment[(val)](val)
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.
LineItemReferenceLineItemId(idx,val)
optional, string, max chars=40
Uniquely identifies a line_item
LineItemUnitAmount(idx,val)
optional, in cents
Unit amount of the line item. Required for FLAT_FEE, PER_UNIT and VOLUME pricing model.
LineItemUnitAmountInDecimal(idx,val)
optional, string, max chars=39
The decimal representation of the unit amount of the line_item. The value is in major units of the currency. Applicable for the line_item when the pricing_model is flat_fee, per_unit or volume. Can be provided only when multi-decimal pricing is enabled.
LineItemQuantity(idx,val)
optional, integer, default=1
Quantity of the line item. Required for PER_UNIT and VOLUME pricing model.
LineItemQuantityInDecimal(idx,val)
optional, string, max chars=33
The decimal representation of the quantity of the line_item. Applicable for the line_item when the pricing_model is per_unit and volume. Can be provided only when multi-decimal pricing is enabled.
LineItemAmount(idx,val)
optional, in cents
Amount of the line item. Applicable only for STAIRSTEP, TIERED pricing_model.
LineItemDateFrom(idx,val)
optional, timestamp(UTC) in seconds
Start date of this line item.
LineItemDateTo(idx,val)
optional, timestamp(UTC) in seconds
End date of this line item.
LineItemDescription(idx,val)
optional, string, max chars=250
Description for the line item.
LineItemEntityType(idx,val)
optional, enumerated string
null
Possible values are
AdhocPlanItemPriceAddonItemPriceChargeItemPrice
AdhocPlanItemPriceAddonItemPriceChargeItemPrice
Show all values[+]
LineItemEntityId(idx,val)
optional, string, max chars=100
credit_note credit_note
always returned
Resource object representing credit_note
invoice invoice
optional
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Retrieve("__demo_cn__7").Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Retrieve("__demo_cn__7").Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.Retrieve(<credit_note_id>)
LineItemsLimit[(val)](val)
optional, integer, default=100, min=1, max=300
LineItemsOffset[(val)](val)
optional, string, max chars=1000
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Pdf("__demo_cn__4").Request();

Download download = result.Download;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Pdf("__demo_cn__4").Request();

Download download = result.Download;

Sample Result [ 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

CreditNote.Pdf(<credit_note_id>)
DispositionType[(val)](val)
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
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.DownloadEinvoice("__demo_cn__1").Request();

List&lt;Download&gt; downloads = result.Downloads;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.DownloadEinvoice("__demo_cn__1").Request();

List<Download> downloads = result.Downloads;

Sample Result [ 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

CreditNote.DownloadEinvoice(<credit_note_id>)
downloads downloads
always returned
Resource object representing download

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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Refund("__demo_cn__6")
		.CustomerNotes("Refunding as customer canceled the order.")
		.RefundAmount(1000)
		.Request();

CreditNote creditNote = result.CreditNote;
Transaction transaction = result.Transaction;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Refund("__demo_cn__6")
		.CustomerNotes("Refunding as customer canceled the order.")
		.RefundAmount(1000)
		.Request();

CreditNote creditNote = result.CreditNote;
Transaction transaction = result.Transaction;

Sample Result [ 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

CreditNote.Refund(<credit_note_id>)
RefundAmount[(val)](val)
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.
CustomerNotes[(val)](val)
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.
RefundReasonCode[(val)](val)
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
using ChargeBee.Models.Enums;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.RecordRefund("__demo_cn__5")
		.Comment("Refunding as customer canceled the order.")
		.TransactionAmount(100)
		.TransactionPaymentMethod(PaymentMethodEnum.BankTransfer)
		.TransactionDate(1517501412)
		.Request();

CreditNote creditNote = result.CreditNote;
Transaction transaction = result.Transaction;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
using ChargeBee.Models.Enums;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.RecordRefund("__demo_cn__5")
		.Comment("Refunding as customer canceled the order.")
		.TransactionAmount(100)
		.TransactionPaymentMethod(PaymentMethodEnum.BankTransfer)
		.TransactionDate(1517501412)
		.Request();

CreditNote creditNote = result.CreditNote;
Transaction transaction = result.Transaction;

Sample Result [ 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

CreditNote.RecordRefund(<credit_note_id>)
RefundReasonCode[(val)](val)
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[(val)](val)
optional, string, max chars=300
Remarks, if any, on the refund.
TransactionAmount(val)
optional, in cents, min=0
The amount to be refunded (for online payments) or recorded as refunded (for offline payments). If not specified, the entire refundable amount for this credit_note is refunded. Note: Any linked_tax_withheld_refunds associated with the credit_note can also be recorded as refunded via this operation.
TransactionPaymentMethod(val)
required, enumerated string
The payment method of this transaction
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.BankTransferBank TransferOtherPayment Methods other than the above typesCustomCustom
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.BankTransferBank Transfer
OtherPayment Methods other than the above typesCustomCustom
Show all values[+]
TransactionReferenceNumber(val)
optional, string, max chars=100
The reference number for this transaction. For example, the check number when payment_method = check.
TransactionCustomPaymentMethodId(val)
optional, string, max chars=50
Identifier of the custom payment method of this transaction.
TransactionDate(val)
required, timestamp(UTC) in seconds
Indicates when this transaction occurred.
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.VoidCreditNote("__demo_cn__8").Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.VoidCreditNote("__demo_cn__8").Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.VoidCreditNote(<credit_note_id>)
Comment[(val)](val)
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
ListResult result = CreditNote.List()
		.Limit(3)
		.Type().Is("refundable")
		.SortByDate(SortOrderEnum.Asc)
		.Request();

foreach (var item in result.List){
  CreditNote creditNote = item.CreditNote;
}

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
ListResult result = CreditNote.List()
		.Limit(3)
		.Type().Is("refundable")
		.SortByDate(SortOrderEnum.Asc)
		.Request();

foreach (var item in result.List){
  CreditNote creditNote = item.CreditNote;
}

Sample Result [ 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

CreditNote.List()
Limit[(val)](val)
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
Offset[(val)](val)
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.
IncludeDeleted[(val)](val)
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'.
SortBy<attribute>(<sort-order>)
optional, string filter
Sorts based on the specified attribute.
Supported attributes : Date
Supported sort-orders : SortOrderEnum.Asc, SortOrderEnum.Desc

Example SortByDate(SortOrderEnum.Asc)
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>(val)
optional, string filter
Credit-note id. Possible values are :
Supported operators : Is, IsNot, StartsWith, In, NotIn

Example Id().Is(CN_123)
IdIs().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
IdIsNot().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
IdStartsWith().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
IdIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
IdNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
CustomerId().<operator>(val)
optional, string filter
The identifier of the customer this Credit Note belongs to. Possible values are :
Supported operators : Is, IsNot, StartsWith, In, NotIn

Example CustomerId().Is(4gmiXbsjdm)
CustomerIdIs().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CustomerIdIsNot().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CustomerIdStartsWith().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CustomerIdIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
CustomerIdNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
SubscriptionId().<operator>(val)
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, IsNot, StartsWith, IsPresent, In, NotIn

Example SubscriptionId().Is(4gmiXbsjdm)
SubscriptionIdIs().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
SubscriptionIdIsNot().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
SubscriptionIdStartsWith().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
SubscriptionIdIsPresent().<operator>(val)
optional, enumerated string filter
Possible values are : true, false
Supported operators :

Example
SubscriptionIdIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
SubscriptionIdNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
ReferenceInvoiceId().<operator>(val)
optional, string filter
The identifier of the invoice against which this Credit Note is issued. Possible values are :
Supported operators : Is, IsNot, StartsWith, IsPresent, In, NotIn

Example ReferenceInvoiceId().Is(INVOICE_876)
ReferenceInvoiceIdIs().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
ReferenceInvoiceIdIsNot().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
ReferenceInvoiceIdStartsWith().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
ReferenceInvoiceIdIsPresent().<operator>(val)
optional, enumerated string filter
Possible values are : true, false
Supported operators :

Example
ReferenceInvoiceIdIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
ReferenceInvoiceIdNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Type().<operator>(val)
optional, enumerated string filter
The credit note type. Possible values are : Adjustment, Refundable, Store
Supported operators : Is, IsNot, In, NotIn

Example Type().Is(adjustment)
TypeIs().<operator>(val)
optional, enumerated string filter
Possible values are : Adjustment, Refundable, Store
Supported operators :

Example
TypeIsNot().<operator>(val)
optional, enumerated string filter
Possible values are : adjustment, refundable, store
Supported operators :

Example
TypeIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
TypeNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
ReasonCode().<operator>(val)
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 : WriteOff, SubscriptionChange, SubscriptionCancellation, SubscriptionPause, Chargeback, ProductUnsatisfactory, ServiceUnsatisfactory, OrderChange, OrderCancellation, Waiver, Other, Fraudulent
Supported operators : Is, IsNot, In, NotIn

Example ReasonCode().Is(waiver)
ReasonCodeIs().<operator>(val)
optional, enumerated string filter
Possible values are : WriteOff, SubscriptionChange, SubscriptionCancellation, SubscriptionPause, Chargeback, ProductUnsatisfactory, ServiceUnsatisfactory, OrderChange, OrderCancellation, Waiver, Other, Fraudulent
Supported operators :

Example
ReasonCodeIsNot().<operator>(val)
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
ReasonCodeIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
ReasonCodeNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
CreateReasonCode().<operator>(val)
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, IsNot, StartsWith, In, NotIn

Example CreateReasonCode().Is(Other)
CreateReasonCodeIs().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CreateReasonCodeIsNot().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CreateReasonCodeStartsWith().<operator>(val)
optional, string, min chars=1 filter
Possible values are :
Supported operators :

Example
CreateReasonCodeIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
CreateReasonCodeNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Status().<operator>(val)
optional, enumerated string filter
The credit note status. Possible values are : Adjusted, Refunded, RefundDue, Voided
Supported operators : Is, IsNot, In, NotIn

Example Status().Is(adjusted)
StatusIs().<operator>(val)
optional, enumerated string filter
Possible values are : Adjusted, Refunded, RefundDue, Voided
Supported operators :

Example
StatusIsNot().<operator>(val)
optional, enumerated string filter
Possible values are : adjusted, refunded, refund_due, voided
Supported operators :

Example
StatusIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
StatusNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Date().<operator>(val)
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)
DateAfter().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
DateBefore().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
DateOn().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
DateBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Total().<operator>(val)
optional, number filter
Credit Note amount in cents. Possible values are :
Supported operators : Is, IsNot, Lt, Lte, Gt, Gte, Between

Example Total().Is(1200)
TotalIs().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalIsNot().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalLt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalLte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalGt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalGte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
TotalBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
PriceType().<operator>(val)
optional, enumerated string filter
The price type of the Credit Note. Possible values are : TaxExclusive, TaxInclusive
Supported operators : Is, IsNot, In, NotIn

Example PriceType().Is(tax_exclusive)
PriceTypeIs().<operator>(val)
optional, enumerated string filter
Possible values are : TaxExclusive, TaxInclusive
Supported operators :

Example
PriceTypeIsNot().<operator>(val)
optional, enumerated string filter
Possible values are : tax_exclusive, tax_inclusive
Supported operators :

Example
PriceTypeIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
PriceTypeNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
AmountAllocated().<operator>(val)
optional, number filter
The amount allocated to the invoices. Possible values are :
Supported operators : Is, IsNot, Lt, Lte, Gt, Gte, Between

Example AmountAllocated().Is(1200)
AmountAllocatedIs().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedIsNot().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedLt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedLte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedGt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedGte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAllocatedBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
AmountRefunded().<operator>(val)
optional, number filter
The refunds issued from this Credit Note. Possible values are :
Supported operators : Is, IsNot, Lt, Lte, Gt, Gte, Between

Example AmountRefunded().Is(130)
AmountRefundedIs().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedIsNot().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedLt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedLte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedGt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedGte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountRefundedBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
AmountAvailable().<operator>(val)
optional, number filter
The yet to be used credits of this Credit Note. Possible values are :
Supported operators : Is, IsNot, Lt, Lte, Gt, Gte, Between

Example AmountAvailable().Is(1400)
AmountAvailableIs().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableIsNot().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableLt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableLte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableGt().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableGte().<operator>(val)
optional, number filter
Possible values are :
Supported operators :

Example
AmountAvailableBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
VoidedAt().<operator>(val)
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 VoidedAt().After(1435054328)
VoidedAtAfter().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
VoidedAtBefore().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
VoidedAtOn().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
VoidedAtBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
UpdatedAt().<operator>(val)
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 UpdatedAt().After(1243545465)
UpdatedAtAfter().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
UpdatedAtBefore().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
UpdatedAtOn().<operator>(val)
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :

Example
UpdatedAtBetween().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Channel().<operator>(val)
optional, enumerated string filter
The subscription channel this object originated from and is maintained in. Possible values are : Web, AppStore, PlayStore
Supported operators : Is, IsNot, In, NotIn

Example Channel().Is(APP STORE)
ChannelIs().<operator>(val)
optional, enumerated string filter
Possible values are : Web, AppStore, PlayStore
Supported operators :

Example
ChannelIsNot().<operator>(val)
optional, enumerated string filter
Possible values are : web, app_store, play_store
Supported operators :

Example
ChannelIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
ChannelNotIn().<operator>(val)
optional, string filter
Possible values are :
Supported operators :

Example
Einvoice().<operator>(val)
optional, enumerated string filter
Parameters for einvoice Possible values are :
Supported operators : Status

Example Einvoice().Status(undefined)
EinvoiceStatus().<operator>(val)
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, IsNot, In, NotIn

Example EinvoiceStatus().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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Delete("__demo_cn__2").Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.Delete("__demo_cn__2").Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.Delete(<credit_note_id>)
Comment[(val)](val)
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.RemoveTaxWithheldRefund("__demo_cn__1")
		.TaxWithheldId("tax_wh___test__8astRSmw2zLr24")
		.Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.RemoveTaxWithheldRefund("__demo_cn__1")
		.TaxWithheldId("tax_wh___test__8astRSmw2zLr24")
		.Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.RemoveTaxWithheldRefund(<credit_note_id>)
TaxWithheldId(val)
required, string, max chars=40
An auto-generated unique identifier for the tax withheld. The value starts with the prefix tax_wh_. For example, tax_wh_16BdDXSlbu4uV1Ee6.
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.ResendEinvoice("__demo_cn__1").Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.ResendEinvoice("__demo_cn__1").Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.ResendEinvoice(<credit_note_id>)
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.SendEinvoice("__demo_cn__1").Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.SendEinvoice("__demo_cn__1").Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.SendEinvoice(<credit_note_id>)
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 Codes
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.ImportCreditNote()
		.Id("old_cn_001")
		.CustomerId("__test__XpbBxQiS4HD1nWYL")
		.SubscriptionId("__test__XpbBxQiS4HD1nWYL")
		.ReferenceInvoiceId("__demo_inv__7")
		.Type(TypeEnum.Refundable)
		.CurrencyCode("USD")
		.CreateReasonCode("Product Unsatisfactory")
		.Date(1517429430)
		.Total(4900)
		.Status(StatusEnum.RefundDue)
		.LineItemDateFrom(0,1517429430)
		.LineItemDateTo(0,1519848630)
		.LineItemDescription(0,"Support Charge")
		.LineItemUnitAmount(0,4900)
		.LineItemQuantity(0,1)
		.LineItemEntityType(0,EntityTypeEnum.PlanItemPrice)
		.LineItemEntityId(0,"plan1")
		.Request();

CreditNote creditNote = result.CreditNote;

copy
Click to Copy
 
using ChargeBee.Api;
using ChargeBee.Models;
ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = CreditNote.ImportCreditNote()
		.Id("old_cn_001")
		.CustomerId("__test__XpbBxQiS4HD1nWYL")
		.SubscriptionId("__test__XpbBxQiS4HD1nWYL")
		.ReferenceInvoiceId("__demo_inv__7")
		.Type(TypeEnum.Refundable)
		.CurrencyCode("USD")
		.CreateReasonCode("Product Unsatisfactory")
		.Date(1517429430)
		.Total(4900)
		.Status(StatusEnum.RefundDue)
		.LineItemDateFrom(0,1517429430)
		.LineItemDateTo(0,1519848630)
		.LineItemDescription(0,"Support Charge")
		.LineItemUnitAmount(0,4900)
		.LineItemQuantity(0,1)
		.LineItemEntityType(0,EntityTypeEnum.PlanItemPrice)
		.LineItemEntityId(0,"plan1")
		.Request();

CreditNote creditNote = result.CreditNote;

Sample Result [ 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

CreditNote.ImportCreditNote()
Id[(val)](val)
required, string, max chars=50
Credit Note Number.
CustomerId[(val)](val)
optional, string, max chars=50
This identifies the customer for whom the credit note needs to be created.
SubscriptionId[(val)](val)
optional, string, max chars=50
The identifier of the subscription for which this credit note needs to be created.
ReferenceInvoiceId[(val)](val)
required, string, max chars=50
The identifier of the invoice against which this Credit Note is issued.
Type[(val)](val)
required, enumerated string
The credit note type. Learn more about credit note types.
Possible values are
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
AdjustmentAdjustment Credit NoteRefundableRefundable Credit NoteStoreStore Credit Note
Show all values[+]
CurrencyCode[(val)](val)
required if Multicurrency is enabled, string, max chars=3
The currency code (ISO 4217 format) for the credit note.
CreateReasonCode[(val)](val)
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[(val)](val)
required, timestamp(UTC) in seconds
The date the Credit Note is issued.
Status[(val)](val)
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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
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).RefundDueWhen the credits are yet to be used, or have been partially used.VoidedWhen the Credit Note has been cancelled.
Show all values[+]
Total[(val)](val)
optional, in cents, default=0, min=0
Credit Note amount in cents.
RefundedAt[(val)](val)
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.
VoidedAt[(val)](val)
optional, timestamp(UTC) in seconds
Timestamp indicating the date and time this Credit Note gets voided.
SubTotal[(val)](val)
optional, in cents, min=0
The Credit Note sub-total.
RoundOffAmount[(val)](val)
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.
FractionalCorrection[(val)](val)
optional, in cents, min=-50000, max=50000
Indicates the fractional correction amount.
VatNumberPrefix[(val)](val)
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.
LineItemReferenceLineItemId(idx,val)
optional, string, max chars=40
Uniquely identifies a line_item of invoice for which this reversal represents.
LineItemId(idx,val)
optional, string, max chars=40
Uniquely identifies a line_item
LineItemDateFrom(idx,val)
optional, timestamp(UTC) in seconds
Start date of this line item.
LineItemDateTo(idx,val)
optional, timestamp(UTC) in seconds
End date of this line item.
LineItemSubscriptionId(idx,val)
optional, string, max chars=50
A unique identifier for the subscription this line item belongs to.
LineItemDescription(idx,val)
required, string, max chars=250
Description for this line item
LineItemUnitAmount(idx,val)
optional, in cents
Unit amount of the line item.
LineItemQuantity(idx,val)
optional, integer, default=1
Quantity of the recurring item which is represented by this line item. For metered line items, this value is updated from usages once when the invoice is generated as pending and finally when the invoice is closed.
Quantity of the recurring item which is represented by this line item.
LineItemAmount(idx,val)
optional, in cents
Total amount of this lineitem. Not required if the line_items[unit_amount] param is passed
LineItemUnitAmountInDecimal(idx,val)
optional, string, max chars=39
The decimal representation of the unit amount of the line_item. The value is in major units of the currency. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
LineItemQuantityInDecimal(idx,val)
optional, string, max chars=33
The decimal representation of the quantity of this line_item. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
LineItemAmountInDecimal(idx,val)
optional, string, max chars=39
The decimal representation of the amount for the line_item, in major units of the currency. Typically equals to unit_amount_in_decimal x quantity_in_decimal. Returned when multi-decimal pricing is enabled.
LineItemEntityType(idx,val)
optional, enumerated string
Specifies the modelled entity this line item is based on.
Possible values are
AdhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this casePlanItemPriceIndicates that this line item is based on plan Item PriceAddonItemPriceIndicates that this line item is based on addon Item PriceChargeItemPriceIndicates that this line item is based on charge Item Price
AdhocIndicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this casePlanItemPriceIndicates that this line item is based on plan Item PriceAddonItemPriceIndicates that this line item is based on addon Item PriceChargeItemPriceIndicates that this line item is based on charge Item Price
Show all values[+]
LineItemEntityId(idx,val)
optional, string, max chars=100
The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type
LineItemItemLevelDiscount1EntityId(idx,val)
optional, string, max chars=100
First item level discount entity id
LineItemItemLevelDiscount1Amount(idx,val)
optional, in cents, min=0
First item level discount amount
LineItemItemLevelDiscount2EntityId(idx,val)
optional, string, max chars=100
Second item level discount entity id
LineItemItemLevelDiscount2Amount(idx,val)
optional, in cents, min=0
Second item level discount amount
LineItemTax1Name(idx,val)
optional, string, max chars=50
First tax name
LineItemTax1Amount(idx,val)
optional, in cents, min=0
First tax amount
LineItemTax2Name(idx,val)
optional, string, max chars=50
Second tax name
LineItemTax2Amount(idx,val)
optional, in cents, min=0
Second tax amount
LineItemTax3Name(idx,val)
optional, string, max chars=50
Third tax name
LineItemTax3Amount(idx,val)
optional, in cents, min=0
Third tax amount
LineItemTax4Name(idx,val)
optional, string, max chars=50
Fourth tax name
LineItemTax4Amount(idx,val)
optional, in cents, min=0
Fourth tax amount
LineItemTax5Name(idx,val)
optional, string, max chars=50
Fifth tax name
LineItemTax5Amount(idx,val)
optional, in cents, min=0
Fifth tax amount
LineItemTax6Name(idx,val)
optional, string, max chars=50
Sixth tax name
LineItemTax6Amount(idx,val)
optional, in cents, min=0
Sixth tax amount
LineItemTax7Name(idx,val)
optional, string, max chars=50
Seventh tax name
LineItemTax7Amount(idx,val)
optional, in cents, min=0
Seventh tax amount
LineItemTax8Name(idx,val)
optional, string, max chars=50
Eighth tax name
LineItemTax8Amount(idx,val)
optional, in cents, min=0
Eighth tax amount
LineItemTax9Name(idx,val)
optional, string, max chars=50
Ninth tax name
LineItemTax9Amount(idx,val)
optional, in cents, min=0
Ninth tax amount
LineItemTax10Name(idx,val)
optional, string, max chars=50
Tenth tax name
LineItemTax10Amount(idx,val)
optional, in cents, min=0
Tenth tax amount
LineItemTierLineItemId(idx,val)
required, string, max chars=40
Uniquely identifies a line_item
LineItemTierStartingUnit(idx,val)
optional, integer, min=0
The lower limit of a range of units for the tier
LineItemTierEndingUnit(idx,val)
optional, integer
The upper limit of a range of units for the tier
LineItemTierQuantityUsed(idx,val)
optional, integer, min=0
The number of units purchased in a range.
LineItemTierUnitAmount(idx,val)
optional, in cents, min=0
The price of the tier if the charge model is a stairtstep pricing , or the price of each unit in the tier if the charge model is tiered/volume pricing.
LineItemTierStartingUnitInDecimal(idx,val)
optional, string, max chars=33
The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as ending_unit_in_decimal of the next lower tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
LineItemTierEndingUnitInDecimal(idx,val)
optional, string, max chars=33
The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the starting_unit_in_decimal of the next higher tier. Returned only when the line_items.pricing_model is tiered, volume or stairstep and multi-decimal pricing is enabled.
LineItemTierQuantityUsedInDecimal(idx,val)
optional, string, max chars=33
The decimal representation of the quantity purchased from this tier. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
LineItemTierUnitAmountInDecimal(idx,val)
optional, string, max chars=40
The decimal representation of the per-unit price for the tier when the pricing_model is tiered or volume. When the pricing_model is stairstep, it is the decimal representation of the total price for line_item. The value is in major units of the currency. Returned when the line_item is quantity-based and multi-decimal pricing is enabled.
DiscountLineItemId(idx,val)
optional, string, max chars=40
The unique id of the line item that this deduction is for. Is required when discounts[entity_type] is item_level_coupon or document_level_coupon.
DiscountEntityType(idx,val)
required, enumerated string
The type of deduction and the amount to which it is applied.
Possible values are
ItemLevelCouponThe deduction is due to a coupon applied to line item. The coupon id is passed as entity_id.DocumentLevelCouponThe deduction is due to a coupon applied to the invoice sub_total. The coupon id is passed as entity_id.PromotionalCreditsThe deduction is due to a promotional credit applied to the invoice.ItemLevelDiscountThe deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id. DocumentLevelDiscountThe deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
ItemLevelCouponThe deduction is due to a coupon applied to line item. The coupon id is passed as entity_id.DocumentLevelCouponThe deduction is due to a coupon applied to the invoice sub_total. The coupon id is passed as entity_id.PromotionalCreditsThe deduction is due to a promotional credit applied to the invoice.ItemLevelDiscountThe deduction is due to a discount applied to a line item of the invoice. The discount id is available as the entity_id.
DocumentLevelDiscountThe deduction is due to a discount applied to the invoice sub_total. The discount id is available as the entity_id.
Show all values[+]
DiscountEntityId(idx,val)
optional, string, max chars=100
When the deduction is due to a coupon, then this is the id of the coupon. Is required when discounts[entity_type] is item_level_coupon or document_level_coupon.
DiscountDescription(idx,val)
optional, string, max chars=250
Description for this deduction.
DiscountAmount(idx,val)
required, in cents, min=0
The amount deducted. The format of this value depends on the kind of currency.
TaxeName(idx,val)
required, string, max chars=100
The name of the tax applied
TaxeRate(idx,val)
required, double, default=0.0, min=0.0, max=100.0
The rate of tax used to calculate tax amount
TaxeAmount(idx,val)
optional, in cents, min=0
Total tax amount charged for this invoice
TaxeDescription(idx,val)
optional, string, max chars=50
Description of tax
TaxeJurisType(idx,val)
optional, enumerated string, default=other
The type of tax jurisdiction
Possible values are
CountryThe tax jurisdiction is a countryFederalThe tax jurisdiction is a federalStateThe tax jurisdiction is a stateCountyThe tax jurisdiction is a countyCityThe tax jurisdiction is a citySpecialSpecial tax jurisdiction.UnincorporatedCombined tax of state and county.OtherJurisdictions other than the ones listed above.
CountryThe tax jurisdiction is a countryFederalThe tax jurisdiction is a federalStateThe tax jurisdiction is a stateCountyThe tax jurisdiction is a county
CityThe tax jurisdiction is a citySpecialSpecial tax jurisdiction.UnincorporatedCombined tax of state and county.OtherJurisdictions other than the ones listed above.
Show all values[+]
TaxeJurisName(idx,val)
optional, string, max chars=250
The name of the tax jurisdiction
TaxeJurisCode(idx,val)
optional, string, max chars=250
The tax jurisdiction code
AllocationInvoiceId(idx,val)
required, string, max chars=50
The unique invoice ID for the allocation
AllocationAllocatedAmount(idx,val)
required, in cents, min=1
The allocated amount for the credit note
AllocationAllocatedAt(idx,val)
required, timestamp(UTC) in seconds
Time when the allocation was occurred
LinkedRefundAmount(idx,val)
required, in cents, min=1
Amount of this refund transaction.
LinkedRefundPaymentMethod(idx,val)
required, enumerated string
Mode of refund.
Possible values are
CashCashCheckCheckBankTransferBank TransferOtherPayment Methods other than the above typesCustomCustom
CashCashCheckCheckBankTransferBank TransferOtherPayment Methods other than the above types
CustomCustom
Show all values[+]
LinkedRefundDate(idx,val)
required, timestamp(UTC) in seconds
The date of refund.
LinkedRefundReferenceNumber(idx,val)
optional, string, min chars=1, max chars=100
Reference number for this refund.
credit_note credit_note
always returned
Resource object representing credit_note

Sample admin console URL

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