#tess
1 messages · Page 1 of 1 (latest)
Hi 👋 our Payment Element is a prebuilt component that can process card payments as well as wallet payment methods. This guide walks through implementing that:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
I'm already using the paymentElement for the credit card form, but I'm creating the client secret with setupIntent instead of paymentIntent.
@winged fog Does using setupIntent mean that using Apple Pay/Google Pay won't work?
Apologies for the delay, you can use Setup Intents for wallet payment methods as well.
An important note about doing so though, Apple is a bit restrictive about reusing saved Apple Pay details. If you are saving an Apple Pay Payment Method to be used for a Subscription that or a one-time off-session payment then that is typically fine, but you may encounter problems if you save an Apple Pay Payment Method and attempt to repeatedly use it for one-off off-session payments. If you're going to be processing multiple off-session payments for Apple Pay, you will want to create a new Payment Method for each of those.
Is there an example of how to use setup Intent for a wallet payment method? I am rendering a paymentElement using setupIntent, but Apple Pay & Google Pay options are not displaying in the browser even though I have Apple Pay verified for the domain.
Do you have a card added to your Apple Pay wallet already? Having a card already in the associated wallet is a prerequisite that we check for when loading the element, if there isn't a card in the wallet then we do not display that wallet payment method as an option.
Do you have a publicly accessible test page where you're testing the presence of Apple Pay that you can share?
I do have a card saved for Apple Pay & I can confirm that by going here https://stripe.com/docs/stripe-js/elements/payment-request-button and seeing the functional Apple Pay button at the top.
I unfortunately don't yet have a publicly available test page; it's blocked by an Access Control List so only accessible to specific IPs.
I'm looking for an example because I'm not clear if Apple Pay/other wallet payments should "just work" with the paymentElement or if I need to do additional implementation of a paymentRequestButton .
You shouldn't need to implement the Payment Request Button in addition to the Payment Element, I'm fairly certain the Payment Element alone can handle everything you're asking.
Confirmed, I rendered my Payment Element demo using a Setup Intent and Apple Pay is offered:
ok, so dumb but I was expecting the black Apple Pay button from the example. It IS working!
thank you very much!
Any time!