#kamesh1954
1 messages · Page 1 of 1 (latest)
Hello, no, there's no way to do so unfortunately
is there any way from payment element to know how many are listed so that we can programatically add some?
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
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
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?
yes we are using automatic payment methods
we are quite not there yet where are creating payment intent yet.
how are you initializing the Payment Element? Are you using the deferred intent flow then?
sorry i was able to get payment intent. here it is https://dashboard.stripe.com/test/payments/pi_3OWtazIZA2viOdgb1GwHRBJw
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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.
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
if we are not using deferred intent flow? then is there any option?
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