├── .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 | Payment Method Identifiers Errata 6 | 10 | 33 | 34 | 35 |
36 | ## Abstract 37 | This document catalogues errata for the [Payment Method Identifiers](https://w3.org/TR/payment-method-id/) W3C Recommendation. 38 |
39 | 40 | ## Process for submitting errata 41 | 42 | Please [file an issue](https://github.com/w3c/payment-method-id/issues) on Github. 43 | 44 | ## Unaddressed errata 45 | None. 46 | 47 | ## Errata approved by the Working Group 48 | None. 49 | 50 | 51 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Payment Method Identifiers 6 | 7 | 8 | 10 | 58 | 59 | 60 |
61 |

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 |
69 |
70 |

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 |
84 |
85 |

86 | Payment method identifiers (PMIs) 87 |

88 |

89 | A payment method identifier 90 | is either a: 91 |

92 | 98 |
99 |

100 | Validity 101 |

102 |

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 |
    113 |
  1. Let |url:URL| be the result of running the [=basic URL parser=] 114 | with |pmi|. 115 |
  2. 116 |
  3. If |url| is failure, [=validate a standardized payment method 117 | identifier=] with |pmi| and return the result. 118 |
  4. 119 |
  5. Otherwise, [=validate a URL-based payment method identifier=] 120 | passing |url| and return the result. 121 |
  6. 122 |
123 |
124 |
125 |
126 |

127 | URL-based payment method identifiers 128 |

129 |

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 |
135 |

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 |
142 |
143 |

144 | Validation 145 |

146 |

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 |
    153 |
  1. If |url|'s [=url/scheme=] is not "https", return false. 154 |
  2. 155 |
  3. If |url|'s [=url/username=] or [=url/password=] is not the empty 156 | string, return false. 157 |
  4. 158 |
  5. Otherwise, return true. 159 |
  6. 160 |
161 |
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 |
186 |
187 |

188 | Comparison 189 |

190 |

191 | User agents MUST perform comparisons of [=URL-based payment method 192 | identifiers=] using [[URL]]'s [=URL/equal=]. 193 |

194 |
195 |
196 |

197 | Fetching (dereferencing) 198 |

199 |

200 | It is OPTIONAL for user agents to [=fetch=] a [=URL-based payment 201 | method identifier=]. 202 |

203 |
204 |
205 |
206 |

207 | Standardized payment method identifiers 208 |

209 |

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 |
227 |

228 | Validity 229 |

230 |

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 |
    237 |
  1. Return true if |string| conforms to the [=syntax of a 238 | standardized payment method identifier=]. Otherwise, return false. 239 |
  2. 240 |
241 | 275 |
276 |
277 |

278 | Comparison 279 |

280 |

281 | For [=standardized payment method identifiers=], user agents MUST 282 | perform string comparisons using [=string/is=]. 283 |

284 |
285 |
286 |
287 |

288 | Registry of standardized payment methods 289 |

290 | 302 |

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 |
310 |
311 |

312 | URL-based PMI and third-party payment handlers 313 |

314 |

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 |
325 |
326 |

327 | Security considerations 328 |

329 |

330 | This specification does not introduce any new security considerations. 331 |

332 |
333 |
334 |

335 | Privacy considerations 336 |

337 |

338 | There are no known privacy or security concerns to be taken into 339 | considerations at this time. 340 |

341 |
342 |
343 |
344 | 345 | 346 | -------------------------------------------------------------------------------- /reports/implementation.html: -------------------------------------------------------------------------------- 1 |

Coming Soon

-------------------------------------------------------------------------------- /tidyconfig.txt: -------------------------------------------------------------------------------- 1 | char-encoding: utf8 2 | indent: yes 3 | wrap: 80 4 | tidy-mark: no 5 | -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": ["83744"], 3 | "contacts": ["sideshowbarker"], 4 | "repo-type": "rec-track" 5 | } 6 | --------------------------------------------------------------------------------