API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend form-encoded requests with Authorization: Bearer sk_test_....
Complete OpenAPI specification · Integration guide
Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.
List all credit notes
Returns a list of credit notes.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
created | query | one of multiple schemas | Only return credit notes that were created during the given date interval. |
customer | query | string | Only return credit notes for the customer specified by this customer ID. |
customer_account | query | string | Only return credit notes for the account representing the customer specified by this account ID. |
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
invoice | query | string | Only return credit notes for the invoice specified by this invoice ID. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of credit_note | |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Create a credit note
Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s amount_remaining (and amount_due), but not below zero. This amount is indicated by the credit note’s pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized. 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_payment_amount. You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice’s amount_remaining at the time of credit note creation. For invoices that also have refunds created through the Refund API, the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice’s paid amount.
Request parameters
| Field | Type | Description |
|---|---|---|
amount | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
credit_amount | integer | The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. |
effective_at | integer | 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. |
email_type | string | Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. |
expand | array of string | Specifies which fields in the response should be expanded. |
invoice required | string | ID of the invoice. |
lines | array of object | Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
memo | string | The credit note's memo appears on the credit note PDF. |
metadata | object | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
out_of_band_amount | integer | The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refund_amount | integer | The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. |
refunds | array of object | Refunds to link to this credit note. |
shipping_cost | object | When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount_shipping required | integer | This is the sum of all the shipping amounts. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | 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). |
customer required | one of multiple schemas | ID of the customer. |
customer_account | string | ID of the account representing the customer. |
customer_balance_transaction | one of multiple schemas | Customer balance transaction related to this credit note. |
discount_amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amounts required | array of discounts_resource_discount_amount | The aggregate amounts calculated per discount for all line items. |
effective_at | integer | 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. |
id required | string | Unique identifier for the object. |
invoice required | one of multiple schemas | ID of the invoice. |
lines required | object | Line items that make up the credit note |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | string | Customer-facing text that appears on the credit note PDF. |
metadata | object | 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. |
number required | string | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
out_of_band_amount | integer | Amount that was credited outside of Stripe. |
pdf required | string | The link to download the PDF of the credit note. |
post_payment_amount required | integer | 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_amount required | integer | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pretax_credit_amounts required | array of credit_notes_pretax_credit_amount | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refunds required | array of credit_note_refund | Refunds related to this credit note. |
shipping_cost | one of multiple schemas | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
status required | string | 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). |
subtotal required | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
total required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_taxes | array of billing_bill_resource_invoicing_taxes_tax | The aggregate tax information for all line items. |
type required | string | 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. |
voided_at | integer | The time that the credit note was voided. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Preview a credit note
Get a preview of a credit note without creating it.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
amount | query | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
credit_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. |
effective_at | query | integer | 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. |
email_type | query | string | Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
invoice | query | string | ID of the invoice. |
lines | query | array of object | Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
memo | query | string | The credit note's memo appears on the credit note PDF. |
metadata | query | object | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
out_of_band_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. |
reason | query | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refund_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. |
refunds | query | array of object | Refunds to link to this credit note. |
shipping_cost | query | object | When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount_shipping required | integer | This is the sum of all the shipping amounts. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | 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). |
customer required | one of multiple schemas | ID of the customer. |
customer_account | string | ID of the account representing the customer. |
customer_balance_transaction | one of multiple schemas | Customer balance transaction related to this credit note. |
discount_amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amounts required | array of discounts_resource_discount_amount | The aggregate amounts calculated per discount for all line items. |
effective_at | integer | 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. |
id required | string | Unique identifier for the object. |
invoice required | one of multiple schemas | ID of the invoice. |
lines required | object | Line items that make up the credit note |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | string | Customer-facing text that appears on the credit note PDF. |
metadata | object | 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. |
number required | string | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
out_of_band_amount | integer | Amount that was credited outside of Stripe. |
pdf required | string | The link to download the PDF of the credit note. |
post_payment_amount required | integer | 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_amount required | integer | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pretax_credit_amounts required | array of credit_notes_pretax_credit_amount | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refunds required | array of credit_note_refund | Refunds related to this credit note. |
shipping_cost | one of multiple schemas | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
status required | string | 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). |
subtotal required | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
total required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_taxes | array of billing_bill_resource_invoicing_taxes_tax | The aggregate tax information for all line items. |
type required | string | 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. |
voided_at | integer | The time that the credit note was voided. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a credit note preview's line items
When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
amount | query | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
credit_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. |
effective_at | query | integer | 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. |
email_type | query | string | Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. |
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
invoice | query | string | ID of the invoice. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
lines | query | array of object | Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
memo | query | string | The credit note's memo appears on the credit note PDF. |
metadata | query | object | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
out_of_band_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. |
reason | query | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refund_amount | query | integer | The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. |
refunds | query | array of object | Refunds to link to this credit note. |
shipping_cost | query | object | When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of credit_note_line_item | Details about each object. |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a credit note's line items
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.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
credit_note | path | string | |
ending_before | query | string | A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
starting_after | query | string | A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
data required | array of credit_note_line_item | Details about each object. |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Retrieve a credit note
Retrieves the credit note object with the given identifier.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
id | path | string |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount_shipping required | integer | This is the sum of all the shipping amounts. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | 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). |
customer required | one of multiple schemas | ID of the customer. |
customer_account | string | ID of the account representing the customer. |
customer_balance_transaction | one of multiple schemas | Customer balance transaction related to this credit note. |
discount_amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amounts required | array of discounts_resource_discount_amount | The aggregate amounts calculated per discount for all line items. |
effective_at | integer | 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. |
id required | string | Unique identifier for the object. |
invoice required | one of multiple schemas | ID of the invoice. |
lines required | object | Line items that make up the credit note |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | string | Customer-facing text that appears on the credit note PDF. |
metadata | object | 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. |
number required | string | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
out_of_band_amount | integer | Amount that was credited outside of Stripe. |
pdf required | string | The link to download the PDF of the credit note. |
post_payment_amount required | integer | 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_amount required | integer | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pretax_credit_amounts required | array of credit_notes_pretax_credit_amount | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refunds required | array of credit_note_refund | Refunds related to this credit note. |
shipping_cost | one of multiple schemas | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
status required | string | 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). |
subtotal required | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
total required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_taxes | array of billing_bill_resource_invoicing_taxes_tax | The aggregate tax information for all line items. |
type required | string | 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. |
voided_at | integer | The time that the credit note was voided. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Update a credit note
Updates an existing credit note.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
id | path | string |
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
memo | string | Credit note memo. |
metadata | object | 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount_shipping required | integer | This is the sum of all the shipping amounts. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | 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). |
customer required | one of multiple schemas | ID of the customer. |
customer_account | string | ID of the account representing the customer. |
customer_balance_transaction | one of multiple schemas | Customer balance transaction related to this credit note. |
discount_amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amounts required | array of discounts_resource_discount_amount | The aggregate amounts calculated per discount for all line items. |
effective_at | integer | 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. |
id required | string | Unique identifier for the object. |
invoice required | one of multiple schemas | ID of the invoice. |
lines required | object | Line items that make up the credit note |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | string | Customer-facing text that appears on the credit note PDF. |
metadata | object | 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. |
number required | string | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
out_of_band_amount | integer | Amount that was credited outside of Stripe. |
pdf required | string | The link to download the PDF of the credit note. |
post_payment_amount required | integer | 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_amount required | integer | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pretax_credit_amounts required | array of credit_notes_pretax_credit_amount | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refunds required | array of credit_note_refund | Refunds related to this credit note. |
shipping_cost | one of multiple schemas | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
status required | string | 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). |
subtotal required | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
total required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_taxes | array of billing_bill_resource_invoicing_taxes_tax | The aggregate tax information for all line items. |
type required | string | 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. |
voided_at | integer | The time that the credit note was voided. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
Void a credit note
Marks a credit note as void. Learn more about voiding credit notes.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
id | path | string |
| Field | Type | Description |
|---|---|---|
expand | array of string | Specifies which fields in the response should be expanded. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. |
amount_shipping required | integer | This is the sum of all the shipping amounts. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
currency required | string | 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). |
customer required | one of multiple schemas | ID of the customer. |
customer_account | string | ID of the account representing the customer. |
customer_balance_transaction | one of multiple schemas | Customer balance transaction related to this credit note. |
discount_amount required | integer | The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. |
discount_amounts required | array of discounts_resource_discount_amount | The aggregate amounts calculated per discount for all line items. |
effective_at | integer | 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. |
id required | string | Unique identifier for the object. |
invoice required | one of multiple schemas | ID of the invoice. |
lines required | object | Line items that make up the credit note |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
memo | string | Customer-facing text that appears on the credit note PDF. |
metadata | object | 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. |
number required | string | A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
out_of_band_amount | integer | Amount that was credited outside of Stripe. |
pdf required | string | The link to download the PDF of the credit note. |
post_payment_amount required | integer | 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_amount required | integer | The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. |
pretax_credit_amounts required | array of credit_notes_pretax_credit_amount | The pretax credit amounts (ex: discount, credit grants, etc) for all line items. |
reason | string | Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` |
refunds required | array of credit_note_refund | Refunds related to this credit note. |
shipping_cost | one of multiple schemas | The details of the cost of shipping, including the ShippingRate applied to the invoice. |
status required | string | 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). |
subtotal required | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. |
subtotal_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. |
total required | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. |
total_excluding_tax | integer | The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. |
total_taxes | array of billing_bill_resource_invoicing_taxes_tax | The aggregate tax information for all line items. |
type required | string | 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. |
voided_at | integer | The time that the credit note was voided. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |