CreditNotes
Returns credit notes that adjust an invoice's amount after the invoice is finalized and supports creating and updating them.
Table-Specific Information
SELECT
The provider 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 provider.
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 date and 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 |
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 |
The Id of the invoice. | |
| Lines | String | False |
Line items that make up the credit note. | |
| Livemode | Boolean | True |
Indicates whether the object exists in live mode. The value is true in live mode and false 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 a 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 |
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. | |
| Refund | String | False |
The refund related to this credit note. | |
| ShippingCost | String | False |
The details of the cost of shipping. | |
| 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. | |
| TaxAmounts | String | True |
The aggregate amounts calculated per tax rate for all line items. | |
| Total | Integer | True |
The integer amount in cents representing the total amount of the credit note, including tax and all discount. | |
| 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 date and time at which the credit note was voided. |
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. |