#branyoto_code
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/1265303734699950301
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Sorry forgot to mention that I work in a React Native.
I've already read this page multiple times but where is the part that speak about retrieving the card brand selected by the user ?
I've tried to add preferredNetworks with possible networks (ie. for card 4000 0025 0000 1001 i've used [Visa, CartesBancaires]) but it still doesn't return any networks
How/where are you looking for that?
That's why I'm here, I have no idea how to get the selected network. I've tried to console.log the card when onCardChange event is trigger but it doesn't have the information
It may be necessary to use the createPaymentMethod flow like the example here to get the paymentMethod to inspect:
https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/NoWebhookPaymentScreen.tsx#L64
After which you can use the payment method ID to call confirmPayment
Oh okay the preferredNetworks are mandatory!
I've tried that before without those and only got null in Card.preferredNetwork...
Thank you very much ๐
Is there a way to avoid having to specify preferredNetworks ?
In the documentation it state that : "The list of preferred networks that should be used to process payments made with a co-branded card. This value will only be used if your user hasn't selected a network themselves."
But when I leave the preferredNetworks blank, i get null in preferredNetwork ๐ค
hello! I'm here now give me a second
just to confirm, what version of the RN SDK are you on?
react-native: 0.73.6
@stripe/stripe-react-native: 0.37.3
gotcha so good on that end as preferredNetworks stuff was added in https://github.com/stripe/stripe-react-native/releases/tag/v0.36.0 so you're ahead
can you share the PaymentMethod ID of the 4000 0025 0000 1001 once you've created a PM from it with Card Element?
I'm not super familiar with this integration so confirming some things for myself too, thanks for bearing with me
No problems here is the ID pm_1PfjehH8Rz8h5V3qojk6FHzu
If this takes you too much time, don't bother checking it. I have a working use-case this is just for my curiosity ๐
thanks, looking
yeah so I think you want display_brand there from the created PM: https://dashboard.stripe.com/test/logs/req_zQ2Cyt7MCDMf9R
Hello @mild wolf ! just circling back on this as a colleague helped clarify this to me, so I'm wrong about
yeah so I think you want display_brand there from the created PM: https://dashboard.stripe.com/test/logs/req_zQ2Cyt7MCDMf9R
that is the brand displayed to the user
for the brand that a customer selected, that would be the networks.preferred field which as you note can also be null if none was selected by a customer at PaymentMethod creation
when a PaymentMethod is charged, the PaymentIntent's Charge (or SetupIntent SetupAttempt) has a payment_method_details.card.network field which is the brand used on the Charge
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.