├── .github └── workflows │ ├── auto-publish.yml │ └── tidy.yml ├── .pr-preview.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── echidna-manifest.txt ├── errata.html ├── index.html ├── reports └── implementation.html ├── tidyconfig.txt └── w3c.json /.github/workflows/auto-publish.yml: -------------------------------------------------------------------------------- 1 | # See https://w3c.github.io/spec-prod/ 2 | name: Node CI 3 | 4 | on: 5 | push: 6 | branches: 7 | - gh-pages 8 | pull_request: {} 9 | 10 | jobs: 11 | validate-and-publish: 12 | name: Validate and Publish 13 | runs-on: ubuntu-latest # only linux supported at present 14 | steps: 15 | - uses: actions/checkout@v2 16 | - uses: w3c/spec-prod@v2 17 | with: 18 | TOOLCHAIN: respec 19 | W3C_ECHIDNA_TOKEN: ${{ secrets.ECHIDNA_TOKEN }} 20 | W3C_WG_DECISION_URL: "https://www.w3.org/2016/04/14-wpwg-minutes.html#item02" 21 | W3C_NOTIFICATIONS_CC: "${{ secrets.CC }}" 22 | W3C_BUILD_OVERRIDE: | 23 | specStatus: CRD 24 | -------------------------------------------------------------------------------- /.github/workflows/tidy.yml: -------------------------------------------------------------------------------- 1 | name: Tidy document 2 | on: 3 | workflow_dispatch: {} 4 | push: 5 | branches: 6 | - gh-pages 7 | 8 | jobs: 9 | tidy: 10 | name: Tidy up 11 | runs-on: macos-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - run: brew install tidy-html5 15 | - run: tidy -config tidyconfig.txt -o index.html index.html 16 | - uses: peter-evans/create-pull-request@v3 17 | with: 18 | title: "chore(tidy): tidy up document" 19 | commit-message: "Tidied up document using tidy-html5" 20 | branch: html-tidy 21 | -------------------------------------------------------------------------------- /.pr-preview.json: -------------------------------------------------------------------------------- 1 | { 2 | "src_file": "index.html", 3 | "type": "respec" 4 | } 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | All documentation, code and communication under this repository are covered by the [W3C Code of Ethics and Professional Conduct](https://www.w3.org/Consortium/cepc/). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Web Payments Working Group 2 | 3 | Contributions to this repository are intended to become part of Recommendation-track documents governed by the 4 | [W3C Patent Policy](http://www.w3.org/Consortium/Patent-Policy-20040205/) and 5 | [Software and Document License](http://www.w3.org/Consortium/Legal/copyright-software). To make substantive contributions to specifications, you must either participate 6 | in the relevant W3C Working Group or make a non-member patent licensing commitment. 7 | 8 | If you are not the sole contributor to a contribution (pull request), please identify all 9 | contributors in the pull request comment. 10 | 11 | To add a contributor (other than yourself, that's automatic), mark them one per line as follows: 12 | 13 | ``` 14 | +@github_username 15 | ``` 16 | 17 | If you added a contributor by mistake, you can remove them in a comment with: 18 | 19 | ``` 20 | -@github_username 21 | ``` 22 | 23 | If you are making a pull request on behalf of someone else but you had no part in designing the 24 | feature, you can remove yourself with the above syntax. 25 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All documents in this Repository are licensed by contributors under the [W3C Software and Document License](http://www.w3.org/Consortium/Legal/copyright-software). 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Web Payments - Payment Method Identifers 3 | 4 | This repository contains a draft specification from the [W3C Web Payments Working Group](https://www.w3.org/Payments/WG/). 5 | 6 | This is the Payment Method Identifers sepcification 7 | The editor's draft is available at: http://w3c.github.io/payment-method-id/ 8 | -------------------------------------------------------------------------------- /echidna-manifest.txt: -------------------------------------------------------------------------------- 1 | index.html?specStatus=CR&shortName=payment-method-id respec 2 | -------------------------------------------------------------------------------- /errata.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |62 | This specification defines payment method identifiers and how they are 63 | validated, and, where applicable, minted and formally registered with 64 | the W3C. Other specifications (e.g., 65 | the [[[payment-request]]]) make use of these identifiers to facilitate 66 | monetary transactions on the web platform. 67 |
68 |71 | The working group demonstrates implementation experience by producing 72 | an implementation 74 | report. The report shows two or more independent implementations 75 | passing each mandatory test in the test suite (i.e., each test 77 | corresponds to a MUST requirement of the specification). 78 |
79 |80 | There has been no change in dependencies on other workings groups 81 | during the development of this specification. 82 |
83 |89 | A payment method identifier 90 | is either a: 91 |
92 |103 | Specifications that rely on [=payment method identifiers=] MUST 104 | specify their own rules for handling invalid payment method 105 | identifiers. 106 |
107 |108 | The steps to validate a payment method 109 | identifier with a string |pmi:string| are given by the 110 | following algorithm. It returns true if the |pmi| is valid. 111 |
112 |130 | A URL-based payment method identifier is a 131 | [=URL=] that is valid as per the steps to [=validate a URL-based 132 | payment method identifier=]. 133 |
134 |136 | Developers wanting to use a URL-based payment method identifier for a 137 | third party payment handler are encouraged to read the 139 | Payment Method Best Practice document. 140 |
141 |147 | The steps to validate a URL-based payment method 148 | identifier are given by the following algorithm. The algorithm 149 | takes a [=URL=] |url:URL| as input and returns true if the URL is 150 | valid: 151 |
152 |162 | const valid = [ 163 | { 164 | supportedMethods: "https://example.com/pay", 165 | }, 166 | { 167 | supportedMethods: "https://example.com/pay?version=1", 168 | }, 169 | { 170 | supportedMethods: "https://example.com/pay/version/1", 171 | }, 172 | ]; 173 | 174 | const invalid = [ 175 | { 176 | // ❌ Uses http://, a username, and a password. 177 | supportedMethods: "http://username:password@example.com/pay", 178 | }, 179 | { 180 | // ❌ Uses unknown URI scheme. 181 | supportedMethods: "unknown://example.com/pay", 182 | }, 183 | ]; 184 |185 |
191 | User agents MUST perform comparisons of [=URL-based payment method 192 | identifiers=] using [[URL]]'s [=URL/equal=]. 193 |
194 |200 | It is OPTIONAL for user agents to [=fetch=] a [=URL-based payment 201 | method identifier=]. 202 |
203 |210 | A standardized payment method identifier is a 211 | string that represents a [=standardized payment method=]. 212 |
213 |214 | The syntax of a standardized payment method identifier is 215 | given by the following [[ABNF]]: 216 |
217 |218 | stdpmi = part *( "-" part ) 219 | part = 1loweralpha *( DIGIT / loweralpha ) 220 | loweralpha = %x61-7A 221 |222 |
223 | User agents MAY support zero or more [=standardized payment method 224 | identifiers=] listed in section [[[#registry]]]. 225 |
226 |231 | The steps to validate a standardized payment method 232 | identifier are given by the following algorithm. The algorithm 233 | takes a |string:string| as input and returns true if the identifier 234 | is valid: 235 |
236 |281 | For [=standardized payment method identifiers=], user agents MUST 282 | perform string comparisons using [=string/is=]. 283 |
284 |303 | A standardized payment method is a payment method that has 304 | undergone standardization at the W3C, and is listed in this registry. 305 |
306 |307 | At this time there are no [=standardized payment method identifiers=]. 308 |
309 |315 | Developers wanting to use a URL-based payment method identifier for a 316 | third party payment handler are encouraged to read the 317 | [[[payment-method-manifest]]] specification and the 319 | Payment Method Best Practice wiki page. Together, these documents 320 | describe how to manage the ecosystem of authorized payment handlers for 321 | a payment method, including just-in-time payment handler installation 322 | by the browser. 323 |
324 |330 | This specification does not introduce any new security considerations. 331 |
332 |338 | There are no known privacy or security concerns to be taken into 339 | considerations at this time. 340 |
341 |