Creates a credit note for the specified invoice.
Impacts
Invoice
Credit note
- A new credit note of the specified
typeis created. - If the credit note
typeisadjustment:totalandamount_allocatedare set to the adjusted amount.statusis set toadjusted.
- If the credit note
typeisrefundableorstore:totalandamount_availableare set to the refundable amount.statusis set torefund_due.
- The
taxes[].amountandline_item_taxes[].tax_amountare set to the corresponding values on the invoice, prorated by the ratio ofcredit_note.totaltoinvoice.total.
Sample Request
Sample Result[JSON]
URL Format
Input Parameters
The identifier of the invoice against which this credit note is issued.
Required when
typeisadjustmentorstore.
Note
When not provided and type is refundable, then customer_id must be provided because this creates a standalone credit note.
The identifier of the customer for whom this credit note is issued.
Required when
typeisrefundableandreference_invoice_idis not provided. This creates a standalone credit note.
The total credit note amount.
Constraints
- Pass either the
totalorline_itemsparameter. - If
typeisadjustment,totalmust not exceed the amount due on the invoice minus the total amount of any transactions in progress for the invoice. Calculate this asinvoice.amount_dueminus the sum ofinvoice.linked_payments[i].amountwhereinvoice.linked_payments[i].txn_statusisin_progress. - If
typeisrefundableorstore:- If
reference_invoice_idis provided,totalmust not exceed the refundable amount on the invoice. Calculate the refundable amount as the sum of:- Sum of
linked_payments[i].amountwherelinked_payments[i].txn_statusissuccess - Sum of
applied_credits[i].applied_amountwhereapplied_credits[i].statusis notvoided - Sum of
linked_taxes_withheld[].amount - Minus the sum of
issued_credit_notes[i].cn_totalwhereissued_credit_notes[i].statusis notvoided
- Sum of
- If
reference_invoice_idis not provided, there is no limit on thetotalbecause this creates a standalone credit note.
- If
The type of credit note to create.
Prerequisites
- If
typeisadjustment, theinvoice.statusmust bepayment_due,postedornot_paid. - If
typeisrefundableorstore, theinvoice.statusmust bepaid,payment_due,posted, ornot_paid.
Creates an adjustment credit note.
Prerequisites
- The
invoice.statusmust bepayment_due,postedornot_paid.
Creates a refundable credit note.
Prerequisites
- The
invoice.statusmust bepaid,payment_due,posted, ornot_paid.
Creates a store credit note.
Prerequisites
- The
invoice.statusmust bepaid,payment_due,posted, ornot_paid.
The reason for issuing this Credit Note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead].
Product Unsatisfactory
Service Unsatisfactory
Order Change
Order Cancellation
Waiver
Can be set when none of the above reason codes are applicable
Reason code for creating the credit note.
Constraints
- Must be one of the case-sensitive reason codes set in Chargebee Billing.
Required when
- Reason codes are configured as mandatory on the site.
A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the Credit Note PDF .
An internal comment to be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Credit Note PDF .