#kenoy

1 messages · Page 1 of 1 (latest)

raven moonBOT
steady jewel
stray loom
#

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

steady jewel
#

is there a reason why you don't first let them modify the settings, then create the PaymentIntent and charge?

stray loom
#

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

steady jewel
#

in short, there's no way to specify an amount on the SetupIntent, because it's only to collect a PaymentMethod

stray loom
#

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.

steady jewel
#

if you refer to the code in that particular section, it's using a PaymentIntent.

stray loom
#

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?

steady jewel
#

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.

stray loom
#

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?

steady jewel
#

you still need to confirm the SetupIntent. So in case there are additional actions required, it would present the 3DS modal etc for action