#wayo

1 messages · Page 1 of 1 (latest)

fathom lightBOT
slender forge
#

Hi, yes. You'd use the Payment Intent's client secret to confirm. What this, 'payment intent is used for a "session"' means is that when a Payment Intent is created it is an instance to collect payment details.

#

Then, this Payment Intent tracks the payment process to let you know exactly where it is in the flow of payments.

worldly rover
#

Right but when do I know to create a new PI for the same customer or retrieve an existing one?

slender forge
#

If their customer already has an existing Payment Intent that has not been confirmed, then you can fetch the client secret of that Payment Intent and confirm. However, if the customer does not, you'd need to create one first.

worldly rover
#

By confirmed do you mean to have a status of succeeded?

slender forge
#

Yes!

#

Or failed, which in this case they would need to provide another Payment Method.

worldly rover
#

Makes sense.

#

On the link above on step 4, could I use custom UI to collect the bank details? Or is there an advantage doing it the way the docs suggest?

worldly rover
#

By custom UI I mean stripe elements

naive rapids
#

👋 you don't use Elements for this flow

#

We recommend using Stripe.JS with stripe.collectBankAccountForPayment to allow us to handle the bank account collection for you, but that is just triggered on a button click.

worldly rover
#

Where can I see the UI that will be used?

naive rapids
#

I'm not sure what you mean?

#

You create the UI yourself for the button.

#

Or do you mean the Connections modal that pops up from stripe.collectBankAccountForPayment?

worldly rover
#

Yes. I am looking at the docs for that function and it says , "When called, it will automatically load an on-page modal UI to collect bank account details and verification."