#kamesh1954

1 messages · Page 1 of 1 (latest)

remote jewelBOT
trim ingot
#

Hello, no, there's no way to do so unfortunately

latent geyser
#

is there any way from payment element to know how many are listed so that we can programatically add some?

trim ingot
#

I generally don't recommend that. If for example, you're only supporting card - there might be further options displayed to the customer based off whether they have Google Pay or Apple Pay (and if the browser supports it). That's not something which you can query for

latent geyser
#

we are hiding the credit card (since we have custom credit card form) but display apple or google pay, alipay, wechat etc. so when we have only one option from sdk, we have no way to programatically collapse so that user can use our custom form.

#

NOTE: bottom section is the custom credit card form

trim ingot
#

I'm guessing you're using Automatic Payment Methods to automatically infer the payment method options to be displayed to the customer?

#

can you share an example PaymentIntent or SetupIntent id that you're using?

latent geyser
#

yes we are using automatic payment methods

#

we are quite not there yet where are creating payment intent yet.

trim ingot
#

how are you initializing the Payment Element? Are you using the deferred intent flow then?

latent geyser
#

yes deferred payment intent

#

we initialise the sdk, get the payment method from SDK, then we create customer, create payment intent, and confirm payment intent.

trim ingot
#

there's no way to find out how many payment method options will be displayed for the deferred intent flow unfortunately

#

i can't think of any possible workaround if you use the deferred intent flow

latent geyser
#

if we are not using deferred intent flow? then is there any option?

trim ingot
#

there's no great way about this. You could manually decide what payment methods to pass in instead of relying on Automatic Payment Methods. There would be a lot of additional logic involved since your application is responsible for ensuring that the Payment Method is supported for that currency - this would work for deferred intent flow as well