Skip to main content
POST
cURL
Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance.

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
default:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Path Parameters

id
string
required

Body

application/json
creditPackId
string
required
Minimum string length: 1

Response

Success

credits
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
object
string
required
Allowed value: "credit_grant"
livemode
boolean
required