Issue a credit note
Credits an amount spread over the invoice’s lines in proportion to what is left on each, or named amounts per line (lines, using the invoice lines’ id). Amounts are major units off the line totals, tax included; the tax inside is reversed at the rate the invoice was issued with. Refused on a void or draft invoice, past the invoice’s total, past what is left on a line, and while a charge on the invoice is still processing. An unpaid invoice credited down to nothing is marked paid with no payment, and if it was a subscription’s overdue debt, the subscription is treated as after a write-off. On a paid invoice destination is required: refund sends the money back to the card that paid (it needs refunds:write too), balance keeps it as customer balance that pays their next invoices, and outside records that you paid it back another way. A credit on an invoice the customer balance paid part of gives that part back to the balance first (lowering balanceApplied), and only the rest comes off amountPaid, so a refund only returns what the card paid. When the balance’s part covers the whole credit, a refund is issued as balance and nothing goes to the card.
Authorizations
Use a Bouclay secret key (sk_test_..., sk_live_...) or restricted key
(rk_test_..., rk_live_...).
A secret key can call every endpoint. A restricted key can only call the
endpoints its scopes cover. A scope is {resource}:{access}, for example
customers:read or refunds:write, and write includes read. GET
requests need read access and everything else needs write, except
POST /subscriptions/{id}/items/{item}/preview, which only needs
subscriptions:read. A request outside the key's scopes gets 403 permission_denied naming the missing scope, and its Idempotency-Key
is not used up.
Publishable keys (pk_...) are rejected by server-side API endpoints. A
key's mode scopes what it can see and charge: a test key can never reach
a live card.
Headers
Required for POST and PATCH requests. Replays identical method + path + body requests and rejects mismatched re-use.
1 - 255Path Parameters
Body
Give amount or lines, not both.
255"Billed 10 seats instead of 8"
invoice (the default on an unpaid invoice) takes the credit off what is owed. On a paid invoice say refund, balance or outside.
invoice, refund, balance, outside Major currency units. For example, 15000 means NGN 15,000.
x >= 01