Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send 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.

GET /v1/credit_notes

List all credit notes

Returns a list of credit notes.

Request parameters

ParameterLocationTypeDescription
createdqueryone of multiple schemasOnly return credit notes that were created during the given date interval.
customerquerystringOnly return credit notes for the customer specified by this customer ID.
customer_accountquerystringOnly return credit notes for the account representing the customer specified by this account ID.
ending_beforequerystringA 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.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
invoicequerystringOnly return credit notes for the invoice specified by this invoice ID.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA 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.
FieldTypeDescription
data requiredarray of credit_note
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/credit_notes

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

FieldTypeDescription
amountintegerThe 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_amountintegerThe 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_atintegerThe 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_typestringType of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
expandarray of stringSpecifies which fields in the response should be expanded.
invoice requiredstringID of the invoice.
linesarray of objectLine items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
memostringThe credit note's memo appears on the credit note PDF.
metadataobjectSet 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_amountintegerThe integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refund_amountintegerThe 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.
refundsarray of objectRefunds to link to this credit note.
shipping_costobjectWhen 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.
FieldTypeDescription
amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shipping requiredintegerThis is the sum of all the shipping amounts.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
currency requiredstringThree-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 requiredone of multiple schemasID of the customer.
customer_accountstringID of the account representing the customer.
customer_balance_transactionone of multiple schemasCustomer balance transaction related to this credit note.
discount_amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amounts requiredarray of discounts_resource_discount_amountThe aggregate amounts calculated per discount for all line items.
effective_atintegerThe 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 requiredstringUnique identifier for the object.
invoice requiredone of multiple schemasID of the invoice.
lines requiredobjectLine items that make up the credit note
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringCustomer-facing text that appears on the credit note PDF.
metadataobjectSet 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 requiredstringA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
object requiredstringString representing the object's type. Objects of the same type share the same value.
out_of_band_amountintegerAmount that was credited outside of Stripe.
pdf requiredstringThe link to download the PDF of the credit note.
post_payment_amount requiredintegerThe 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 requiredintegerThe amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amounts requiredarray of credit_notes_pretax_credit_amountThe pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refunds requiredarray of credit_note_refundRefunds related to this credit note.
shipping_costone of multiple schemasThe details of the cost of shipping, including the ShippingRate applied to the invoice.
status requiredstringStatus 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 requiredintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
total requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray of billing_bill_resource_invoicing_taxes_taxThe aggregate tax information for all line items.
type requiredstringType 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_atintegerThe time that the credit note was voided.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/credit_notes/preview

Preview a credit note

Get a preview of a credit note without creating it.

Request parameters

ParameterLocationTypeDescription
amountqueryintegerThe 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_amountqueryintegerThe 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_atqueryintegerThe 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_typequerystringType of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
invoicequerystringID of the invoice.
linesqueryarray of objectLine items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
memoquerystringThe credit note's memo appears on the credit note PDF.
metadataqueryobjectSet 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_amountqueryintegerThe integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
reasonquerystringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refund_amountqueryintegerThe 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.
refundsqueryarray of objectRefunds to link to this credit note.
shipping_costqueryobjectWhen 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.
FieldTypeDescription
amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shipping requiredintegerThis is the sum of all the shipping amounts.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
currency requiredstringThree-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 requiredone of multiple schemasID of the customer.
customer_accountstringID of the account representing the customer.
customer_balance_transactionone of multiple schemasCustomer balance transaction related to this credit note.
discount_amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amounts requiredarray of discounts_resource_discount_amountThe aggregate amounts calculated per discount for all line items.
effective_atintegerThe 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 requiredstringUnique identifier for the object.
invoice requiredone of multiple schemasID of the invoice.
lines requiredobjectLine items that make up the credit note
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringCustomer-facing text that appears on the credit note PDF.
metadataobjectSet 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 requiredstringA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
object requiredstringString representing the object's type. Objects of the same type share the same value.
out_of_band_amountintegerAmount that was credited outside of Stripe.
pdf requiredstringThe link to download the PDF of the credit note.
post_payment_amount requiredintegerThe 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 requiredintegerThe amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amounts requiredarray of credit_notes_pretax_credit_amountThe pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refunds requiredarray of credit_note_refundRefunds related to this credit note.
shipping_costone of multiple schemasThe details of the cost of shipping, including the ShippingRate applied to the invoice.
status requiredstringStatus 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 requiredintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
total requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray of billing_bill_resource_invoicing_taxes_taxThe aggregate tax information for all line items.
type requiredstringType 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_atintegerThe time that the credit note was voided.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/credit_notes/preview/lines

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

ParameterLocationTypeDescription
amountqueryintegerThe 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_amountqueryintegerThe 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_atqueryintegerThe 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_typequerystringType of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
ending_beforequerystringA 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.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
invoicequerystringID of the invoice.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
linesqueryarray of objectLine items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
memoquerystringThe credit note's memo appears on the credit note PDF.
metadataqueryobjectSet 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_amountqueryintegerThe integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
reasonquerystringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refund_amountqueryintegerThe 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.
refundsqueryarray of objectRefunds to link to this credit note.
shipping_costqueryobjectWhen 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_afterquerystringA 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.
FieldTypeDescription
data requiredarray of credit_note_line_itemDetails about each object.
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/credit_notes/{credit_note}/lines

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

