-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
532 lines (474 loc) · 16.4 KB
/
index.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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE html>
<html>
<head>
<title>Web Payments Messaging 1.0</title>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
<!--
=== NOTA BENE ===
For the three scripts below, if your spec resides on dev.w3 you can check them
out in the same tree and use relative links so that they'll work offline,
-->
<link rel="stylesheet" href="spec.css">
<script src='https://www.w3.org/Tools/respec/respec-w3c-common' async class='remove'></script>
<script src='utils.js' async class='remove'></script>
<script type="text/javascript" class="remove">
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "CG-DRAFT",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "web-payments-messaging",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
// previousPublishDate: "1977-03-15",
// previousMaturity: "WD",
// if there a publicly available Editor's Draft, this is the link
edDraftURI: "https://web-payments.org/specs/source/web-payments-messaging/",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Manu Sporny", url: "http://digitalbazaar.com/",
company: "Digital Bazaar, Inc.", companyURL: "http://digitalbazaar.com/" },
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
authors: [
{ name: "Manu Sporny", url: "https://manu.sporny.org/",
company: "Digital Bazaar, Inc.", companyURL: "http://digitalbazaar.com/" },
{ name: "Dave Longley", url: "https://github.com/dlongley",
company: "Digital Bazaar, Inc.", companyURL: "http://digitalbazaar.com/" },
],
// extend the bibliography entries
//localBiblio: ,
// name of the WG
wg: "W3C Web Payments Community Group",
// URI of the public WG page
wgURI: "http://www.w3.org/community/webpayments/",
// name (with the @w3c.org) of the public mailing to which comments are due
wgPublicList: "[email protected]",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI: "",
maxTocLevel: 4,
preProcess: [ ] /*,
alternateFormats: [ {uri: "diff-20111214.html", label: "diff to previous version"} ],
*/
};
</script>
</head>
<body>
<section id="abstract">
<p>
This document details a set of messages that can be used to register
payment apps, request payments, and acknowledge payment requests. The
messages are communication channel agnostic and can be transferred via
browser APIs, REST APIs, QRCode, NFC, or Bluetooth connections.
</p>
</section>
<section id="sotd">
<p>There are a number of ways that one may participate in the development of
this specification:</p>
<ul>
<li>Ad-hoc technical discussion primarily occurs on the public community mailing list:
<a href="http://lists.w3.org/Archives/Public/public-webpayments/">[email protected]</a></li>
<li><a href="http://payswarm/minutes/">Public Web Payments Community Group teleconferences</a>
are held on Wednesdays at 1600UTC every other week.</li>
<li>Specification bugs and issues should be reported in the
<a href="https://github.com/web-payments/web-payments.org/issues">issue tracker</a>
if you do not want to send an e-mail to the public-webpayments mailing
list.</li>
<li><a href="https://github.com/web-payments/web-payments.org/tree/master/">Source code</a>
for the specification can be found on Github.</li>
</ul>
</section>
<section class="informative">
<h1>Introduction</h1>
<p>
This document details a set of messages that can be used to register
payment apps, request payments, and acknowledge payment requests. The
messages are communication channel agnostic and can be transferred via
browser APIs, REST APIs, QRCode, NFC, or Bluetooth connections.
</p>
<section class="informative">
<h2>How to Read this Document</h2>
<p>
This document is a detailed specification for a set of messages that
can be used to register payment apps, request payments, and
acknowledge payment requests. The messages are communication channel agnostic
and can be transferred via browser APIs, REST APIs, QRCode, NFC, or Bluetooth
connections. The document is primarily intended for the following
audiences:</p>
<ul>
<li>Software developers who want to understand the design decisions
associated with each message.</li>
<li>Software developers who want to implement the messages.</li>
</ul>
</section>
<section class="normative">
<h2>Terminology</h2>
<p class="issue">
The terminology in this specification's terminology and messages need to be
updated to match the
<a href="https://github.com/w3c/webpayments/wiki/A-Payments-Initiation-Architecture-for-the-Web">Payments Architecture document</a>
and the latest changes to the <a href="http://wicg.github.io/web-payments-browser-api/">Web Payments Browser API</a>.
</p>
<div data-include="//w3c.github.io/webpayments-ig/latest/common/terms.html"
data-oninclude="restrictReferences">
</div>
</section>
</section>
<section>
<h2>Message Formats</h2>
<section>
<h3>Payment App Registration</h3>
<p>
A <a>payment app</a> registration message is used by a <a>payer</a> to
add a payment app to the list of payment apps that can be used
to complete a payment.
</p>
<pre id="card-instrument" class="example" title="Example of a credit card payment app registration">
var visaApp = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentApp',
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
label: 'ExampleBank Visa Card',
paymentRequestService: 'https://pay.example.com/services/cards'
};
</pre>
<pre id="bitcoin-instrument" class="example" title="Example of Web-based Bitcoin payment app registration">
var bitcoinApp = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentApp',
paymentMethod: 'https://w3id.org/payment-schemes#Bitcoin',
id: 'bitcoin:19Cgacam5sVryog9QQKjFo1GApy34Qat83',
label: 'BitExample Bitcoin Account',
privateKeyBitcoin: '5JSjcscTvQcCb2h7LxFGwEzVqHM6HqC6xanxwZtymRZg5Z1yWot',
paymentRequestService: 'https://bitcoin.example.com/services/bitcoin'
};
</pre>
<pre id="app-instrument" class="example" title="Example of App-based payment app registration">
var bankingVisaApp = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentApp',
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
label: 'ExampleBank Visa Card',
paymentRequestService: 'intent://pay/#Intent;scheme=bankApp;package=com.example.bank.client.android;end'
};
</pre>
<pre id="iso20022-instrument" class="example" title="Example of ISO20022 payment app registration">
var iso20022App = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentApp',
paymentMethod: 'https://w3id.org/payment-schemes#iso20022',
label: 'Mega Widgets Corporate Account',
paymentRequestService: 'https://bigbank.example.com/services/iso20022'
};
</pre>
</section>
<section>
<h3>Payment Request</h3>
<p>
A payment request message is used by a <a>payee</a> to request payment from
a <a>payer</a>.
</p>
<pre id="card-request-payee-psp" class="example" title="Example of a card payment request using a payee's Payment Service Provider">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest',
description: 'Payment to ExampleMerch for widgets',
acceptedMethod: {
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
transfer: {
amount: '4.35',
currency: 'USD'
},
paymentRequestService: 'https://merchant-psp.example.com/services/getPaymentInfo'
}
};
</pre>
<pre id="card-request-payer-psp" class="example" title="Example of a card payment request using a payer's Payment Service Provider">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest',
description: 'Payment to ExampleMerch for widgets',
acceptedMethod: {
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
transfer: {
amount: '4.35',
currency: 'USD'
},
destination: '20389472398',
}
};
</pre>
<pre id="bitcoin-request" class="example" title="Example of a Bitcoin payment request">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest'
description: 'Payment to ExampleMerch for Widget 1'
acceptedMethod: {
paymentMethod: 'https://w3id.org/payment-schemes#Bitcoin',
transfer: {
amount: '0.0177',
currency: 'BTC'
},
destination: '3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC'
}
};
</pre>
<pre class="example" title="Example of a complex payment request">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest'
description: 'Payment to ExampleMerch for Widget 1'
acceptedMethod: [{
paymentMethod: [
'https://w3id.org/payment-schemes#Visa',
'https://w3id.org/payment-schemes#Mastercard',
'https://w3id.org/payment-schemes#Discover'
],
transfer: {
amount: '4.35',
currency: 'USD'
},
destination: '20389472398'
}, {
paymentMethod: 'https://w3id.org/payment-schemes#Bitcoin',
transfer: {
amount: '0.0177',
currency: 'BTC'
},
destination: '3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC'
}]
};
</pre>
<pre id="iso20022-request" class="example" title="Example of an ISO20022 payment request">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest',
description: 'Payment to ExampleMerch for widgets',
acceptedMethod: {
'@context': 'https://w3id.org/iso20022/v1',
paymentMethod: 'https://w3id.org/payment-schemes#iso20022',
CstmrCdtTrfInitn: {
GrpHdr: {
MsgId: 'ABC/120928/CCT001',
CreDtTm: '2012-09-28T14:07:00',
NbOfTxs: '1',
CtrlSum: '500000',
InitgPty: {
Nm: 'ABC Corporation',
PstlAdr: {
StrtNm: 'Times Square',
BldgNb: '7',
PstCd: 'NY 10036',
TwnNm: 'New York',
Ctry: 'US"
}
}
},
PmtInf: {
PmtInfId: 'ABC/086',
PmtMtd: 'TRF',
BtchBookg: 'false',
ReqdExctnDt: '2012-09-29',
Dbtr: {
Nm: 'ABC Corporation',
PstlAdr: {
StrtNm: 'Times Square',
BldgNb: '7',
PstCd: 'NY 10036',
TwnNm: 'New York',
Ctry: 'US"
}
},
DbtrAcct: {
Id: {
Othr: { "Id: '00125574999" }
}
},
DbtrAgt: {
FinInstnId: { "BICFI: 'BBBBUS33" }
},
CdtTrfTxInf: [
{
PmtId: {
InstrId: 'ABC/120928/CCT001/3',
EndToEndId: 'ABC/987-AC/2012-09-27"
},
Amt: {
InstdAmt: {
Ccy: 'USD',
text: '500000"
}
},
ChrgBr: 'SHAR',
CdtrAgt: {
FinInstnId: { "BICFI: 'BBBBUS66" }
},
Cdtr: {
Nm: 'ABC Corporation',
PstlAdr: {
Dept: 'Treasury department',
StrtNm: 'Bush Street',
BldgNb: '13',
PstCd: 'CA 94108',
TwnNm: 'San Francisco',
Ctry: 'US"
}
},
CdtrAcct: {
Id: {
Othr: { "Id: '4895623" }
}
},
Purp: { "Cd: 'INTC" },
RmtInf: {
Strd: {
RfrdDocInf: {
Tp: {
CdOrPrtry: { "Cd: 'CINV" }
},
Nb: '987-AC',
RltdDt: '2012-09-27"
}
}
}
}
]
}
}
}
};
</pre>
</section>
<section>
<h3>Payment Acknowledgement</h3>
<p>
</p>
<pre id="card-ack" class="example" title="Example of a tokenized card payment acknowledgement">
var acknowledgement = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentAcknowledgement',
description: 'Payment to ExampleMerch for widgets',
selectedpaymentMethod: {
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
status: 'authorized',
token: '10025AB',
transfer: {
amount: '4.35',
currency: 'USD'
},
destination: '20389472398'
}
};
</pre>
<pre id="bitcoin-ack" class="example" title="Example of a Bitcoin payment acknowledgement">
var acknowledgement = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentAcknowledgement',
description: 'Payment to ExampleMerch for widgets',
selectedpaymentMethod: {
id: 'bitcoin-transaction:78526206ef357c35398d3b020e6e09f38d77729cc4a70a6facd463bb146a4c90',
paymentMethod: 'https://w3id.org/payment-schemes#Bitcoin',
transfer: {
amount: '0.035',
currency: 'BTC'
},
destination: '1LuckyR1fFHEsXYyx5QK4UFzv3PEAepPMK',
confirmations: 31
}
};
</pre>
<pre id="iso20022-ack" class="example" title="Example of an ISO20022 payment acknowledgement">
var acknowledgement = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentAcknowledgement',
description: 'Payment for shipment of widgets',
selectedpaymentMethod: {
'@context': 'https://w3id.org/iso20022/v1',
paymentMethod: 'https://w3id.org/payment-schemes#iso20022',
CstmrPmtStsRpt: {
GrpHdr: {
MsgId: 'XMPL/120928-PSR/001',
CreDtTm: '2015-10-01T09:20:11',
InitgPty: {
Nm: 'Example Corporation',
PstlAdr: {
StrtNm: 'Main Street',
BldgNb: '1242',
PstCd: 'VA 24060',
TwnNm: 'Somewhereville',
Ctry: 'US'
}
},
DbtrAgt: {
FinInstnId: { 'BICFI': 'XMPLUS12' }
}
},
OrgnlGrpInfAndSts: {
OrgnlMsgId: 'XMPL/120928/CCT001',
OrgnlMsgNmId: 'pain.001.001.05',
OrgnlCreDtTm: '2015-10-01T12:14:42',
OrgnlNbOfTxs: '2',
OrgnlCtrlSum: '500000',
GrpSts: 'ACCP'
}
}
}
};
</pre>
</section>
<section>
<h2>Security Considerations</h2>
<section>
<h3>Message Integrity</h3>
<p>
It is possible to sign any JSON-LD based message by using
Linked Data Signatures, like so:
</p>
<pre id="signed-card-request" class="example" title="Example of a signed card payment request">
var req = {
'@context': 'https://w3id.org/web-payments/v1',
type: 'PaymentRequest',
description: 'Payment to ExampleMerch for widgets',
acceptedMethod: {
paymentMethod: 'https://w3id.org/payment-schemes#Visa',
transfer: {
amount: '4.35',
currency: 'USD'
},
paymentRequestService: 'https://merchant-psp.example.com/services/getPaymentInfo'
},
signature: {
type: 'LinkedDataSignature2015',
creator: 'https://merchant.example.com/keys/23',
created: '2015-09-23T20:21:34Z',
nonce: '239807882930744351',
signatureValue: 'NGVkMzVmOGQz4NTIyZTkZ...OWM32NjIgoYzI43Q3ODIy='
}
};
</pre>
</section>
</section>
</section>
<section class="appendix informative">
<h2>Acknowledgements</h2>
<p>
The editor would like to thank the Web Payments Community Group and the
Web Payments Interest Group.
</p>
<p>
Thanks to the following individuals, in order of their first name, for
their input on the specification: ...
</p>
</section>
</body>
</html>