ConceptioArchiveW3C TR
W3C TRopen access

payment method id

W3C · w3c_tr
W3C TR · Standards · License: Open Access
Open Source ↗
w3c, standard

Payment Method Identifiers W3C Recommendation 08 September 2022 More details about this document This version: https://www.w3.org/TR/2022/REC-payment-method-id-20220908/ Latest published version: https://www.w3.org/TR/payment-method-id/ Latest editor's draft: https://w3c.github.io/payment-method-id/ History: https://www.w3.org/standards/history/payment-method-id Commit history Test suite: https://wpt.live/payment-method-id/ Implementation report: https://w3c.github.io/test-results/payment-method-id/all.html Editor: Marcos Cáceres ( Apple Inc. ) Former editors: Adrian Bateman ( Microsoft Corporation ) Domenic Denicola ( Google ) Zach Koch ( Google ) Roy McElmurry ( Facebook ) Feedback: GitHub w3c/payment-method-id ( pull requests , new issue , open issues ) Errata: Errata exists . See also translations . Copyright © 2022 W3C ® ( MIT , ERCIM , Keio , Beihang ). W3C liability , trademark and permissive document license rules apply. Abstract This specification defines payment method identifiers and how they are validated, and, where applicable, minted and formally registered with the W3C . Other specifications (e.g., the Payment Request API ) make use of these identifiers to facilitate monetary transactions on the web platform. Status of This Document This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/. The working group demonstrates implementation experience by producing an implementation report . The report shows two or more independent implementations passing each mandatory test in the test suite (i.e., each test corresponds to a MUST requirement of the specification). There has been no change in dependencies on other workings groups during the development of this specification. This document was published by the Web Payments Working Group as a Recommendation using the Recommendation track . W3C recommends the wide deployment of this specification as a standard for the Web. A W3C Recommendation is a specification that, after extensive consensus-building, is endorsed by W3C and its Members, and has commitments from Working Group members to royalty-free licensing for implementations. Future updates to this Recommendation may incorporate new features . This document was produced by a group operating under the 1 August 2017 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 2 November 2021 W3C Process Document . Table of Contents Abstract Status of This Document 1. Payment method identifiers (PMIs) 1.1 Validity 2. URL-based payment method identifiers 2.1 Validation 2.2 Comparison 2.3 Fetching (dereferencing) 3. Standardized payment method identifiers 3.1 Validity 3.2 Comparison 4. Registry of standardized payment methods 5. URL-based PMI and third-party payment handlers 6. Security considerations 7. Privacy considerations 8. Conformance A. Index A.1 Terms defined by this specification A.2 Terms defined by reference B. References B.1 Normative references B.2 Informative references 1. Payment method identifiers (PMIs) A payment method identifier ( PMI ) is either a: URL-based payment method identifier , or a standardized payment method identifier . 1.1 Validity Specifications that rely on payment method identifiers MUST specify their own rules for handling invalid payment method identifiers. The steps to validate a payment method identifier with a string pmi are given by the following algorithm. It returns true if the pmi is valid. Let url be the result of running the basic URL parser with pmi . If url is failure, validate a standardized payment method identifier with pmi and return the result. Otherwise, validate a URL-based payment method identifier passing url and return the result. 2. URL-based payment method identifiers A URL-based payment method identifier is a URL that is valid as per the steps to validate a URL-based payment method identifier . Note Developers wanting to use a URL-based payment method identifier for a third party payment handler are encouraged to read the Payment Method Best Practice document. 2.1 Validation The steps to validate a URL-based payment method identifier are given by the following algorithm. The algorithm takes a URL url as input and returns true if the URL is valid: If url 's scheme is not "https", return false. If url 's username or password is not the empty string, return false. Otherwise, return true. Example 1 : valid and invalid URL-based PMIs const valid = [ { supportedMethods : "https://example.com/pay" , }, { supportedMethods : "https://example.com/pay?version=1" , }, { supportedMethods : "https://example.com/pay/version/1" , }, ]; const invalid = [ { // ❌ Uses http://, a username, and a password. supportedMethods : "http://username:[email protected]/pay" , }, { // ❌ Uses unknown URI scheme. supportedMethods : "unknown://example.com/pay" , }, ]; 2.2 Comparison User agents MUST perform comparisons of URL-based payment method identifiers using [ URL ]'s equal . 2.3 Fetching (dereferencing) It is OPTIONAL for user agents to fetch a URL-based payment method identifier . 3. Standardized payment method identifiers A standardized payment method identifier is a string that represents a standardized payment method . The syntax of a standardized payment method identifier is given by the following [ ABNF ]: stdpmi = part *( "-" part ) part = 1loweralpha *( DIGIT / loweralpha ) loweralpha = %x61-7A User agents MAY support zero or more standardized payment method identifiers listed in section 4. Registry of standardized payment methods . 3.1 Validity The steps to validate a standardized payment method identifier are given by the following algorithm. The algorithm takes a string as input and returns true if the identifier is valid: Return true if string conforms to the syntax of a standardized payment method identifier . Otherwise, return false. Note When used in an API, the following method identifiers are all ignored by the user agent. Some user agents might inform developers that identifiers are invalid to help them fix issues. The example below refers to the "basic-card" standardized payment method identifier. Although the Web Payments Working Group has discontinued that work, the identifier serves here as an example. Example : Valid and invalid identifiers const valid = [ { supportedMethods : "basic-card" , }, ]; const invalid = [ { // ❌ Contains Unicode character outside the valid ranges. supportedMethods : "basic-💳" , }, { // ❌ Contains uppercase characters. supportedMethods : "Basic-Card" , }, { // ❌ Contains Unicode characters outside the valid ranges. supportedMethods : "¡basic-*-card!" , }, ]; 3.2 Comparison For standardized payment method identifiers , user agents MUST perform string comparisons using is . 4. Registry of standardized payment methods This section is non-normative. Note There is no need to register a URL-based payment method identifier . Organizations seeking to mint a new identifier for a payment method are encouraged to join the W3C and follow the W3C process . A standardized payment method is a payment method that has undergone standardization at the W3C , and is listed in this registry. At this time there are no standardized payment method identifiers . 5. URL-based PMI and third-party payment handlers This section is non-normative. Developers wanting to use a URL-based payment method identifier for a third party payment handler are encouraged to read the Payment Method Manifest specification and the Payment Method Best Practice wiki page. Together, these documents describe how to manage the ecosystem of authorized payment handlers for a payment method, including just-in-time payment handler installation by the browser. 6. Security considerations This specification does not introduce any new security considerations. 7. Privacy considerations There are no known privacy or security concerns to be taken into considerations at this time. 8. Conformance As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative. The key words MAY , MUST , and OPTIONAL in this document are to be interpreted as described in BCP 14 [ RFC2119 ] [ RFC8174 ] when, and only when, they appear in all capitals, as shown here. A. Index A.1 Terms defined by this specification payment method identifier §1. standardized payment method §4. standardized payment method identifier §3. syntax of a standardized payment method identifier §3. URL-based payment method identifier §2. validate a payment method identifier §1.1 validate a standardized payment method identifier §3.1 validate a URL-based payment method identifier §2.1 A.2 Terms defined by reference [ FETCH ] defines the following: fetch [ INFRA ] defines the following: is (for string ) [ PAYMENT-METHOD-MANIFEST ] defines the following: Payment Method Manifest [ PAYMENT-REQUEST ] defines the following: Payment Request API [ URL ] defines the following: basic URL parser equal (for url ) password (for url ) scheme (for url ) URL username (for url ) B. References B.1 Normative references [ABNF] Augmented BNF for Syntax Specifications: ABNF . D. Crocker, Ed.; P. Overell. IETF. January 2008. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc5234 [fetch] Fetch Standard . Anne van Kesteren. WHATWG. Living Standard. URL: https://fetch.spec.whatwg.org/ [infra] Infra Standard . Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL: https://infra.spec.whatwg.org/ [RFC2119] Key words for use in RFCs to Indicate Requirement Levels . S. Bradner. IETF. March 1997. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc2119 [RFC8174] Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words . B. Leiba. IETF. May 2017. Best Current Practice. URL: https://www.rfc-editor.org/rfc/rfc8174 [URL] URL Standard . Anne van Kesteren. WHATWG. Living Standard. URL: https://url.spec.whatwg.org/ B.2 Informative references [payment-method-manifest] Payment Method Manifest . Dapeng(Max) Liu; Domenic Denicola; Zach Koch. W3C. 12 December 2017. W3C Working Draft. URL: https://www.w3.org/TR/payment-method-manifest/ [payment-request] Payment Request API . Marcos Caceres; Rouslan Solomakhin; Ian Jacobs. W3C. 30 September 2021. W3C Proposed Recommendation. URL: https://www.w3.org/TR/payment-request/ ↑ Permalink exported Referenced in: § 1.1 Validity Permalink exported Referenced in: Not referenced in this document. Permalink exported Referenced in: § 1. Payment method identifiers (PMIs) § 2.2 Comparison § 2.3 Fetching (dereferencing) § 4. Registry of standardized payment methods Permalink exported Referenced in: § 1.1 Validity § 2. URL-based payment method identifiers Permalink exported Referenced in: § 1. Payment method identifiers (PMIs) § 3. Standardized payment method identifiers § 3.2 Comparison § 4. Registry of standardized payment methods Permalink Referenced in: § 3.1 Validity Permalink Referenced in: § 1.1 Validity Permalink Referenced in: § 3. Standardized payment method identifiers Permalink Referenced in: § 2.3 Fetching (dereferencing) Permalink Referenced in: § 3.2 Comparison Permalink Referenced in: § 5. URL-based PMI and third-party payment handlers § B.2 Informative references (2) Permalink Referenced in: § Abstract § B.2 Informative references (2) Permalink Referenced in: § 1.1 Validity Permalink Referenced in: § 2.2 Comparison Permalink Referenced in: § 2.1 Validation Permalink Referenced in: § 2.1 Validation Permalink Referenced in: § 2. URL-based payment method identifiers § 2.1 Validation Permalink Referenced in: § 2.1 Validation

Related documents

Record · ID 126611 · SHA-256 0060c09acd3057bc
Conceptio Open Knowledge Archive — every document is proof-bundled with source, license, and retrieval metadata.