v20

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-214885191.3 KB
Customers

Grant credits to a customer

Adds credits to a customer balance. Use Idempotency-Key to make grants safe to retry.

post/v1/sdk/customers/{reference}/credits

Path parameters

referencestring required
Example:cus_3c4d5e6f7g8h

Customer reference identifier

Headers

Idempotency-Keystring

Provider-scoped idempotency key for safe grant retries

Request body

creditsinteger required
reasonstring

Response

Credits granted successfully

balancenumber required

Customer credit balance after the grant

creditsnumber required

Granted credit amount

customerRefstring required

Customer reference identifier

reasonstring

Machine-readable grant reason

successboolean required

Whether the grant was recorded