Issue a credit note
POST /v1/credit-notes needs the sales:write scope. Send an Idempotency-Key.
The buyer and the lines are copied from the original sale, so you do not send them.
Reasons
The response
The response has the same shape as a sale, underdata.sale. It has type: "credit_note", an originalSaleId, and
negative amounts. Its receipt.originalCuInvoiceNo is the CU invoice number of the sale it reverses.
201 accepted, 202 still in flight, 422 rejected, and 200 with
Idempotent-Replayed: true for a repeat of the same request. You can download its receipt with
GET /v1/sales/{id}/receipt, like any other sale.
Rules and errors
If you get
credit_note_in_progress, wait for the first one, or re-drive it with POST /v1/sales/{id}/retry using
the creditNoteId, instead of issuing another.
Read next
- Sales: the sale you are reversing
- Idempotency: repeating a request safely
- Codes & Values: the reason codes