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

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.

Response

201 - application/json
id
string
required

Credit transaction ID.

product_id
string | null
required

ID of the product related to the transaction.

price
object | null
required

Price details related to the transaction.

customer_id
string
required

ID of the customer related to the transaction.

payment_method_id
string | null
required

ID of the payment method related to the transaction.

invoice_id
string | null
required

ID of the invoice related to the transaction.

event_id
string | null
required

ID of the event related to the credit consumption.

type
enum<string>
required

Type of credit transaction.

Available options:
topup,
usage
source
enum<string>
required

Type of credit transaction.

Available options:
app,
portal,
api
amount_excluding_tax
number
required

Monetary amount in currency's smallest unit.

credit_count
number
required

Value of credits related to the transaction.

balance_after
number
required

Credit balance after the transaction.

created_at
string
required

Credit transaction creation date.

updated_at
string
required

Credit transaction last edition date.