ParameterLocationTypeDescription
credit_notepathstring
ending_beforequerystringA 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.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA 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.
FieldTypeDescription
data requiredarray of credit_note_line_itemDetails about each object.
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/credit_notes/{id}

Retrieve a credit note

Retrieves the credit note object with the given identifier.

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
idpathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shipping requiredintegerThis is the sum of all the shipping amounts.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
currency requiredstringThree-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 requiredone of multiple schemasID of the customer.
customer_accountstringID of the account representing the customer.
customer_balance_transactionone of multiple schemasCustomer balance transaction related to this credit note.
discount_amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amounts requiredarray of discounts_resource_discount_amountThe aggregate amounts calculated per discount for all line items.
effective_atintegerThe 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 requiredstringUnique identifier for the object.
invoice requiredone of multiple schemasID of the invoice.
lines requiredobjectLine items that make up the credit note
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringCustomer-facing text that appears on the credit note PDF.
metadataobjectSet 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 requiredstringA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
object requiredstringString representing the object's type. Objects of the same type share the same value.
out_of_band_amountintegerAmount that was credited outside of Stripe.
pdf requiredstringThe link to download the PDF of the credit note.
post_payment_amount requiredintegerThe 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 requiredintegerThe amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amounts requiredarray of credit_notes_pretax_credit_amountThe pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refunds requiredarray of credit_note_refundRefunds related to this credit note.
shipping_costone of multiple schemasThe details of the cost of shipping, including the ShippingRate applied to the invoice.
status requiredstringStatus 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 requiredintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
total requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray of billing_bill_resource_invoicing_taxes_taxThe aggregate tax information for all line items.
type requiredstringType 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_atintegerThe time that the credit note was voided.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/credit_notes/{id}

Update a credit note

Updates an existing credit note.

Request parameters

ParameterLocationTypeDescription
idpathstring
FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.
memostringCredit note memo.
metadataobjectSet 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.
FieldTypeDescription
amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shipping requiredintegerThis is the sum of all the shipping amounts.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
currency requiredstringThree-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 requiredone of multiple schemasID of the customer.
customer_accountstringID of the account representing the customer.
customer_balance_transactionone of multiple schemasCustomer balance transaction related to this credit note.
discount_amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amounts requiredarray of discounts_resource_discount_amountThe aggregate amounts calculated per discount for all line items.
effective_atintegerThe 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 requiredstringUnique identifier for the object.
invoice requiredone of multiple schemasID of the invoice.
lines requiredobjectLine items that make up the credit note
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringCustomer-facing text that appears on the credit note PDF.
metadataobjectSet 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 requiredstringA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
object requiredstringString representing the object's type. Objects of the same type share the same value.
out_of_band_amountintegerAmount that was credited outside of Stripe.
pdf requiredstringThe link to download the PDF of the credit note.
post_payment_amount requiredintegerThe 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 requiredintegerThe amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amounts requiredarray of credit_notes_pretax_credit_amountThe pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refunds requiredarray of credit_note_refundRefunds related to this credit note.
shipping_costone of multiple schemasThe details of the cost of shipping, including the ShippingRate applied to the invoice.
status requiredstringStatus 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 requiredintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
total requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray of billing_bill_resource_invoicing_taxes_taxThe aggregate tax information for all line items.
type requiredstringType 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_atintegerThe time that the credit note was voided.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/credit_notes/{id}/void

Void a credit note

Marks a credit note as void. Learn more about voiding credit notes.

Request parameters

ParameterLocationTypeDescription
idpathstring
FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.

Responses

HTTP 200: Successful response.
FieldTypeDescription
amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
amount_shipping requiredintegerThis is the sum of all the shipping amounts.
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
currency requiredstringThree-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 requiredone of multiple schemasID of the customer.
customer_accountstringID of the account representing the customer.
customer_balance_transactionone of multiple schemasCustomer balance transaction related to this credit note.
discount_amount requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
discount_amounts requiredarray of discounts_resource_discount_amountThe aggregate amounts calculated per discount for all line items.
effective_atintegerThe 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 requiredstringUnique identifier for the object.
invoice requiredone of multiple schemasID of the invoice.
lines requiredobjectLine items that make up the credit note
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
memostringCustomer-facing text that appears on the credit note PDF.
metadataobjectSet 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 requiredstringA unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
object requiredstringString representing the object's type. Objects of the same type share the same value.
out_of_band_amountintegerAmount that was credited outside of Stripe.
pdf requiredstringThe link to download the PDF of the credit note.
post_payment_amount requiredintegerThe 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 requiredintegerThe amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced.
pretax_credit_amounts requiredarray of credit_notes_pretax_credit_amountThe pretax credit amounts (ex: discount, credit grants, etc) for all line items.
reasonstringReason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
refunds requiredarray of credit_note_refundRefunds related to this credit note.
shipping_costone of multiple schemasThe details of the cost of shipping, including the ShippingRate applied to the invoice.
status requiredstringStatus 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 requiredintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
subtotal_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
total requiredintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
total_excluding_taxintegerThe integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
total_taxesarray of billing_bill_resource_invoicing_taxes_taxThe aggregate tax information for all line items.
type requiredstringType 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_atintegerThe time that the credit note was voided.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors