Create a credit unit
code and precision are immutable once created. Price usage in the unit with a plan fee’s
credit_unit, grant it with a credit pack or a credit grant, and sell it with a top-up once
it has a product_id and a selling price.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A new credit unit.
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).
Singular display name, 1 to 64 characters, e.g. "Credit".
Plural display name, 1 to 64 characters, e.g. "Credits".
Immutable once created: 0 to 6.
x >= 0Short 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 units take no new prices, packs or grants; existing ones keep working.
Upper-case code naming the unit in wallets, grants and webhooks, e.g. CREDITS.
The unit's id (cun_…).
Singular display name, e.g. "Credit".
Plural display name, e.g. "Credits".
Minor-unit exponent: amounts of this unit are integers of 10^-precision credit.
x >= 0The active selling prices, one per currency.
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.
Short display symbol, e.g. "cr".