POST
/
v1
/
customers
/
{id}
/
credits
/
{productId}
/
purchase

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
productId
string
required

Body

application/json
credit_count
number
required

Value indicating a number of credits to add. If price_id is defined, this value must correspond to a full credit pack for the price.

amount_excluding_tax
number

Total custom monetary amount in the currency's smallest unit for the added credits. Either amount_excluding_tax or price_id must be defined.

price_id
string | null

Price ID used to add credits. The price must be of type bundle. Either amount_excluding_tax or price_id must be defined.

Response

201 - application/json
invoice_id
string
required
new_credit_balance
number
required