#kevin_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/1422961665024196608
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is my PaymentElement
Why do you need payment method id selected on the frontend?
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
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
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
Documentation for @stripe/stripe-react-native
Documentation for @stripe/stripe-react-native
But if you are using a setupintent, you shouldn't have saved payment methods displayed. The whole point of a setup intent is to set up a new payment method for future usage
Outside of some unusual use-case, you really shouldn't need to mess with payment method id at all on front end
Oh okay TY, I'll check this with back-end ^^