Money

data class Money(val amountMinor: Long, val currency: String)

An amount of money in the smallest indivisible unit of currency (paise for INR, cents for USD).

Integer minor units avoid floating-point rounding errors — the cardinal rule of money handling. Formatting to a human string (and to gateway-specific representations, e.g. UPI's two-decimal "10.00" string) is a presentation concern handled at the edges, never in the value type.

Constructors

Link copied to clipboard
constructor(amountMinor: Long, currency: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard