Sample - Stripe API
GET/v1/credit_notes/{id}

Retrieve a credit note

Retrieves a credit note by its identifier. Use expand when you need selected related fields included in the response. The response contains the credit note's amounts, currency, customer, invoice, line items, and lifecycle data.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
idstringrequired
The unique identifier of the credit note; maximum 5,000 characters.
expandarray<string>optional
Fields to expand in the response.

2 status codes
200Returns the credit note object, including its amount, currency, customer, invoice, line items, status-related fields, and generated document references.
amountintegerrequired
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shippingintegerrequired
This is the sum of all the shipping amounts.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
customerstringrequired
ID of the customer.
customer_accountstringoptional
ID of the account representing the customer.
customer_balance_transactionstringoptional
Customer balance transaction related to this credit note.
discount_amountintegerrequired
The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amountsarray<DiscountsResourceDiscountAmount>required
The aggregate amounts calculated per discount for all line items.
effective_atintegeroptional
The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
idstringrequired
Unique identifier for the object.
invoicestringrequired
ID of the invoice.
linesobjectrequired
Line items that make up the credit note
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringoptional
Customer-facing text that appears on the credit note PDF.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
numberstringrequired
A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:credit_note
out_of_band_amountintegeroptional
Amount that was credited outside of Stripe.
pdfstringrequired
The link to download the PDF of the credit note.
post_payment_amountintegerrequired
The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof.
pre_payment_amountintegerrequired
The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amountsarray<CreditNotesPretaxCreditAmount>required
The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringoptional
Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
Allowed:duplicatefraudulentorder_changeproduct_unsatisfactory
refundsarray<CreditNoteRefund>required
Refunds related to this credit note.
shipping_costobjectoptional
The details of the cost of shipping, including the ShippingRate applied to the invoice.
statusstringrequired
Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://docs.stripe.com/billing/invoices/credit-notes#voiding).
Allowed:issuedvoid
subtotalintegerrequired
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegeroptional
The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
totalintegerrequired
The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegeroptional
The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray<BillingBillResourceInvoicingTaxesTax>optional
The aggregate tax information for all line items.
typestringrequired
Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
Allowed:mixedpost_paymentpre_payment
voided_atintegeroptional
The time that the credit note was voided.
defaultError response.
errorobjectrequired

Error handling

id must identify the credit note to retrieve and may contain at most 5,000 characters. Use expand only with field names that can be expanded in the credit note response.