Contact emailsrou...@chromium.orgSpecThe spec is at
https://w3c.github.io/payment-request/#canmakepayment-method, but it does not specify detailed rules for quota enforcement, which is left up to user agent implementers by design.
SummaryA website should be able to query whether the user has a Google Pay wallet or cards in autofill database in two separate canMakePayment() calls, but should not be able to iterate all payment instruments within these wallets.
MotivationPreviously Chrome would reject PaymentRequest.canMakePayment() with NotAllowedError if a website queried different payment methods or different payment method specific parameters within the span of 30 minutes. Now Chrome would allow querying different payment methods, as long as the payment method specific parameters remain the same. This allows the website to query user wallets (e.g., to present wallet-branded buttons on the webpage), but not to iterate individual instruments in a wallet.
Interoperability risk
Firefox: No public signals - Firefox currently implements only "basic-card" and returns "true" for canMakePayment() only with "basic-card", regardless of user's autofill database contents.
Edge: No public signals
Safari: No public signals - Safari currently implements only Apple Pay and returns "true" for canMakePayment() only if the user has an active card in Apple Pay.
Web developers: Strongly positive - A long-requested feature from merchants in private conversations.
Note that users can prohibit canMakePayment() through Chrome settings.
Compatibility riskSmall implementation detail change.
Ongoing technical constraintsNone.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)? Yes or no.No. Payment Request is not implemented in WebView.
OWP launch tracking bughttps://crbug.com/871791