Correct one of your paid invoices with a numbered credit note, added to the customer's credit balance or refunded to the card
An issued invoice is never edited. The note's amount goes to the customer's credit balance in the invoice's currency and pays their next invoice, or, with refund_to_card, back to the card through the payment provider that took the payment (the note's refund_state says whether it went through; a refund nobody answers is sent again, and a failed one can be retried with POST /v1/credit-notes/{id}/retry-refund). The notes of an invoice never add up to more than the invoice. Only a paid invoice can be credited: `409 billing.credit_note.not_paid` for any other, `409 billing.credit_note.fully_credited` when nothing is left of it, `409 billing.credit_note.nothing_to_refund` when refund_to_card is asked of a payment no provider can return. Works on the invoices of the key's (or the signed-in person's) own environment only. Needs `invoices:write`. Recorded in the audit log (`credit_note.issued`).
Loading the operation...
Ingest usage events (1..500 per request, at most 1 MiB) POST
Answers `202` with one result per event, in request order, for any structurally valid batch. A bad event does not fail the batch: it comes back `rejected` with an `error_code`. Live keys must send an `idempotency_key` per event; a retry with the same key and payload returns `duplicate` with the original `event_id`. `quantity` may be a JSON string or number and is parsed as an exact decimal (never as a float). The `ingest` rate limit is charged per event.
Make a link to the invoice that its customer can open without signing in POST
The link shows the finalized invoice as a page, and its PDF once it is rendered. It is unguessable (256 random bits; only a hash is kept), works until expires_in_days (default 90, at most 365) or until revoked, and the token is returned once. The page is not indexed or cached, loads nothing from elsewhere, and is available in English, Turkish, German, French, Spanish and Arabic (`?lang=` or the browser's language). The url is absolute when the deployment has a public address set.