W3C home > Mailing lists > Public > public-payments-wg@w3.org > January 2016

[webpayments] PROPOSAL: Use strings to represent currency and amount per ISO20022 (#57)

From: Adrian Hope-Bailie <notifications@github.com>
Date: Tue, 19 Jan 2016 12:24:35 -0800
To: w3c/webpayments <webpayments@noreply.github.com>
Message-ID: <w3c/webpayments/issues/57@github.com>
This proposal addresses the question in #40.

The ISO20022 dictionary defines a CurrencyAndAmount [1] data type for passing currencies and amounts in payment messages (as well as some updated version thereof with looser restrictions on the number of digits allowed).

In ISO20022 currencies are represented using the ISO 4217 [2] three-letter alpha code.

The decimal separator is a dot.

An example of an ISO 20022 currency and amount in XML:
<InstdAmt Ccy="EUR">1.00</InstdAmt>

Use formatting rules for the Web Payments WG specifications as follows:
 1. Amounts MUST be represented as an object.
 1. The amount object MUST have at least two named properties: "currency" and "amount".
 1. The value of the amount property MUST be a string consisting only of numeric digits.
 1. The value of the amount property MAY contain a single dot to denote separation of the fractional suffix from the rest of the amount.
 1. If present, the dot MUST NOT be the first character of the amount.
 1. The value of the currency property MUST be expressed as a string of 3 characters.
 1. If the currency is listed in the ISO 4217 Current Currency and Funds list the appropriate alpha currency code MUST be used. 
 1. If the currency is not listed in the ISO 4217 Current Currency and Funds list an appropriate and universally understood code SHOULD be used if available.


  "amount" : "0.12345678"
  "currency" : "XBT"

[1] http://www.iso20022.org/standardsrepository/public/wqt/Description/mx/dico/datatypes/_L8ZcEp0gEeOo48XfssNw8w
[2] https://en.wikipedia.org/wiki/ISO_4217

Reply to this email directly or view it on GitHub:
Received on Tuesday, 19 January 2016 20:25:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:43:13 UTC