#froggy
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Hello! Sounds good
You can use the transfer_group in payment_intent_data: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_group
hmm, what should the transfer_group be?
is there any code snippet i can use?
from what i understand there are 4 main chunks
these 3 from here from here https://stripe.com/docs/connect/charges-transfers
and this section
from here
https://stripe.com/docs/checkout/quickstart
not too sure how i can combine them together since in the case of the await stripe.checkout.sessions.create({}) method, it will itself generate the price etc?
For you case, instead of creating a PaymentIntent (1st step), you create a Checkout Session, with the transfer_group parameter. It can be any unique string. It's important that you use the same string for transfers.
so, I will create a checkout session, and then I will call the step 2 (stripe.transfer.create()) and step 3 (stripe.transfer.create()), with the same transfer group as the checkout session?
Yes.
Hmmm, I see, so each time I need to generate a brand new transfer group?
Not necessarily as far as I know. Though also you can create those transfers without setting a transfer group and Stripe will create one for you
All you really need to do here is create a transfer and pass source_transaction='pi_12345' when creating the transfer like in this section https://stripe.com/docs/connect/charges-transfers#transfer-availability