#dawidzawada-setupintents
1 messages ยท Page 1 of 1 (latest)
hi! so when you say React, you mean you're developing a web page now, and not a native mobile app, just so I'm clear?
Yup, exactly. I'm developing "web version" of React Native App
cool then https://stripe.com/docs/payments/save-and-reuse is the guide really, it uses SetupIntents with the PaymentElement(which is the web version of the PaymentSheet you probably saw in stripe-react-native) and it supports Google/Apple Pay
https://stripe.com/docs/payments/save-and-reuse?platform=web more specifically
I see that <PaymentElement /> is form where I can enter the card and have other payments methods like GPay or Apple Pay but what I need is the single button - only for wallets like Apple Pay or GPay like <PaymentRequestButtonElement /> with paymentIntent. Is this possible to have only the single button for Apple/Gpay and card logic somewere else? Designs are limiting me here ๐
so the short answer is yes, there's PaymentRequestButton https://stripe.com/docs/stripe-js/elements/payment-request-button
but the long answer is what do you do if the customer is not looking at your site on a device that has Google/Apple Pay enabled? Can they just not pay you then?
We have another button - Use credit card with our own card logic
fair enough but we would suggest using the PaymentElement so you get everything all in one place and that place also supports local payment methods
anyway, you can use PaymentRequestButton directly on the web, totally supported too, docs are linked above
it works with a SetupIntent just fine, it's not explicitly covered in the docs but it works
you just use a SetupIntent and confirmCardSetup in https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=react#react-complete-payment instead of the PaymentIntent functions it mentions
I'd love to but clients have their own vision ๐ Thanks for your help and maybe a one more small thing - is this possible to show disabled PaymentRequestButton when none of the Apple/Google Pay wallets are supported?
I see that examples show that the buttons are being loaded only when browser supports them