Skip to main content
POST
Issue a credit note

Authorizations

Authorization
string
header
required

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

Idempotency-Key
string
required

Required for POST and PATCH requests. Replays identical method + path + body requests and rejects mismatched re-use.

Required string length: 1 - 255

Path Parameters

invoice
string
required

Body

application/json

Give amount or lines, not both.

reason
string
required
Maximum string length: 255
Example:

"Billed 10 seats instead of 8"

destination
enum<string>

invoice (the default on an unpaid invoice) takes the credit off what is owed. On a paid invoice say refund, balance or outside.

Available options:
invoice,
refund,
balance,
outside
amount
number | null

Major currency units. For example, 15000 means NGN 15,000.

Required range: x >= 0
lines
object[]
Minimum array length: 1

Response

Credit note response.

data
object
required
meta
object
required