CreditNotes
Creates, updates, and queries a credit note to adjust an invoice's amount after the invoice is finalized.
Table-Specific Information
SELECT
The component uses the Stripe API to filter the results by the following columns and operators:
| Column | Supported Operators |
| Id | = |
| CustomerId | = |
| InvoiceId | = |
| AccountId | = |
| Created | =, >, >=, <, <= |
The rest of the filter is executed client-side within the component.
You can select from the CreditNotes table with the following queries:
SELECT * FROM CreditNotes WHERE Id = 'cn_1Pkjsdb'
SELECT * FROM CreditNotes WHERE CustomerId = 'cus_N8rO0qc7j1SJJ9'
SELECT * FROM CreditNotes WHERE InvoiceId = 'in_23341xds'
SELECT * FROM CreditNotes WHERE Created >= '2025-11-19 01:20:01.0'
INSERT
To create a new credit note, InvoiceId and (Amount or Lines or ShippingCost) are required:
INSERT INTO CreditNotes (InvoiceId, Amount, Reason, OutOfBandAmount) VALUES ('in_23341xds', 1, 'duplicate', 1)
INSERT INTO CreditNotes (InvoiceId, lines) VALUES ('in_23341xds', '{"type":"invoice_line_item","invoice_line_item": "il_123341xds","amount": 1}')
UPDATE
To modify a credit note, specify the credit note Id:
UPDATE CreditNotes SET Memo = 'new_memo' WHERE Id = 'cn_1Pkjsdb'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the credit note. | |
| Amount | Integer | False |
The integer amount in cents representing the total amount of the credit note, including tax. | |
| AmountShipping | Integer | True |
The sum of all the shipping amounts. | |
| Created | Datetime | True |
The time at which the object was created. Measured in seconds since the Unix epoch. | |
| Currency | String | True |
A three-letter ISO currency code, in lowercase. | |
| CustomerId | String | True |
Customers.Id |
The Id of the customer. |
| CustomerBalanceTransaction | String | True |
The customer balance transaction related to this credit note. | |
| DiscountAmounts | String | True |
The aggregate amounts calculated per discount for all line items. | |
| EffectiveAt | Datetime | False |
The date when this credit note goes into effect. This is the same as created unless overwritten. | |
| InvoiceId | String | False |
Invoices.Id |
The Id of the invoice. |
| Lines | String | False |
Line items that make up the credit note. | |
| Livemode | Boolean | True |
Indicates whether the object is in live mode. Returns true if the object is in live mode and false if the object is in test mode. | |
| Memo | String | False |
Customer-facing text that appears on the credit note PDF. | |
| Metadata | String | False |
The set of key/value pairs that you can attach to the credit note object. | |
| Number | String | True |
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. | |
| OutOfBandAmount | Integer | False |
The amount that was credited outside of Stripe. | |
| String | True |
The link to download the PDF of the credit note. | ||
| Reason | String | False |
The reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory. The allowed values are duplicate, fraudulent, order_change, product_unsatisfactory. | |
| ShippingCost | String | False |
The details of the cost of shipping for this credit note. | |
| Status | String | True |
The status of this credit note, one of issued or void. | |
| Subtotal | Integer | True |
The integer amount in cents representing the amount of the credit note, excluding exclusive tax and invoice level discounts. | |
| SubtotalExcludingTax | Integer | True |
The integer amount in cents representing the amount of the credit note, excluding all tax and invoice level discounts. | |
| Total | Integer | True |
The integer amount in cents representing the total amount of the credit note, including tax and all discounts. | |
| TotalExcludingTax | Integer | True |
The integer amount in cents representing the total amount of the credit note, excluding tax, but including discounts. | |
| Type | String | True |
The type of this credit note, either pre_payment or post_payment. | |
| VoidedAt | Datetime | True |
The time at which the credit note was voided. | |
| TotalTaxesAggregate | String | True |
The aggregate tax amounts calculated per tax rate for this credit note. | |
| RefundsAggregate | String | True |
Refunds related to this credit note. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| CreditAmount | Integer |
The integer amount in cents representing the amount to credit the customer's balance, which is automatically applied to their next invoice. |
| RefundAmount | Integer |
The integer amount in cents representing the amount to refund. If set, a refund is created for the charge associated with the invoice. |
| AccountId | String |
The Id of the connected account to get credit notes for. |