#rohan_api
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1228355696974762015
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
First, Payment Request Button is actually our legacy wallet Element. Is there a reason you are integrating that as opposed to the Express Checkout Element: https://docs.stripe.com/elements/express-checkout-element ?
Hey, let me look
Is there anything different about this API (e.g. functionality when embedded in an iframe) as compared to the payment request button?
Not in that regard, no.
It is just newer/better and will continue to be developed (as opposed to Payment Request Button which is still supported but will no longer have any features added)
Gotcha. Does the API return the individual button components, or is it just a single component we need to put somewhere?
Also, functionally, it looks like this one is correctly showing Google Pay. What's different under the hood? Does it not still use the payment request API?
It uses the same API to show Google Pay
That shouldn't really be different
But yeah it is just a single component that would show any of the wallet options you have enabled
Hm, gotcha. Can we call it multiple times with one payment method enabled per call? We currently control the display of each button individually (to align to our grid, etc.), so it'd be nice to get each button as a separate component to mount
That's really interesting—it definitely produces different results
You could do that by instantiating multiple instances of Stripe.JS if you want. You can also control the layout if you want to go that route and stack them vertically if you want: https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-layout
It has to be multiple StripeJS instances? I can't just make the same call multiple times?
You can't render multiple of the same Element components, no.