#kevin_code

1 messages ¡ Page 1 of 1 (latest)

knotty hatchBOT
#

👋 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/1422961665024196608

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

simple lark
#

Here is my PaymentElement

broken helm
#

Why do you need payment method id selected on the frontend?

simple lark
#

I need to ask back-end why we do this flow but currently we use CardElement and if we select an old payment method, we skip the setup intent on front-end side and directly create the booking by passing this payment method ID to the back-end

broken helm
#

That's not the card element though that's the payment element

#

And if using the saved payment method flow in the payment element you really should just be confirming a payment intent from the frontend

#

SetupIntent shouldn't come into play at all

simple lark
#

Yep as I said, we currently use CardElement and we plan to migrate to PaymentElement
Okay will ask my back-end team why we're doing this

#

And we're only doing this flow for setup intent, not for payment intent

#

And weird thing is that I can see on React Native you allow us to check a whole bunch of data in the confirmHandler: https://stripe.dev/stripe-react-native/api-reference/types/PaymentSheet.IntentConfiguration.html
We can get a lot of data from the payment method result: https://stripe.dev/stripe-react-native/api-reference/interfaces/PaymentMethod.Result.html

But weird that on React.js, we only know the type of the payment method

broken helm
#

Outside of some unusual use-case, you really shouldn't need to mess with payment method id at all on front end

simple lark
#

Oh okay TY, I'll check this with back-end ^^