Attributes
- idstring
Unique identifier for the object.
- currencyenum
Three-letter ISO currency code, in lowercase. Must be a supported currency.
- invoicestringExpandable
ID of the invoice.
- linesobject
Line items that make up the credit note
- memonullable string
Customer-facing text that appears on the credit note PDF.
- metadatanullable object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- reasonnullable enum
Reason for issuing this credit note, one of
duplicate,fraudulent,order_, orchange product_unsatisfactory Possible enum valuesduplicateCredit issued for a duplicate payment or charge
fraudulentCredit note issued for fraudulent activity
order_change Credit note issued for order change
product_unsatisfactory Credit note issued for unsatisfactory product
- statusenum
Status of this credit note, one of
issuedorvoid. Learn more about voiding credit notes.Possible enum valuesissuedThe credit note has been issued.
voidThe credit note has been voided.
- subtotalinteger
The integer amount in cents representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
- totalinteger
The integer amount in cents representing the total amount of the credit note, including tax and all discount.
More attributes
- objectstring
- amountinteger
- amount_
shippinginteger - createdtimestamp
- customerstringExpandable
- customer_
accountnullable string - customer_
balance_ transactionnullable stringExpandable - discount_
amountintegerDeprecated - discount_
amountsarray of objects - effective_
atnullable timestamp - livemodeboolean
- numberstring
- out_
of_ band_ amountnullable integer - pdfstring
- post_
payment_ amountinteger - pre_
payment_ amountinteger - pretax_
credit_ amountsarray of objects - refundsarray of objects
- shipping_
costnullable object - subtotal_
excluding_ taxnullable integer - total_
excluding_ taxnullable integer - total_
taxesnullable array of objects - typeenum
- voided_
atnullable timestamp
{ "id": "cn_1MxvRqLkdIwHu7ixY0xbUcxk", "object": "credit_note", "amount": 1099, "amount_shipping": 0, "created": 1681750958, "currency": "usd", "customer": "cus_NjLgPhUokHubJC", "customer_balance_transaction": null, "discount_amount": 0, "discount_amounts": [], "invoice": "in_1MxvRkLkdIwHu7ixABNtI99m", "lines": { "object": "list", "data": [ { "id": "cnli_1MxvRqLkdIwHu7ixFpdhBFQf", "object": "credit_note_line_item", "amount": 1099, "description": "T-shirt", "discount_amount": 0, "discount_amounts": [], "invoice_line_item": "il_1MxvRlLkdIwHu7ixnkbntxUV", "livemode": false, "quantity": 1, "tax_rates": [], "taxes": [], "type": "invoice_line_item", "unit_amount": 1099, "unit_amount_decimal": "1099" } ], "has_more": false, "url": "/v1/credit_notes/cn_1MxvRqLkdIwHu7ixY0xbUcxk/lines" }, "livemode": false, "memo": null, "metadata": {}, "number": "C9E0C52C-0036-CN-01", "out_of_band_amount": null, "pdf": "https://pay.stripe.com/credit_notes/acct_1M2JTkLkdIwHu7ix/test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LF9Oak9FOUtQNFlPdk52UXhFd2Z4SU45alpEd21kd0Y4LDcyMjkxNzU50200cROQsSK2/pdf?s=ap", "pre_payment_amount": 1099, "post_payment_amount": 0, "reason": null, "refunds": [], "shipping_cost": null, "status": "issued", "subtotal": 1099, "subtotal_excluding_tax": 1099, "total": 1099, "total_excluding_tax": 1099, "total_taxes": [], "type": "pre_payment", "voided_at": null}Attributes
- idstring
Unique identifier for the object.
- objectstring
String representing the object’s type. Objects of the same type share the same value.
- amountinteger
The integer amount in cents representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
- descriptionnullable string
Description of the item being credited.
- discount_
amountintegerDeprecated The integer amount in cents representing the discount being credited for this line item.
- discount_
amountsarray of objects The amount of discount calculated per discount for this line item
- invoice_
line_ itemnullable string ID of the invoice line item being credited
- livemodeboolean
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. - pretax_
credit_ amountsarray of objects The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
- quantitynullable integer
The number of units of product being credited.
- tax_
ratesarray of objects The tax rates which apply to the line item.
- taxesnullable array of objects
The tax information of the line item.
- typeenum
The type of the credit note line item, one of
invoice_orline_ item custom_. When the type isline_ item invoice_there is an additionalline_ item invoice_property on the resource the value of which is the id of the credited line item on the invoice.line_ item Possible enum valuescustom_line_ item invoice_line_ item - unit_
amountnullable integer The cost of each unit of product being credited.
- unit_
amount_ decimalnullable decimal string Same as
unit_, but contains a decimal value with at most 12 decimal places.amount
{ "id": "cnli_1NPtOx2eZvKYlo2CBH1NpUsU", "object": "credit_note_line_item", "amount": 749, "description": "My First Invoice Item (created for API docs)", "discount_amount": 0, "discount_amounts": [], "invoice_line_item": "il_1NPtOx2eZvKYlo2CAUuq0WVl", "livemode": false, "quantity": 1, "taxes": [], "tax_rates": [], "type": "invoice_line_item", "unit_amount": null, "unit_amount_decimal": null}Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s amount_ (and amount_), but not below zero. This amount is indicated by the credit note’s pre_. The excess amount is indicated by post_, and it can result in any combination of the following:
- Refunds: create a new refund (using
refund_) or link existing refunds (usingamount refunds). - Customer balance credit: credit the customer’s balance (using
credit_) which will be automatically applied to their next invoice when it’s finalized.amount - Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using
out_).of_ band_ amount
The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_.
You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s pre_, post_, or both, depending on the invoice’s amount_ at the time of credit note creation.
Parameters
- invoicestringRequired
ID of the invoice.
- linesarray of objectsRequired conditionally
Line items that make up the credit note. One of
amount,lines, orshipping_must be provided.cost - memostring
The credit note’s memo appears on the credit note PDF.
- metadataobject
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata. - reasonenum
Reason for issuing this credit note, one of
duplicate,fraudulent,order_, orchange product_unsatisfactory Possible enum valuesduplicateCredit issued for a duplicate payment or charge
fraudulentCredit note issued for fraudulent activity
order_change Credit note issued for order change
product_unsatisfactory Credit note issued for unsatisfactory product
More parameters
- amountintegerRequired conditionally
- credit_
amountinteger - effective_
attimestamp - email_
typeenum - out_
of_ band_ amountinteger - refund_
amountinteger - refundsarray of objects
- shipping_
costobjectRequired conditionally
Returns
Returns a credit note object if the call succeeded.
{ "id": "cn_1MxvRqLkdIwHu7ixY0xbUcxk", "object": "credit_note", "amount": 1099, "amount_shipping": 0, "created": 1681750958, "currency": "usd", "customer": "cus_NjLgPhUokHubJC", "customer_balance_transaction": null, "discount_amount": 0, "discount_amounts": [], "invoice": "in_1MxvRkLkdIwHu7ixABNtI99m", "lines": { "object": "list", "data": [ { "id": "cnli_1MxvRqLkdIwHu7ixFpdhBFQf", "object": "credit_note_line_item", "amount": 1099, "description": "T-shirt", "discount_amount": 0, "discount_amounts": [], "invoice_line_item": "il_1MxvRlLkdIwHu7ixnkbntxUV", "livemode": false, "quantity": 1, "tax_rates": [], "taxes": [], "type": "invoice_line_item", "unit_amount": 1099, "unit_amount_decimal": "1099" } ], "has_more": false, "url": "/v1/credit_notes/cn_1MxvRqLkdIwHu7ixY0xbUcxk/lines" }, "livemode": false, "memo": null, "metadata": {}, "number": "C9E0C52C-0036-CN-01", "out_of_band_amount": null, "pdf": "https://pay.stripe.com/credit_notes/acct_1M2JTkLkdIwHu7ix/test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LF9Oak9FOUtQNFlPdk52UXhFd2Z4SU45alpEd21kd0Y4LDcyMjkxNzU50200cROQsSK2/pdf?s=ap", "pre_payment_amount": 1099, "post_payment_amount": 0, "reason": null, "refunds": [], "shipping_cost": null, "status": "issued", "subtotal": 1099, "subtotal_excluding_tax": 1099, "total": 1099, "total_excluding_tax": 1099, "total_taxes": [], "type": "pre_payment", "voided_at": null}Updates an existing credit note.
Parameters
- memostring
Credit note memo.
- metadataobject
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the updated credit note object if the call succeeded.
{ "id": "cn_1MxvRqLkdIwHu7ixY0xbUcxk", "object": "credit_note", "amount": 1099, "amount_shipping": 0, "created": 1681750958, "currency": "usd", "customer": "cus_NjLgPhUokHubJC", "customer_balance_transaction": null, "discount_amount": 0, "discount_amounts": [], "invoice": "in_1MxvRkLkdIwHu7ixABNtI99m", "lines": { "object": "list", "data": [ { "id": "cnli_1MxvRqLkdIwHu7ixFpdhBFQf", "object": "credit_note_line_item", "amount": 1099, "description": "T-shirt", "discount_amount": 0, "discount_amounts": [], "invoice_line_item": "il_1MxvRlLkdIwHu7ixnkbntxUV", "livemode": false, "quantity": 1, "tax_rates": [], "taxes": [], "type": "invoice_line_item", "unit_amount": 1099, "unit_amount_decimal": "1099" } ], "has_more": false, "url": "/v1/credit_notes/cn_1MxvRqLkdIwHu7ixY0xbUcxk/lines" }, "livemode": false, "memo": null, "metadata": { "order_id": "6735" }, "number": "C9E0C52C-0036-CN-01", "out_of_band_amount": null, "pdf": "https://pay.stripe.com/credit_notes/acct_1M2JTkLkdIwHu7ix/test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LF9Oak9FOUtQNFlPdk52UXhFd2Z4SU45alpEd21kd0Y4LDcyMjkxNzU50200cROQsSK2/pdf?s=ap", "pre_payment_amount": 1099, "post_payment_amount": 0, "reason": null, "refunds": [], "shipping_cost": null, "status": "issued", "subtotal": 1099, "subtotal_excluding_tax": 1099, "total": 1099, "total_excluding_tax": 1099, "total_taxes": [], "type": "pre_payment", "voided_at": null}When retrieving a credit note, you’ll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
Parameters
No parameters.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
Returns a list of line_item objects.
{ "object": "list", "url": "/v1/credit_notes/cn_1NPtPy2eZvKYlo2CPaEMGMY8/lines", "has_more": false, "data": [ { "object": "list", "url": "/v1/credit_notes/cn_1Nn7fB2eZvKYlo2CuJ0wZBlA/lines", "has_more": false, "data": [ { "id": "cnli_1Nn7fB2eZvKYlo2COYgPG88j", "object": "credit_note_line_item", "amount": 799, "description": "My First Invoice Item (created for API docs)", "discount_amount": 0, "discount_amounts": [], "invoice_line_item": "il_1Nn7fB2eZvKYlo2C3GKZP9wi", "livemode": false, "quantity": 1, "tax_rates": [], "taxes": [], "type": "invoice_line_item", "unit_amount": null, "unit_amount_decimal": null } ] } ]}