Preview a credit note
Computes the credit note totals, settlement breakdown, and the
invoice’s creditable-remaining context without persisting anything or
minting a number. Useful for rendering a confirmation screen
(“you will credit Y remains creditable”). No Idempotency-Key
is required because nothing is created.
Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Body
Provide either lines or amount (not both). Settlement fields
amount_refunded and out_of_band_amount must sum to the credit total.
The paid invoice to credit (inv_…). Must be in paid status.
Explicit credit lines. Mutually exclusive with amount.
Shorthand for a single custom-line credit of this amount in minor units. Mutually exclusive with lines.
Portion of the credit already returned via an existing refund, in minor units. Requires refund.
Portion of the credit settled outside the payment platform (for example, a check), in minor units.
An already-created refund to link (rf_…). Required when amount_refunded is non-zero.
Why the credit is being issued. Omit if no reason applies.
duplicate, fraudulent, order_change, product_unsatisfactory, adjustment Free-text note printed on the credit note PDF.
Unix epoch seconds to backdate the credit note. Defaults to the time of the request.
Response
The computed credit note preview.
A computed credit note preview — no id, number, or lines, because nothing is persisted.
credit_note_preview Three-letter ISO currency code.
post_payment Sum of line amounts before tax, in minor units.
Tax credited, in minor units.
Total credit (subtotal + tax), in minor units.
Portion to be settled via the linked refund, in minor units.
Portion settled outside the platform, in minor units.
The invoice's original total, in minor units.
Amount already credited by prior credit notes, in minor units.
How much more can be credited before hitting the cap, in minor units.
True when this credit would exceed the invoice's creditable remaining. A subsequent create call will be rejected with CREDIT_NOTE_OVER_CREDIT.

