Skip to main content
POST
Create a credit unit

Authorizations

Authorization
string
header
required

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

Body

application/json

A new credit unit.

code
string
required

Immutable once created: 4 to 16 characters, A-Z/0-9/_, starting with a letter. Never an ISO currency code (those are always 3 letters).

name
string
required

Singular display name, 1 to 64 characters, e.g. "Credit".

plural_name
string
required

Plural display name, 1 to 64 characters, e.g. "Credits".

precision
integer<int32>
required

Immutable once created: 0 to 6.

Required range: x >= 0
symbol
string | null

Short display symbol, at most 8 characters.

Response

Created

A tenant-defined denomination usage can be priced or credit granted in, instead of money. code and precision are immutable once created.

archived
boolean
required

Archived units take no new prices, packs or grants; existing ones keep working.

code
string
required

Upper-case code naming the unit in wallets, grants and webhooks, e.g. CREDITS.

id
string
required

The unit's id (cun_…).

name
string
required

Singular display name, e.g. "Credit".

plural_name
string
required

Plural display name, e.g. "Credits".

precision
integer<int32>
required

Minor-unit exponent: amounts of this unit are integers of 10^-precision credit.

Required range: x >= 0
prices
object[]
required

The active selling prices, one per currency.

product_id
string | null

The product sales of this unit are booked under: their tax category and accounting code. The unit can be sold (top-ups) only once it is set.

symbol
string | null

Short display symbol, e.g. "cr".