#mjb8086_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1377967298811269150
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
Hello
I'm not sure I understand your question. You want to:
- Create a PaymentIntent while placing a hold
- Then later capture the amount of the PaymentIntent
- And send the money to connected account?
Basically yes
and so what's your question about this flow?
The user could have multiple rooms in his cart, and when he goes to checkout I want one payment for all of them. It is tricky because we only want the payment to be captured when a host approves. The user's payment could go to multiple hosts (connected accounts). I'm wondering the best way to design this. It's tricky because you can only capture a PI once (and send it to one CA), so we can't use one PI for the whole payment. The AI bot suggested creating one payment intent per booking, and I got as far as implementing this in my backend, but then the stripe service created multiple client secrets - one per PI, and I wasn't sure what to do from there. Or even if this is the best means of achieving the design, if you have a better suggestion please do share.
I see, so one PaymentIntent intent for all the rooms would work, because you can't do multiple captures?
so you would need one PaymentIntent for each room?
one PaymentIntent per room has a big downside: each PaymentIntent may require the user to go though the 3DS flow. so if they book 3 rooms, that could be up to 3DS flow in a row.
can't you create a single PaymentIntent, and only capture the funds later, once you know how many rooms have been approved?
Yeah if that's the case we will scrap the one PI per room idea.
As an alternative, we could have the basket session (grouping all the rooms the user checked out) tied to a payment intent, then only make the transfers once each booking has been approved.
To facilitate paying multiple hosts from the one payment, is it possible to transfer funds from a payment intent to multiple connected accounts?
To facilitate paying multiple hosts from the one payment, is it possible to transfer funds from a payment intent to multiple connected accounts?
If you are using what we call Separate Charges & Transfers, then yes.
https://docs.stripe.com/connect/separate-charges-and-transfers
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Thanks, I'll get cracking with that this afternoon and let you know if anything comes up