W3cubDocs

/DOM

PaymentCurrencyAmount.currency

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The PaymentCurrencyAmount property currency is a string which specifies the currency in which the value is specified. The value is always specified using the 3-letter codes defined by the ISO 4127 standard.

Syntax

currency = paymentCurrencyAmount.currency;

Value

A DOMString specifying the canonical, three-character currency identification code defined by the ISO 4217 standard. This is the currency in which the payment's value is given. All currency values must include the currency system in this property.

Example

This example represents the price of $42.95 in US dollars.

let itemPrice = {
  currency: "USD",
  value: "42.95"
};

Specifications

Browser compatibility

No compatibility data found. Please contribute data for "api.PaymentCurrencySystem.currency" (depth: 1) to the MDN compatibility data repository.

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PaymentCurrencyAmount/currency