Abstract

The Payment Request API [PAYMENT-REQUEST-API] requires that merchants supply a list of identifiers for supported payment methods. This document defines those identifier strings and how they are created.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

The working group maintains a list of all bug reports that the group has not yet addressed. This draft highlights some of the pending issues that are still to be discussed in the working group. No decision has been taken on the outcome of these issues including whether they are valid. Pull requests with proposed specification text for outstanding issues are strongly encouraged.

This specification was derived from a report published previously by the Web Platform Incubator Community Group.

This document was published by the Web Payments Working Group as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-payments-wg@w3.org (subscribe, archives). All comments are welcome.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 September 2015 W3C Process Document.

1. Introduction

This section is non-normative.

One of the principles of the PaymentRequest API is that merchants must know how to accept payments from the payment methods that they claim to support. This allows the API to abstract away the details of specific payment methods and to add new ones over time without changing the API specification.

As part of the paymentRequest() call, the web page provides an array of strings that identify the supported payment methods. This document defines those strings.

2. Dependencies

This specification relies on several other underlying specifications.

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

3. 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.

3.1 Identifier format

Payment method identifiers are strings containing a URL. The string MUST be an absolute URL.

3.2 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:

A. Issues

The following issues are tracking aspects of the payment method identifier specification:

Issue: Write-up initial proposal for payment app registration spec

A registration mechanism may exist to install the code for new payment methods into the user agent. This process would add support for a new payment method to the user agent. This mechanism should be defined in a separate specification.

There is an initial outline making a proposal.

Issue 3: Should a payment method identifier (URL) resolve to a machine readable resource that describes it?

There is an open issue about whether payment method identifiers should resolve to a resource if they are URLs.

B. References

B.1 Normative references

[url-1-20141209]
Anne van Kesteren; Sam Ruby. W3C. URL. 9 December 2014. W3C Working Draft. URL: https://www.w3.org/TR/2014/WD-url-1-20141209/

B.2 Informative references

[PAYMENT-REQUEST-API]
Adrian Bateman; Zach Koch; Richard Barnes; Roy McElmurry. Payment Request API. W3C Working Draft. URL: https://www.w3.org/TR/payment-request/