#sindev_error
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/1476699265886720040
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
looking
What Stripe mobile components are you using? Are you using one of our guides here? https://docs.stripe.com/sdks/react-native
the components shown on the screen are custom, just some TouchableOpacity
before they triggered presentPaymentSheet (which opens a modal with all payment methods)
now I want to skip the popup and immediately proceed with the selected payment method
maybe I just don't understand very well how it works for Stripe, but I also have an Adyen integration which works that way
Let me look - we offer something like this in Stripe.js, but I'm not sure if the React Native SDK supports it.
Because what you're looking to do is just provide your own option of payment method types and then immediately try to confirm the PaymentIntent with that Payment Method type on the frontend, correct? Like you already know you want to use Link, for example, and then you want to go straight to confirming the Link payment with the user's input
yes exactly
if this isn't possible, then could you suggest what would be the best alternative? (without grouping everything in a single sheet)
looking at the React Native SDK to see what I can find
I notice that even for Stripe.js we don't support this for all payment methods - https://docs.stripe.com/js/payment_intents/payment_method
hmm, I think it's working for web on our product. But I'm not in much details of the implementation
I think what you need to do here is just to decide what payment method you want on the custom component you mentioned and then pass that to payment_method_types on the PaymentIntent when you create the PaymentIntent before presenting the Payment Sheet
and based on my testing, it works like I think you want it to if there is only one payment method type
so payment intent should be created with specified payment method types? Becaused wehn I asked the BE earlier, they said they use .setAutomaticPaymentMethods( so the payment_method_types are not needed
If you want to let the Customer decide, then yes, but that isn't what you want to do in this flow, right?
Or you want to let them decide, but not on the Payment Sheet
they can decide on the custom UI between the payment methods list, after choosing one then the payment should proceed automatically without some intermediate popups for choosing payment method again
also on the web they told me they can verify the supported payment methods via:
const { paymentIntent: retrievedIntent } = await stripeInstance.retrievePaymentIntent(clientSecret);
const paymentMethodTypes: string[] = (retrievedIntent as any)?.payment_method_types || [];
console.log(‘paymentMethodTypes’, paymentMethodTypes);
I tried similar thing on RN and I got the response I attached to this issue, it doesn't contain any payment methods
Okay, let me try to explain again
So we agree that what you want to do is to decide the payment method to be used on your custom ui component, and then proceed to collecting payment method details/confirming the payment without an intermediate step where the customer has to choose the payment method again on Stripe's UI, right?
yes
and just to clarify, BE is the same for both web and mobile in this case
so payment intent is being created the same way
And how do you handle the Payment Method selection on web?
via custom ui, same thing I want to achieve on mobile
if you have time to check, it's the last step of booking process in https://www.flibco.com/en
What's your account id? It would be easier for me to find what I need from that
where can I find the account Id
you can find it in the Stripe dashboard https://dashboard.stripe.com/acct_1KGrzWJLi2Mcm6K0/settings/account
I only have access to test env, I hope that doesn't matter
acct_1M1RE0L7ip0GbFi3
Your web integration is using automatic payment method types, which would present the user with all the payment methods that are available in the Payment Element.
I tried going through your flow but I can't find a date that has tickets at this step: https://www.flibco.com/en/distribusion/timing
okay it works with Frankfurt airport
please choose CRL to Brussels Airport
Yeah so despite selecting card in the previous step, I am still offered other payment methods, because you are using automatic payment methods
no, please select amazon pay
because the Card option is the old approach which is to be removed
Amazon pay on the other side is the new approach
satispay as well
there is also a custom popup with Confirm button when going with these 2 payment methods, it's to be removed as well
Do you have access to the client side code for Elements on your web payments?
for now not, I can ask for it tomorrow
can you keep this thread opened til tomorrow?
No, we close them for inactivity, but when you come back, we'll have a reference to this thread that one of my team can use.
I still think that, most likely what you need to do on mobile is to use payment_method_types when creating a PaymentIntent and only passing the value that you get at the select payment method stage, then you can get the behavior you're looking for.
But also, what is the advantage of handling the payment method selection yourself instead of letting Stripe's Elements handle it? They're highly optimized for this purpose
If you have a narrow subset of Payment Method types you want to allow, that is easily achievable
I don't know, I'm really tired of it lol
spent all day trying different stuff out
We've all been there
okay then I will come back tomorrow when I have access to web as well
thank you very much for your support