Give promotional credit
Gives a customer promotional credit, paid for from your own margin. It is active at once and the customer’s next invoices in its currency spend it before tax, so it lowers the VAT like a discount: ₦12,000 of usage with ₦2,000 of credit is ₦10,000 + ₦750 VAT. currency defaults to the customer’s. Credit someone paid for is prepaid credit, not this. Card verification charges and payment-link checkouts never spend it. Voiding an invoice gives back what it spent. A credit note can’t give it back, since credit notes are capped at what the line charged. Needs credits:write on a restricted key. Emits credit_grant.created.
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 - 255Body
"ctm_123"
Major units of currency.
2000
255"Launch promotion"
"NGN"
In the future. Leave out for credit that never expires.