#kenoy
1 messages · Page 1 of 1 (latest)
hello! a SetupIntent is meant to collect the details to create a PaymentMethod.
If you want to create a payment (and specify an amount), you should be using a PaymentIntent instead - https://stripe.com/docs/payments/accept-a-payment
We have a flow where we want to capture the payment method first using the PaymentSheet, however, they can modify a couple of settings which affects the total amount to be charged, we then want to charge them using the payment method setup in the PaymentSheet
This is what I was trying to follow https://stripe.com/docs/payments/save-and-reuse?platform=ios&ui=payment-sheet#ios-flowcontroller
is there a reason why you don't first let them modify the settings, then create the PaymentIntent and charge?
UX decision on the flow
We also have other payment methods that Stripe doesn't support
So users can select their payment method, and then our CTA changes depending on what they choose
in short, there's no way to specify an amount on the SetupIntent, because it's only to collect a PaymentMethod
What does it mean in the docs when it says "confirm the payment" for setupIntent?
You can present the Payment Sheet to only collect payment method details and then later call a confirm method to complete payment in your app’s UI. This is useful if you have a custom buy button or require additional steps after you collect payment details.
if you refer to the code in that particular section, it's using a PaymentIntent.
OK. Sooo how do I get the payment method id from the PaymentSheet built using a SetupIntent?
Can you create a a PaymentIntent from a SetupIntent?
How do I go from PaymentSheet (via SetupIntent) to confirm pay with PaymentIntent with the payment method setup through SetupIntent?
On the frontend, you have the SetupIntent id, when the process is successful, you would retrieve the SetupIntent on the frontend, which will give you the PaymentMethod id.
Otherwise, listen for the setup_intent.suceeded event using webhooks - https://stripe.com/docs/webhooks on your server.
the SetupIntent is to create a PaymentMethod. So you create a PaymentIntent, then use the newly created PaymentMethod id - https://stripe.com/docs/payments/save-and-reuse?platform=ios&ui=payment-sheet#ios-charge-saved-payment-method
I'm still so confused...
So we can create a PaymentSheet.FlowController.create(setupIntentClientSecret....
right?
This is using the setup intent client secret... so then what does calling the paymentSheetFlowController.confirm method do?
you still need to confirm the SetupIntent. So in case there are additional actions required, it would present the 3DS modal etc for action