Stripe: Credit notes schemas
7 Stripe schemas with complete fields and constraints.
← Credit notes operations · All schemas
Create a credit note — request body — body lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | integer | Optional | |
description | string | Optional | Maximum length: 5000 |
invoice_line_item | string | Optional | Maximum length: 5000 |
metadata | object | Optional | Additional keys: see wildcard field |
metadata.* | string | Additional keys | |
quantity | integer | Optional | |
tax_amounts | JSON | Optional | |
tax_amounts (anyOf 1) | array | Alternative | |
tax_amounts (anyOf 1)[] | object | Each item | |
tax_amounts (anyOf 1)[].amount | integer | Required within parent | |
tax_amounts (anyOf 1)[].tax_rate | string | Required within parent | Maximum length: 5000 |
tax_amounts (anyOf 1)[].taxable_amount | integer | Required within parent | |
tax_amounts (anyOf 2) | string | Alternative | One of: |
tax_rates | JSON | Optional | |
tax_rates (anyOf 1) | array | Alternative | |
tax_rates (anyOf 1)[] | string | Each item | Maximum length: 5000 |
tax_rates (anyOf 2) | string | Alternative | One of: |
type | string | Required within parent | One of: custom_line_item, invoice_line_item |
unit_amount | integer | Optional | |
unit_amount_decimal | string | Optional | Format: decimal |
Retrieve a credit note's line items — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The credit note line item object |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Description of the item being credited. Maximum length: 5000 |
description (anyOf 2) | null | Alternative | |
discount_amount | JSON | Required within parent | |
discount_amount (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the discount being credited for this line item. |
discount_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discount_amounts | array | Required within parent | The amount of discount calculated per discount for this line item |
discount_amounts[] | Model | Each item | Expand Void a credit note — response body — discount amounts item |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
invoice_line_item | string | Optional | ID of the invoice line item being credited Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | 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. Additional keys: see wildcard field |
metadata (anyOf 1).* | string | Additional keys | Maximum length: 500 |
metadata (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: credit_note_line_item |
pretax_credit_amounts | array | Required within parent | The pretax credit amounts (ex: discount, credit grants, etc) for this line item. |
pretax_credit_amounts[] | Model | Each item | Expand Void a credit note — response body — pretax credit amounts item |
quantity | JSON | Optional | |
quantity (anyOf 1) | JSON | Alternative | |
quantity (anyOf 1) (anyOf 1) | integer | Alternative | The number of units of product being credited. |
quantity (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
quantity (anyOf 2) | null | Alternative | |
tax_rates | array | Required within parent | The tax rates which apply to the line item. |
tax_rates[] | Model | Each item | Expand Create a tax rate — response body |
taxes | JSON | Optional | |
taxes (anyOf 1) | array | Alternative | The tax information of the line item. |
taxes (anyOf 1)[] | Model | Each item | Expand Update an invoice's line item — response body — taxes The tax information of the line item item |
taxes (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. Known values: custom_line_item, invoice_line_item |
unit_amount | JSON | Optional | |
unit_amount (anyOf 1) | JSON | Alternative | |
unit_amount (anyOf 1) (anyOf 1) | integer | Alternative | The cost of each unit of product being credited. |
unit_amount (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
unit_amount (anyOf 2) | null | Alternative | |
unit_amount_decimal | JSON | Optional | |
unit_amount_decimal (anyOf 1) | string | Alternative | Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. Format: decimal |
unit_amount_decimal (anyOf 2) | null | Alternative |
Referenced models: Update an invoice's line item — response body — taxes The tax information of the line item item, Void a credit note — response body — pretax credit amounts item, Void a credit note — response body — discount amounts item, Create a tax rate — response body
Void a credit note — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Issue a credit note to adjust an invoice's amount after the invoice is finalized. Related guide: [Credit notes](https://docs.stripe.com/billing/invoices/credit-notes) |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
amount_shipping | JSON | Required within parent | |
amount_shipping (anyOf 1) | integer | Alternative | This is the sum of all the shipping amounts. |
amount_shipping (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency | string | Required within parent | 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). Format: currency |
customer | JSON | Required within parent | ID of the customer. |
customer (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer_account | JSON | Optional | |
customer_account (anyOf 1) | string | Alternative | ID of the account representing the customer. Maximum length: 5000 |
customer_account (anyOf 2) | null | Alternative | |
customer_balance_transaction | JSON | Optional | |
customer_balance_transaction (anyOf 1) | JSON | Alternative | Customer balance transaction related to this credit note. |
customer_balance_transaction (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer_balance_transaction (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a customer balance transaction — response body |
customer_balance_transaction (anyOf 2) | null | Alternative | |
discount_amount | JSON | Required within parent | |
discount_amount (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discount_amounts | array | Required within parent | The aggregate amounts calculated per discount for all line items. |
discount_amounts[] | Model | Each item | Expand Void a credit note — response body — discount amounts item |
effective_at | JSON | Optional | |
effective_at (anyOf 1) | JSON | Alternative | |
effective_at (anyOf 1) (anyOf 1) | integer | Alternative | 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. Format: unix-time |
effective_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
effective_at (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
invoice | JSON | Required within parent | ID of the invoice. |
invoice (anyOf 1) | string | Alternative | Maximum length: 5000 |
invoice (anyOf 2) | Model | Alternative | Expand Pay an invoice — response body |
lines | object | Required within parent | Line items that make up the credit note |
lines.data | array | Required within parent | Details about each object. |
lines.data[] | Model | Each item | Expand Retrieve a credit note's line items — response body — data item |
lines.has_more | boolean | Required within parent | True if this list has another page of items after this one that can be fetched. |
lines.object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. Known values: list |
lines.url | string | Required within parent | The URL where this list can be accessed. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | JSON | Optional | |
memo (anyOf 1) | string | Alternative | Customer-facing text that appears on the credit note PDF. Maximum length: 5000 |
memo (anyOf 2) | null | Alternative | |
metadata | JSON | Optional | |
metadata (anyOf 1) | object | Alternative | 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. Additional keys: see wildcard field |
metadata (anyOf 1).* | string | Additional keys | Maximum length: 500 |
metadata (anyOf 2) | null | Alternative | |
number | string | Required within parent | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: credit_note |
out_of_band_amount | JSON | Optional | |
out_of_band_amount (anyOf 1) | JSON | Alternative | |
out_of_band_amount (anyOf 1) (anyOf 1) | integer | Alternative | Amount that was credited outside of Stripe. |
out_of_band_amount (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
out_of_band_amount (anyOf 2) | null | Alternative | |
pdf | string | Required within parent | The link to download the PDF of the credit note. Maximum length: 5000 |
post_payment_amount | JSON | Required within parent | |
post_payment_amount (anyOf 1) | integer | Alternative | 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. |
post_payment_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pre_payment_amount | JSON | Required within parent | |
pre_payment_amount (anyOf 1) | integer | Alternative | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pre_payment_amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
pretax_credit_amounts | array | Required within parent | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
pretax_credit_amounts[] | Model | Each item | Expand Void a credit note — response body — pretax credit amounts item |
reason | JSON | Optional | |
reason (anyOf 1) | string | Alternative | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` Known values: duplicate, fraudulent, order_change, product_unsatisfactory |
reason (anyOf 2) | null | Alternative | |
refunds | array | Required within parent | Refunds related to this credit note. |
refunds[] | Model | Each item | Expand Void a credit note — response body — refunds item |
shipping_cost | JSON | Optional | |
shipping_cost (anyOf 1) | JSON | Alternative | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
shipping_cost (anyOf 1) (anyOf 1) | Model | Alternative | Expand Pay an invoice — response body — shipping cost value amount subtotal, amount tax, amount total, shipping rate, taxes |
shipping_cost (anyOf 2) | null | Alternative | |
status | string | Required within parent | 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). Known values: issued, void |
subtotal | JSON | Required within parent | |
subtotal (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
subtotal_excluding_tax | JSON | Optional | |
subtotal_excluding_tax (anyOf 1) | JSON | Alternative | |
subtotal_excluding_tax (anyOf 1) (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
subtotal_excluding_tax (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
subtotal_excluding_tax (anyOf 2) | null | Alternative | |
total | JSON | Required within parent | |
total (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total_excluding_tax | JSON | Optional | |
total_excluding_tax (anyOf 1) | JSON | Alternative | |
total_excluding_tax (anyOf 1) (anyOf 1) | integer | Alternative | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_excluding_tax (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
total_excluding_tax (anyOf 2) | null | Alternative | |
total_taxes | JSON | Optional | |
total_taxes (anyOf 1) | array | Alternative | The aggregate tax information for all line items. |
total_taxes (anyOf 1)[] | Model | Each item | Expand Update an invoice's line item — response body — taxes The tax information of the line item item |
total_taxes (anyOf 2) | null | Alternative | |
type | string | Required within parent | 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. Known values: mixed, post_payment, pre_payment |
voided_at | JSON | Optional | |
voided_at (anyOf 1) | JSON | Alternative | |
voided_at (anyOf 1) (anyOf 1) | integer | Alternative | The time that the credit note was voided. Format: unix-time |
voided_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
voided_at (anyOf 2) | null | Alternative |
Referenced models: Update an invoice's line item — response body — taxes The tax information of the line item item, Retrieve a credit note's line items — response body — data item, Void a credit note — response body — refunds item, Void a credit note — response body — pretax credit amounts item, Create a customer — response body, Create a customer balance transaction — response body, Delete a customer — response body, Void a credit note — response body — discount amounts item, Pay an invoice — response body, Pay an invoice — response body — shipping cost value amount subtotal, amount tax, amount total, shipping rate, taxes
Void a credit note — response body — discount amounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | The amount, in cents (or local equivalent), of the discount. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discount | JSON | Required within parent | The discount that was applied to get this discount amount. |
discount (anyOf 1) | string | Alternative | Maximum length: 5000 |
discount (anyOf 2) | Model | Alternative | Expand Get Customers Customer Discount — response body |
discount (anyOf 3) | Model | Alternative | Expand Delete a subscription discount — response body |
Referenced models: Delete a subscription discount — response body, Get Customers Customer Discount — response body
Void a credit note — response body — pretax credit amounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | The amount, in cents (or local equivalent), of the pretax credit amount. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
credit_balance_transaction | JSON | Optional | The credit balance transaction that was applied to get this pretax credit amount. |
credit_balance_transaction (anyOf 1) | string | Alternative | Maximum length: 5000 |
credit_balance_transaction (anyOf 2) | Model | Alternative | Expand Retrieve a credit balance transaction — response body |
discount | JSON | Optional | The discount that was applied to get this pretax credit amount. |
discount (anyOf 1) | string | Alternative | Maximum length: 5000 |
discount (anyOf 2) | Model | Alternative | Expand Get Customers Customer Discount — response body |
discount (anyOf 3) | Model | Alternative | Expand Delete a subscription discount — response body |
type | string | Required within parent | Type of the pretax credit amount referenced. Known values: credit_balance_transaction, discount |
Referenced models: Retrieve a credit balance transaction — response body, Delete a subscription discount — response body, Get Customers Customer Discount — response body
Void a credit note — response body — refunds item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount_refunded | JSON | Required within parent | |
amount_refunded (anyOf 1) | integer | Alternative | Amount of the refund that applies to this credit note, in cents (or local equivalent). |
amount_refunded (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
payment_record_refund | JSON | Optional | |
payment_record_refund (anyOf 1) | JSON | Alternative | The PaymentRecord refund details associated with this credit note refund. |
payment_record_refund (anyOf 1) (anyOf 1) | Model | Alternative | Expand Void a credit note — response body — refunds item payment record refund value payment record, refund group |
payment_record_refund (anyOf 2) | null | Alternative | |
refund | JSON | Required within parent | ID of the refund. |
refund (anyOf 1) | string | Alternative | Maximum length: 5000 |
refund (anyOf 2) | Model | Alternative | Expand Cancel a refund — response body |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | Type of the refund, one of `refund` or `payment_record_refund`. Known values: payment_record_refund, refund |
type (anyOf 2) | null | Alternative |
Referenced models: Void a credit note — response body — refunds item payment record refund value payment record, refund group, Cancel a refund — response body
Void a credit note — response body — refunds item payment record refund value payment record, refund group
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
payment_record | string | Required within parent | ID of the payment record. Maximum length: 5000 |
refund_group | string | Required within parent | ID of the refund group. Maximum length: 5000 |