Skip to main content
POST
Create credit pool

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Body

application/json

A credit pool object with initial configuration and top-up settings.

customerId
string<uuid>
required

The unique identifier of the customer the credit pool belongs to.

currencyUnitCode
string
required

Code of the currency unit the pool's credits are denominated in. Must be a non-default currency unit registered on the tenant.

Example:

"USD"

startDate
string<date>
required

Date the credit pool starts, when the initial credits are loaded.

renewalCreditAmount
string
required

Amount of credits granted to the pool on each renewal, as a decimal string in the pool's currency unit.

Pattern: ^\d+(\.\d{1,6})?$
topUpSettings
object
required

The top-up settings of the credit pool: the credit package purchased when the pool's balance needs replenishing.

Response

The request was successfully processed, and the credit pool has been created.

id
string<uuid>
required

The unique identifier of the credit pool in our system.

customerId
string<uuid>
required

The unique identifier of the customer the credit pool belongs to.

currencyUnitId
string<uuid>
required

The unique identifier of the currency unit the pool's credits are denominated in.

startDate
string<date>
required

Date the credit pool starts, when the initial credits are loaded.

renewalCreditAmount
string
required

Amount of credits granted to the pool on each renewal, as a decimal string in the pool's currency unit.

Pattern: ^\d+(\.\d{1,6})?$
availableAmount
string
required

Current credit balance available for consumption, as a decimal string in the pool's currency unit.

Pattern: ^\d+(\.\d{1,6})?$
scheduleRenewalDate
string<date>
required

Date of the next scheduled renewal, when renewalCreditAmount is granted to the pool.

topUpSettings
object
required

Schema representing the top-up settings of a credit pool: the credit package purchased when the pool's balance needs replenishing. Purchases appear on invoices as credit purchase line items.

currencyUnit
object
required

Schema representing a currency unit: the unit credits and credit-consuming usage are denominated in. BRL is the default; tenants can define custom credit units.