#wayo
1 messages · Page 1 of 1 (latest)
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.
Right but when do I know to create a new PI for the same customer or retrieve an existing one?
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.
By confirmed do you mean to have a status of succeeded?
Yes!
Or failed, which in this case they would need to provide another Payment Method.
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?
By custom UI I mean stripe elements
👋 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.
Where can I see the UI that will be used?
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?
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."