What is custom currency?
Custom currency is pricing in your own unit (such as credits) instead of a standard money currency like USD or EUR. You set and show prices in that unit-for example, “10 credits per month”-and Flexprice converts those amounts to your base currency (e.g. USD) for billing, This ensures a consistent currency for accounting, even though the feature is shown in credits.How it works internally
All billing calculations are performed using the pricing unit’s base currency (for example, USD). Amounts are defined and displayed in the pricing unit (e.g. credits), Conversion happens only at price or wallet creation; Flexprice uses the base currency for all calculations. In other words: input and display use the pricing unit; computation, persistence, and invoicing use base currency. Conversion uses the formula amount in your unit × conversion_rate = amount in base currency. Rounding and precision (e.g. two decimals for USD, zero for JPY) are applied only when invoice charges are computed, not at conversion or when creating prices or price units. Wallet balance is always shown in base currency and credits, whether the wallet was created with fiat or a custom price unit. Flexprice stores and bills everything in the base currency (e.g. USD).Using custom currency
- Create a Price Unit (dashboard or API, below).
- Use in plans — add charges or create prices in your unit; see Use cases.
- Use in wallets — create a wallet in your unit; see Use cases.
Use cases
- Credits or tokens - Sell in credits or tokens; show balance and charges in that unit while billing and storing in base currency (e.g. USD).
- Multi-currency display, single-currency billing - Present prices in a custom unit per region or product while retaining one base currency for accounting and payouts.
Concepts and terminology
Custom currency / Price Unit - Your own pricing unit (e.g. credits) used instead of fiat currency. Defined once as a Price Unit and reused across plans, prices, and wallets, with automatic conversion to the base currency for billing.| Field | Description |
|---|---|
| code | 3-character identifier (e.g. CRD, TOK, fpc) used when referencing the unit in a price or wallet. Must be unique per environment when Active. |
| symbol | Display symbol shown in the UI and on invoices (e.g. ¢, ==). |
| base_currency | The standard currency the unit is pegged to (e.g. usd). All billing and storage use this currency. |
| conversion_rate | Multiplier from the custom unit to base currency. |
conversion_rate = "0.01". Then 100 credits = 1.00 USD.
Price unit types: FIAT vs CUSTOM
- FIAT - Amounts are in a standard currency (USD, EUR, etc.). No conversion is applied.
- CUSTOM - Amounts are in a Price Unit. Flexprice converts to base currency for billing; you configure and display values in the custom unit.
Create a Price Unit (dashboard)

Create a Price Unit (API)
Example request
https://us.api.flexprice.io/v1 or https://api.cloud.flexprice.io/v1 (check out the Create price unit).
Use custom currency in plans and prices
You can add charges or create prices in your custom unit from the dashboard or via the API. In both cases you choose your Price Unit and enter amounts in that unit; Flexprice converts to base currency for billing.Dashboard
For more detail and screenshots, see Use cases: add charges and wallet.
API
Set the price to use your unit
In the create-price request (
POST /v1/prices), set price_unit_type to CUSTOM and include price_unit_config.FIXED), billing_cadence (e.g. RECURRING), and invoice_cadence (e.g. ADVANCE or ARREAR). Below shows the custom-pricing–relevant fields:
conversion_rate = "0.01", 100 CRD = 1.00 USD. Flexprice stores both the custom amount and the base-currency amount and uses base currency for billing.
Billing models
| Model | In price_unit_config | Notes |
|---|---|---|
| FLAT_FEE | price_unit, amount | Fixed price in your unit. |
| PACKAGE | price_unit, amount | transform_quantity is required; for usage add meter_id. |
| TIERED | price_unit, price_unit_tiers | Use price_unit_tiers only, not top-level tiers. For usage add meter_id. |
Refer to the API Reference and Price Unit documentation. check out the API Reference and the Price Unit.

