#beluga-ios-paymentsheet
1 messages · Page 1 of 1 (latest)
Yeah if you run through the checkout flow and pass the same details another payment method will be created
You would need to set up the payment for future usage so you can charge the previously created PM
(That's controlled by this param https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage)
I tried to use Setup Intent to create a payment, but found that when I use Apple Pay to pay, I still create a card every time
Ah you're using SetupIntents. So the whole point of SetupIntents is they set up a payment method for future usage. A SetupIntent isn't a payment
And if you run through the flow multiple times, it's expected multiple payment methods would be created
Because my payment scenario needs to create an order before I can confirm the price and pay
Since you're using SetupIntents, you already set up the payment method for future use. So no need to run through the flow multiple times
Ok, I started to understand the real meaning of SetupIntent, so you mean that I only need to set SetupIntent once, when I really need to pay, I still have to use PaymentIntent
Correct
But unless you need to set up the payment method for multiple future payments, you likely can get away with using a paymentintent here
I will try to modify my code, but it is difficult to get Payment Method Id in iOS
What is difficult about it exactly?
When I use PaymentSheet, I cannot get the selected payment method in PaymentOption
beluga-ios-paymentsheet