/
Payment-Manifest-Proposal.html
250 lines (217 loc) · 10.6 KB
/
Payment-Manifest-Proposal.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!DOCTYPE html>
<html>
<head>
<title>Payment Method Manifest</title>
<meta charset='utf-8'>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
async class='remove'></script>
<script class='remove'>
var respecConfig = {
shortName: "payment-method-manifest",
//edDraftURI: ,
specStatus: "unofficial",
publishDate: "2016-11-25",
editors: [
{
name: "Zach Koch",
company: "Google"
},
{ name: "Dapeng Liu",
company: "Alibaba" }
],
license: "w3c-software-doc",
noRecTrack: true,
//previousMaturity: "FPWD",
//previousPublishDate: "1977-03-15",
wg: "Web Payments Working Group",
wgURI: "https://www.w3.org/Payments/WG/",
wgPublicList: "public-payments-wg",
wgPatentURI: "https://www.w3.org/2004/01/pp-impl/83744/status",
issueBase: "https://github.com/w3c/browser-payment-api/issues/",
localBiblio: {
"METHOD-IDENTIFIERS": {
title: "Payment Method Identifiers",
href: "https://www.w3.org/TR/payment-method-id/",
authors: [
"Adrian Bateman", "Zach Koch", "Roy McElmurry"
],
status: "WD"
},
"PAYMENT-APP-API": {
title: "Payment App API",
href: "https://w3c.github.io/webpayments-payment-apps-api/",
authors: [
"Adrian Hope-Bailie", "Tommy Thorsen", "Adam Roach", "Jason Normore", "Ian Jacobs"
],
status: "unofficial"
}
}
};
</script>
<style>
dt { margin-top: 0.75em; }
table { margin-top: 0.75em; border-collapse:collapse; border-style:hidden hidden none hidden }
table thead { border-bottom:solid }
table tbody th:first-child { border-left:solid }
table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
li { margin-top: 0.5em; margin-bottom: 0.5em;}
</style>
</head>
<body>
<section id='abstract'>
<p>
The expectation of the Web Payments Working Group is that those who mint payment method identifiers that are URLs (see [[METHOD-IDENTIFIERS]]) will also publish machine readable information that describes how that method participates in the PaymentRequest ecosystem. This specification defines the format and addressing of payment method manifest files.
</p>
</section>
<section id='sotd'>
</section>
<section id="usage-examples">
<h2>Usage Examples</h2>
<section id="use-cases">
<h3>Use Cases</h3>
<p>This specification intends to address the following use cases:</p>
<ol>
<li>The owner of a payment method wishes to authorize only certain parties to distribute payment apps that are capable of implementing the payment method. In this use case, the browser helps to ensure that for that payment method, the user can only invoke payment apps from parties authorized by the owner of the payment method.</li>
<li>In addition, the owner of a payment method wishes to confirm the
authenticity of a particular payment app (e.g., via a digital signature for that app).</li>
<li>When the user has not yet installed a payment app for a payment method, the user agent can provided an improved user experience for procuring a payment app.</li>
</ol>
</section>
<section id="example-manifest">
<h3>Example Manifest</h3>
<p>This section gives an examples of payment method manifest. </p>
<pre class="example highlight">
// payment-manifest.json
{
// Android:
"android": [{
"package": "xyz.bobay.app",
"version": 10,
"sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50"],
"platforms": {
"play": "https://play.google.com/store/apps/details?id=com.bobspayments.app1"
}
}],
// Web:
"name": "Bob's Payments",
"icons": [{
"src": "icon/lowres.webp",
"sizes": "48x48",
"type": "image/webp"
}, {
"src": "icon/lowres",
"sizes": "48x48"
}, {
"src": "icon/hd_hi.ico",
"sizes": "72x72 96x96 128x128 256x256"
}, {
"src": "icon/hd_hi.svg",
"sizes": "257x257"
}],
// iOS:
"ios": {...},
// Other supported payment apps:
"externally_supported_apps": ["https://alicepay.com/pay"]
}
</pre>
</section>
<section id="manifest-file-addressing">
<h3>Manifest File Addressing</h3>
<p>The link header concept is defined in <a href="http://www.rfc-editor.org/rfc/rfc5988.txt">RFC5988</a>. In this specification, HTTP link header is used to point to the payment method manifest file.
For performance reasons, it is desirable to be able to retrieve all information about a payment method (both human-readable and machine-readable) in a single HTTP request. HTTP link header could be used to achieve this goal. </p>
<p>The format of the HTTP link header for manifest is: </p>
<li>Link: < payment manifest file URL >; rel="payment-method-manifest"</li>
<p>For example, the following HTTP link header could be used:</p>
<li>Link: < https://alicepay.com/pay/ >; rel="payment-method-manifest" </li>
<p>A new relationship type "payment-method-manifest" need to be resisted by <a href="http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1">IANA</a>.</p>
<!-- <p class="issue">See <a href="https://github.com/w3c/webpayments-method-identifiers/issues/19">issue 19</a> about payment method manifest file addressing.</p>
<p>The following algorithm is used to determine the address of a payment manifest file given a payment method identifier <code>PMI</code>:</p>
<ol>
<li><em>This is in development. It may involve a sequence of checks, or a single mechanism. It may involve some or none of: deterministic construction of a new URL for the JSON, the use of HTTP headers, and the use of Content Negotiation.<em></li>
</ol>
<section>
<h2>Design Notes</h2>
<ul>
<li>For performance reasons, it is desirable to be able to retrieve all information about a payment method (both human-readable and machine-readable) in a single HTTP request. The Web Payments Working Group intends to look more closely about features of HTTP/2 to achieve this goal.</li>
<li>See the URL construction approach taken by Android's <a href="https://developers.google.com/digital-asset-links/v1/getting-started">Digital Asset Links</a></li>
<li>Using an HTML <code>link</code> element may be too costly an approach as it would require fetching and parsing files.</li>
</ul>
</section>
-->
</section>
</section>
<section id="format">
<h2>Manifest File Format</h2>
<p><em>Define here the overall file format in a way that enables forward and backward compatibility.</em></p>
<section>
<h2>Extensibility</h2>
<p class="issue">The expectation is that the manifest contents may
change over time. What is our extensibility mechanism?</p>
</section>
<section>
<h2>Error Handling</h2>
<p class="issue">How are unrecognized names handled? Bad values?</p>
</section>
</section>
<section id="format">
<h2>Payment App Data</h2>
<p>This specification defines two sections of a payment method manifest file:</p>
<ul>
<li>origins authorized to distribute payment apps for this payment method</li>
<li>data about payment apps used to confirm payment app authenticity and display information about payment apps to enable user selection. <strong>Note:</strong> For scenarios where the payment method owner authorized arbitrary parties to distribute payment apps for that payment method, the Web Payments Working Group is also investigating independent publication of payment app manifest data rather than as part of a payment method manifest file.</li>
</ul>
<p>In the following example, the payment method owner has declared that:</p>
<ul>
<li>The origin alicepay.com is authorized to distribute payment apps that implement the payment method. User agents can use this origin information to improve security.</li>
<li>Only certain (versions of) payment applications can be used. The details of what the payment method owner can specify will be platform-specific; the example is not authoritative. For more information about data for Web-based applications, see [[PAYMENT-APP-API]].</li>
</ul>
<pre class="example highlight">
// payment-manifest.json
{
// Android:
"android": [{
"package": "xyz.bobay.app",
"version": 10,
"sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50"],
"platforms": {
"play": "https://play.google.com/store/apps/details?id=com.bobspayments.app1"
}
}],
// Web:
"name": "Bob's Payments",
"icons": [{
"src": "icon/lowres.webp",
"sizes": "48x48",
"type": "image/webp"
}, {
"src": "icon/lowres",
"sizes": "48x48"
}, {
"src": "icon/hd_hi.ico",
"sizes": "72x72 96x96 128x128 256x256"
}, {
"src": "icon/hd_hi.svg",
"sizes": "257x257"
}],
// iOS:
"ios": {...},
// Other supported payment apps:
"externally_supported_apps": ["https://alicepay.com/pay"]
}
</pre>
<section>
<h2>Origins Authorized to Distribute Payment Apps</h2>
<p><em>Talk here in more detail about externally_supported_apps, etc.</em></p>
</section>
<section>
<h2>Data about Authorized Payment Apps</h2>
<p><em>Talk here in more detail about payment_apps, etc.</em></p>
<p class="issue">How is a default app identified?</p>
</section>
</section>
<section>
<h2>Security Considerations</h2>
<p><em>What happens when there is no payment method manifest available? Is it the responsibility of this specification to define a single error handling behavior? Or at least some security considerations?<em></p>
</section>
</body>
</html>