diff --git a/specs/method-identifiers.html b/specs/method-identifiers.html index ba6e256b..cb22596e 100644 --- a/specs/method-identifiers.html +++ b/specs/method-identifiers.html @@ -74,7 +74,7 @@ Web Platform Incubator Community Group.

- +

Introduction

@@ -102,13 +102,13 @@

Payment Method Identifier

The Payment Method Identifier is a string that uniquely identifies a payment method that a user can use to complete a transaction. For example, Visa, MasterCard, and American Express are payment methods used in some countries.

-
+
This document currently specifies multiple alternate options for payment method identifiers. The Working Group has - not yet selected an approach, which might be one documented in this specification or another as yet undocumented proposal.
+ not yet selected an approach, which might be one documented in this specification or another as yet undocumented proposal.
-

Option 1

+

Option 1a

This section describes an approach to payment method identifiers using URLs.

@@ -211,6 +211,134 @@

Discussion topics

+
+

Option 1b

+

+ This section describes a way of expressing payment method identifiers + using machine-readable URLs that may be aliased to + developer-friendly short identifiers. +

+ +
+

Identifier format

+

+ Payment method identifiers are + absolute URLs that may optionally be + aliased using short identifiers. For example, + https://visa.com/payment-methods/VisaDebit (URL) or + VisaDebit (short identifier). +

+
+ +
+

Short Identifier Registry

+

+ A mapping file establishing short identifiers to payment method + identifier URLs can be found at + https://w3.org/registries/web-payments/v1. + To reduce the load on fetching this file, it is encouraged that + applications hard code the mappings. +

+

+ Any short identifier registry that is not re-parsed every time + will require a message version identifier to be embedded in the + messages that use the short identifiers. The assumption here is + that there is some versioning mechanism that is used by payment + messages such that the payment apps and merchants know how to + process short identifiers. +

+

+ The format of the document located at the short identifier registry + URL above still needs to be determined. Options include a plain + JSON document or a JSON-LD document. The mappings would be as simple + as: "VisaDebit": "https://visa.com/payment-methods/VisaDebit". +

+

+ It is assumed that once the short identifier registry file is created, + it is never updated. The Working Group may periodically release + v2, v3, etc. registry files. +

+
+ +
+

Content at Payment Method Identifier URLs

+

+ Payment method identifier URLs that resolve to content: +

+
    +
  1. MUST be served over HTTPS,
  2. +
  3. SHOULD support HTTP Content Negotiation,
  4. +
  5. SHOULD provide a human-readable document that describes the + payment method when text/html is requested, and
  6. +
  7. SHOULD provide a machine-readable document that describes the + payment method when application/ld+json is requested. +
  8. +
+
+ +
+

Identifier Equivalence

+

When the PaymentRequest API is invoked, the web page provides a + list of identifiers for supported payment methods. The user agent + must compare these identifiers to those available to the user and + use this to filter what the user can select. To determine whether + two identifiers match, perform the following test:

+ +
+
+

Dependencies

+

This section relies on several other underlying specifications.

+
+
URL
+
The terms URL, absolute URL, URL parser, and URL equivalence are defined by [[!url-1-20141209]] (or the editor's draft).
+
+
+
+

Discussion topics

+

The following observations are made about this option:

+ +
+
+

Option 2

This section describes an approach to payment method identifiers using strings that might be reverse domain names.