MoneyV2 object

Version unstable

A monetary value with currency.

To format currencies, combine this type's amount and currencyCode fields with your client's locale.

For example, in JavaScript you could use Intl.NumberFormat:

new Intl.NumberFormat(locale, {
  style: 'currency',
  currency: currencyCode

Other formatting libraries include:

For a more general solution, the Unicode CLDR number formatting database is available with many implementations, such as TwitterCldr.


Types that return MoneyV2