Skip to content

Commit 3ed9ac7

Browse files
payment instrument info
1 parent b851940 commit 3ed9ac7

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

ux-guidelines.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ other entity) that the user has already been interacting with in the current
2727
session. The `payeeName` field, if present, communicates a natural language
2828
name, such as "Big Shoe Store Inc.", whilst the `payeeOrigin`, if present,
2929
communicates the web URL at which the payee can be found, such as
30-
`https://bigshoestore.example`.
30+
"https://bigshoestore.example".
3131

3232
The specification allows for either one or both of the fields to be present.
3333
Implementors may display them separately, or may combine them into a single
@@ -42,12 +42,61 @@ length limits on fields including payeeName and payeeOrigin.
4242

4343
Relevant fields: [instrument.displayName], [instrument.icon], [instrument.details]
4444

45+
The payment instrument information fields are intended to communicate to the
46+
user which payment instrument will be charged. Common payment instruments
47+
include payment cards (credit, debit, or other), bank accounts, and a number of
48+
country-specific payment methods (e.g., UPI, PIX, GiroPay, etc). SPC has no
49+
requirement or limitation on the type of payment instrument being used or
50+
displayed.
51+
52+
The `displayName` and `details` fields are used to convey textual information
53+
about the payment instrument. As the names suggest, `displayName` should be set
54+
to the primary name for the payment instrument, while `details` can be used to
55+
add additional clarifying details to help the user differentiate or make
56+
decisions. For example, for a credit card payment instrument, `displayName`
57+
may be set to the product name for the card (e.g., "FancyBank Infinity Card"),
58+
whilst details might include the last four digits of the card and/or expiry
59+
date (e.g., "1234 01/32).
60+
61+
Note: An implementor may truncate the `displayName` and `details` fields in
62+
order to fit the text into the available UX space. See issue #269 for
63+
discussions on setting normative length limits on fields including payeeName
64+
and payeeOrigin.
65+
66+
The `icon` field is set to the URL of an image representing the payment
67+
instrument. Implementors are expected to support common image formats such as
68+
PNG or JPG. The payment instrument icon image is intended to be a quick visual
69+
confirmation for the user, and is expected to be displayed fairly small.
70+
71+
Implementation specifics:
72+
73+
- Google Chrome's (and other Chromium-based browsers) implementation on both
74+
desktop and mobile platforms currently linearly scales the image (preserving
75+
the input aspect ratio) to fit in a 32dp x 20dp region, e.g. the display
76+
region has an aspect ratio of 1.6:1.
77+
- Given current average screen densities, we would recommend that
78+
integrators pass in a logo with physical pixel size at least 3x of that,
79+
e.g. minimal 96px by 60px.
80+
- The Chrome team have stated that they are interested in hearing from
81+
partners if a 32dp x 20dp region is too small, as it may not allow for
82+
detailed icons (such as full card art for credit cards).
83+
4584
### Payment entity logos
4685

47-
Relevant fields: [paymentEntitiesLogos], [paymentEntitiesLogos\[x\].url], [paymentEntitiesLogos\[x\].label]
86+
Relevant fields: [paymentEntitiesLogos], [paymentEntitiesLogos\[x\].url], [paymentEntitiesLogos\[x\].label]a
87+
88+
### Transaction amount
89+
90+
Relevant fields: [details.total.amount.currency], [details.total.amount.value]
91+
92+
Note: The transaction amount is communicated via the top-level [Payment
93+
Request](https://w3c.github.io/payment-request) API call, instead of as part of
94+
the SPC method itself.
4895

4996
## UX differences across different screen sizes/layouts
5097

98+
## Appendix: Example transaction confirmation UX screens
99+
51100
[instrument.details]: https://w3c.github.io/secure-payment-confirmation/#dom-paymentcredentialinstrument-details
52101
[instrument.displayName]:https://w3c.github.io/secure-payment-confirmation/#dom-paymentcredentialinstrument-displayname
53102
[instrument.icon]: https://w3c.github.io/secure-payment-confirmation/#dom-paymentcredentialinstrument-icon

0 commit comments

Comments
 (0)