MoneyV2

Version 2019-04

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
}).format(amount);

Other formatting libraries include:

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

Show definition
"""
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:
```js
new Intl.NumberFormat(locale, {
  style: 'currency',
  currency: currencyCode
}).format(amount);
```
Other formatting libraries include:
* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter)
* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html)
* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php)
For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations
(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)).
"""
type MoneyV2 {
  """
  Decimal money amount.
  """
  amount: Decimal!
  """
  Currency of the money.
  """
  currencyCode: CurrencyCode!
}

Fields

amount (Decimal!)

Decimal money amount.

currencyCode (CurrencyCode!)

Currency of the money.

Version 2019-07 (Latest)

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
}).format(amount);

Other formatting libraries include:

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

Show definition
"""
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:
```js
new Intl.NumberFormat(locale, {
  style: 'currency',
  currency: currencyCode
}).format(amount);
```
Other formatting libraries include:
* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter)
* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html)
* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php)
For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations
(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)).
"""
type MoneyV2 {
  """
  Decimal money amount.
  """
  amount: Decimal!
  """
  Currency of the money.
  """
  currencyCode: CurrencyCode!
}

Fields

amount (Decimal!)

Decimal money amount.

currencyCode (CurrencyCode!)

Currency of the money.

Version 2019-10 (Release candidate)

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
}).format(amount);

Other formatting libraries include:

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

Show definition
"""
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:
```js
new Intl.NumberFormat(locale, {
  style: 'currency',
  currency: currencyCode
}).format(amount);
```
Other formatting libraries include:
* iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter)
* Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html)
* PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php)
For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations
(such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)).
"""
type MoneyV2 {
  """
  Decimal money amount.
  """
  amount: Decimal!
  """
  Currency of the money.
  """
  currencyCode: CurrencyCode!
}

Fields

amount (Decimal!)

Decimal money amount.

currencyCode (CurrencyCode!)

Currency of the money.

Sign up for a Partner account to get started.

Sign up