Purchase credits
Purchase a number of credits. This action will generate an invoice and charge the customer. Can take a few seconds to complete.
POST
/
v1
/
customers
/
{id}
/
credits
/
{productId}
/
purchase
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
id
string
requiredproductId
string
requiredBody
application/json
credit_count
number
requiredValue 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
requirednew_credit_balance
number
requiredWas this page helpful?