Skip to content

[FEAT]: Add Tunisian Dinar (TND) currency support #5890

Description

@soufiene-slimi

Is your feature request related to a problem? Please describe.
TND (Tunisian Dinar) is a standard ISO 4217 currency that is not currently in the supported currencies list. Tunisian users are unable to use Lago with their local currency.

Describe the solution you'd like
Add TND: "Tunisian Dinar" to the ACCEPTED_CURRENCIES hash in app/models/concerns/currencies.rb and regenerate the GraphQL schema files.

Describe alternatives you've considered
Manually overriding the currency validation on a per-request basis, but this is error-prone and inconsistent with Lago's design.

Additional context
TND uses 3 decimal places (1000 millimes = 1 dinar), which is already accounted for in the frontend serialization (CURRENCIES_WITH_3_DECIMALS in serializeAmount.ts). The money-rails gem natively supports TND. Only the backend currency whitelist needs updating.

Corresponding changes will also be needed in lago-openapi (src/schemas/Currency.yaml).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions