Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

A merchant secret key (sk_…) sent as Authorization: Bearer <key>.

Headers

Idempotency-Key
string
required

Required. A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.

Maximum string length: 255

Path Parameters

id
string
required

The credit note id (cn_…).

Response

The voided credit note.

id
string
required

Credit note id (cn_…).

object
enum<string>
required
Available options:
credit_note
number
string
required

The gapless per-merchant number assigned at creation (for example CN-000001).

invoice
string
required

The invoice this credit note offsets (inv_…).

customer
string
required

The customer the invoice was issued to (cus_…).

currency
string
required

Three-letter ISO currency code.

status
enum<string>
required

issued is the normal state after creation; void means the credit note has been reversed.

Available options:
issued,
void
type
enum<string>
required

Always post_payment in v1.

Available options:
post_payment
reason
enum<string> | null
required

The reason given at creation, or null if none was provided.

Available options:
duplicate,
fraudulent,
order_change,
product_unsatisfactory,
adjustment
subtotal
integer
required

Sum of line amounts before tax, in minor units.

tax
integer
required

Total tax credited, in minor units.

total
integer
required

Total credit amount (subtotal + tax), in minor units.

amount_refunded
integer
required

Portion returned via the linked refund, in minor units.

out_of_band_amount
integer
required

Portion settled outside the platform, in minor units.

refund
string | null
required

The linked refund (rf_…), or null when settlement was out-of-band only.

lines
object[]
required
memo
string | null
required

Free-text note printed on the PDF, or null if none was provided.

livemode
boolean
required
created
integer
required

Unix epoch seconds.

effective_at
integer
required

Unix epoch seconds the credit is dated to.

voided_at
integer | null
required

Unix epoch seconds when the note was voided, or null while still issued.

metadata
object
required
hosted_url
string | null

Buyer-facing permalink for the hosted credit note view, when the hosted surface is enabled. Omitted otherwise.