Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaymentRequest Type #58

Closed
klase opened this issue May 15, 2020 · 3 comments
Closed

PaymentRequest Type #58

klase opened this issue May 15, 2020 · 3 comments

Comments

@klase
Copy link

klase commented May 15, 2020

The object returned by canMakePayment only allows us to detect if the paymentRequest is an Apple Pay request. If the request is not Apple Pay, how can we determine the type (Google Pay, Microsoft or browser saved card)?

@hofman-stripe
Copy link
Contributor

@klase sorry for the delayed response. Currently if not Apple Pay, Stripe's PaymentRequest object simply wraps the browser's PaymentRequest API. Because browsers have strict rate limiting in place to prevent fingerprinting, we can only determine if the browser has any of Google Pay or basic card (including "Microsoft Pay") configured, but not which one. This is something we're working with Google and standards groups to improve.

See https://chromestatus.com/feature/6014793655779328

@klase
Copy link
Author

klase commented Jun 9, 2020

@hofman-stripe If you are able to determine that the source is Google Pay, how is this exposed in stripe-js? We use the "applePay" flag to customise the payment button according to Apple's guidelines, so it would be really helpful from a UX standpoint to also have this ability for Google Pay while we wait for the standards to improve.

@hofman-stripe
Copy link
Contributor

Sorry maybe I wasn't clear. We are not currently able to differentiate between GPay and basic card using the browser PaymentRequest API, only that "at least one" is available. That's also the reason the PaymentRequestButton doesn't have any dedicated branding for GPay. We are looking at different ways to improve this situation, but that's unfortunately a limitation of browser APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants