v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03101355448.4 KB
OpenMeter Currencies

Create custom currency

Create a custom currency. This operation allows defining your own custom currency for billing purposes.

post/openmeter/currencies/custom

Request body

namestring required

The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro".

symbolstring

The symbol of the currency. It should be a string that represents the symbol of the currency, such as "$" for US Dollar or "€" for Euro.

precisioninteger required

The precision of the currency. It should be a number that represents the number of decimal places used for the currency, such as 2 for US Dollar or Euro.

decimal_markstring required

The decimal mark for the currency. It should be a string that represents the decimal mark of the currency, such as "." for US Dollar or "," for Euro.

thousand_separatorstring required

The thousand separator for the currency. It should be a string that represents the thousand separator of the currency, such as "," for US Dollar or "." for Euro.

codestring required

Custom currency code. It should be a unique code but not conflicting with any existing fiat currency codes.

Response

CurrencyCustom created response.

type'custom' required

The type of the currency.

namestring required

The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro".

symbolstring

The symbol of the currency. It should be a string that represents the symbol of the currency, such as "$" for US Dollar or "€" for Euro.

precisioninteger required

The precision of the currency. It should be a number that represents the number of decimal places used for the currency, such as 2 for US Dollar or Euro.

decimal_markstring required

The decimal mark for the currency. It should be a string that represents the decimal mark of the currency, such as "." for US Dollar or "," for Euro.

thousand_separatorstring required

The thousand separator for the currency. It should be a string that represents the thousand separator of the currency, such as "," for US Dollar or "." for Euro.

idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

codestring required

Custom currency code. It should be a unique code but not conflicting with any existing fiat currency codes.

created_atstring date-time required

RFC3339 formatted date-time string in UTC.

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "created_at": "2023-01-01T01:01:01.001Z",
  "cost_basis": [
    {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH",
      "fiat_code": "USD",
      "effective_from": "2023-01-01T01:01:01.001Z",
      "effective_to": "2023-01-01T01:01:01.001Z",
      "created_at": "2023-01-01T01:01:01.001Z"
    }
  ]
}