A credit note documents a correction to an issued invoice. Each note belongs to one invoice and preserves the discount and tax share of its frozen lines. Allocate its credit against an outstanding balance, or create a linked refund on a paid invoice.
A note starts as a draft you can edit freely. Issuing it assigns credit_note_number, freezes the lines, and renders the PDF. Issuing without refund does not move money. Allocating credit against the balance does: it reduces outstanding_money and can close the invoice as credited. Allocations are append-only: reversing one leaves the original in place with reversed_at set and reopens the balance.
Allocation and refund creation require a caller-chosen Idempotency-Key. Issue also requires it when refund is provided. Refund command identities are retained for the lifetime of their financial effects. Use the credit-note refunds list with idempotency_key to recover a lost response.
A refund can cover all or part of the available credit. pending_refund_money reserves unresolved amounts; refunded_money records successful amounts. Both reduce unallocated_money. Refunds leave the invoice paid and preserve the issued document. Issue returns the credit note at data with an optional data.refund; refund creation returns the Refund resource at data.
See the Credit notes guide for an end-to-end walkthrough, and Invoicing for the invoice underneath.
