data: {
// List of credential IDs obtained from the bank.
credentialIds,
rpId: "fancybank.com",
// The challenge is also obtained from the bank.
challenge: new Uint8Array([21,31,105 /* 29 more random bytes generated by the bank */]),
instrument: {
displayName: "Fancy Card ****1234",
icon: "https://fancybank.com/card-art.png",
},
payeeName: "Merchant Shop",
payeeOrigin: "https://merchant.com",
timeout: 360000, // 6 minutes
}], {
total: {
label: "Total",
amount: {
currency: "USD",
value: "5.00",
},
},
});
Example 2 (linked above) shows the use of a secure payment confirmation request. The request structure is described in section 4.1.3 and includes a locale member for negotiating the locale of the response.
It would be useful to show this mechanism in the example, especially since the examples are all in English and somewhat U.S.-centric. It would be okay to show using en or en-US as the locale requested. Note that this is an editorial comment.
1.2.2. Authentication on merchant site https://w3c.github.io/secure-payment-confirmation/#authentication-example
Example 2 (linked above) shows the use of a secure payment confirmation request. The request structure is described in section 4.1.3 and includes a
locale
member for negotiating the locale of the response.It would be useful to show this mechanism in the example, especially since the examples are all in English and somewhat U.S.-centric. It would be okay to show using
en
oren-US
as the locale requested. Note that this is an editorial comment.