Update a subscription
Early access. A usage threshold and a minimum commitment are metered billing: until that is turned on for your account, setting one is refused with a 422 (sending null always works). Build against it now and ask us to turn it on.
Change the settings that don’t touch the subscription’s items: the
usage threshold (send null to stop invoicing early) and the minimum
commitment (send null to remove it). Send one or both; a field you
leave out is left as it is, and a body with neither is refused.
A minimum commitment change applies from now: the current period is held to each amount for the part of the period it was in force. A spending cap change holds the whole current period to the new cap. Invoices already issued don’t change.
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
Payment terms for manual invoices issued from now on; null goes back to the business's terms.
0 <= x <= 365A new purchase order number for invoices issued from now on; null removes it. Invoices already issued keep theirs.
100Major currency units. For example, 15000 means NGN 15,000.
x >= 0The least the subscription bills each period, in major units of its currency. null removes it.
x >= 0The most the subscription bills each period. A new cap holds the whole current period, usage so far included: raised, it gives the full new room; lowered below what the period already billed, nothing more is billed (what was billed stays). Its warning points start over. null removes it. A cap on everything it bills can't be below the minimum commitment.