Re: [w3c/browser-payment-api] Currency Types and Rendering (#185)

Poking around online to see how other people have solved this, I tripped across an interesting approach that is kind of a hybrid between the URL approach and short-code approach: currencies would be identified by a *system*, and a code point within that system. So, for example, for an ISO currency:

```json
{
  "value": "25.00",
  "system": "urn:iso:std:iso:4217",
  "code": "USD"
}
```
And for non-ISO currencies:
```json
{
  "value": "0.041",
  "system": "http://example.com/bitcoin-and-maybe-other-stuff",
  "code": "BTC"
}
```

This gives browsers the ability to at least display the code if they aren't familiar with the system. Payment apps would be expected to use the system to interpret the code, so there's no risk of the merchant providing intentionally confusing information there (as doing so would scuttle the payment).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/185#issuecomment-228117620

Received on Thursday, 23 June 2016 17:12:01 UTC