--- type: "datatype" title: "Money" datatype: "Money" --- # Money - [Datatypes](/datatypes) - [Definitions](/datatypes-definitions#Money) - [Examples](/datatypes-examples#Money) - [Mappings](/datatypes-mappings#Money) - [Profiles](/datatypes-profiles#Money) ## Overview See also [Examples](datatypes-examples#Money), [Detailed Descriptions](datatypes-definitions#Money), [Mappings](datatypes-mappings#Money), [Profiles](datatypes-profiles#Money) and [Extensions]([%extensions-location%]extensions-datatypes#Money) An amount of currency. \[%dt Money 4%\] The `value` contains the amount of the currency, including an implicit precision. Precision is always important for financial amounts. The `currency` element contains an ISO 4217 code for the currency. Money is used in the following places: \[%dtusage Money%\] ### Alternate Representation There are also circumstances where a financial amount must be represented as the numerator or denominator in a Ratio, where the type is currency. In this context, the Money amount is represented as a [Quantity](#Quantity), using the `MoneyQuantity` constraint: | **Profile Name** | **Rules** | **Formal Definitions** | | --- | --- | --- | | Money Quantity | \[%dt.constraints MoneyQuantity%\] | [XML](moneyquantity.profile.xml), [JSON](moneyquantity.profile.json) | | | Usage: \[%dtusage MoneyQuantity%\] | Note that the profile is different from the other specializations because it is not a type, just rules applied where the Quantity type is used to represent Money amounts. ## Elements - **[Money.value](/datatypes-definitions#Money.value)** [0..1]: [decimal](/decimal) Numerical value (with implicit precision) - **[Money.currency](/datatypes-definitions#Money.currency)** [0..1]: [code](/code) ISO 4217 Currency Code ## Bindings - **Money.currency**: `CurrencyCode` ## Requirements - **Money.value**: The amount of the currency. The value includes an implicit precision in the presentation of the value - **Money.currency**: A code indicating the currency, taken from ISO 4217 ## Comments - **Money.value**: Monetary values have their own rules for handling precision (refer to standard accounting text books) ## Mappings - **Money.value**: v2 Mapping: MO.Value - **Money.currency**: v2 Mapping: MO.Currency