#marcoprouve - PRB vs Element
1 messages · Page 1 of 1 (latest)
Hi 👋
The Payment Request Button can be useful if you want to prominently display Google/Apple Pay buttons instead of just have them as options.
You will see some integrations where a big Google Pay or Apple Pay button is shown above the fields to collect payment method details.
Ahh so its supplemental
If I don't include this though, will apple pay still be an option in the PaymentElement component?
Some integrations want to only show the button and you can definitely do that
Yes, it should behave the same as the Google Pay option
Okay then there will be a case where 2 apple pay buttons will be shown if i integrate both?
If so, do you have a recommendation on how to prevcent this?
Likewise for google pay
In that case you'd probably want to specify which payment method types you wanted in your Payment Element to exclude Google/Apple Pay
Ahhh okay forgot about that, makes sense thank you!
Sure thing! And the automatic_payment_method feature does make it easy to forget you can list them too.
Yeah i have that turned on but thats just for what types of payments are accepted right? not what gets displayed
I can still turn off specific cards from the PaymentElement?
Actually you can be even more specific. in the options.wallets object when you create a payment element you can specify if you wish to exclude Google, Apple, or both: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-wallets
Just found that myself
Got it! thank you! ill let you know if i have any more questions
@glossy vigil Last question. Do i need to worry about redirects if I only enable card based payments? (card, apple-pay, google pay)
I don't think so since the 3DS authentication occurs in a modal but you might so it's good to plan for it as an edge case.
okay great thanks!