#cholekulche

1 messages · Page 1 of 1 (latest)

stoic gorgeBOT
feral gull
#

I tried to read iframe of stripe payment element to get these html items but since the iframe is served from third party domain I can’t read the iframe through js. Essentially we need this data to understand which payment methods are getting shown to our users in realtime

drowsy plaza
#

You can listen to ready event on the element

feral gull
#

In the document it says that it is supported only for express checkout form

#

But I am using payment element

drowsy plaza
#

ah good catch

stoic gorgeBOT
drowsy plaza
#

are you creating PaymentIntent/SetupIntent prior to rendering elements?

feral gull
#

Setup intent

drowsy plaza
#

but are you creating it prior to rendering elements or after?

feral gull
#

Prior to rendering element through a client secret

drowsy plaza
#

Gotcha. So one option would be to look at payment_method_types on the SetupIntent to see what PaymentMethods are supported

it wouldn't show you any of the wallets though

feral gull
#

Oh when I checked that it only returns card… even if I pay through any wallet. Currently we have enabled only card, gpay, Apple Pay on stripe dashboard

#

But I don’t think it would give realtime list of payment methods shown to user right

#

Like if I configured to show [card, klarna] on stripe dashboard but only card payment method was visible in real time to user. payment_method_types would still be [card, klarna] right

drowsy plaza
#

It shouldn't happen but not sure 100%.
Typically if klarna is not supported for a specific reason then it should just fail when you create the intent

feral gull
#

The behaviour generally is that we can mention a set of payment methods to show to user. Now let’s say in realtime if some of the requirements were not met to show some payment methods. Stripe will just ignore them and show whatever payment methods it can show to user

#

For eg: gpay is only visible to user if they have setup their card in google account

#

Even though we mention stripe to show that payment method. It can omit based on user location and their card setup

#

I want these exact payment methods that were shown to user in realtime form

drowsy plaza
feral gull
#

So let’s say if [a,b,c] payment methods were configured on stripe dashboard and only [a,b] were actually visible to user then I need [a,b] which can be a very important metric

drowsy plaza
#

Totally understand. I don't believe there's a good way to get that information with PaymentElement today unfortunately. I can flag a feature request for this

feral gull
#

Okay no worries… yeah it would be very helpful if we can get this support in future because we can’t read or manipulate the iframe. So metrics related data, if they can be provided through some callback would be helpful to us

drowsy plaza
#

Yup, you can also flag this as feature request via our support form
https://support.stripe.com/?contact=true

That way you'd receive email/comms if there are any updates on this