#paulC. - Checkout Transfers

1 messages · Page 1 of 1 (latest)

cursive bane
versed lark
#

Hello !

cursive bane
versed lark
#

Yes , this for the transfers I suppose , but dont I also have to state in the create of the session something like :

#

payment_intent_data:{
transferGroup : paymentIntendId
}

#

or again , it can be the same random variable ?

cursive bane
#

Oh, that's true. Maybe an order number you generate on your end?

#

Yeah, it can be something like a UUID/GUID if you want.

versed lark
#

yeah thats great !

#

and , just to double check , I could do this when trnasfering to the connected accounts

#

const transfers=await Promise.all(supplierList.map( async supplier=>{
await stripe.transfers.create({
amount: supplier.amount *10,
currency: 'eur',
destination: supplier.stripeId,
// her put the payment intent id
transfer_group: paymentIntendId
});
}))

cursive bane
versed lark
#

Yep ! Thanks so much ! You guys rock on this chat . Best technical support ever , cheers !

cursive bane
#

Happy to help!

versed lark
#

One more question if I may: earlier , one of your colleagues instructed me to use stripeAccount : {{accountId}} when I use Transfers on Connect, yet your docs use destination (https://stripe.com/docs/api/transfers/create#create_transfer-destination). I had previously used destination , but your colleague said it should be stripeAccount. How is it in the end ?

cursive bane
#

That depends on what you're trying to do. Typically stripeAccount isn't used with separate charges and transfers, but can you tell me about your payment flow and how your platform account and connected accounts are related to each other?

versed lark
#

Sure

#

The user has to pay a basket that is comprised of items sold by X suppliers. Then the user is redirected to the checkout session. Then , when the item is received , we trigger a manual payout of the amout to the supplier that fulfilled the order

cursive bane
#

Okay, so it sounds like you won't be using the stripeAccount parameter if I'm understanding correctly. You'll create the Checkout Session on your platform and then create Transfers that send money to the connected accounts.

versed lark
#

yes exactly

#

and when the order is fulfilled , pay them out

cursive bane
#

Ah, for the Payouts you need to use the stripeAccount parameter, as you're creating a Payout on the connected account.

#

So you're using manual Payouts on the connected accounts, correct?

versed lark
#

yes

cursive bane
#

Yep, so you would use the stripeAccount property to create the Payouts on the connected accounts.

versed lark
#

So in the end it has to look something like this , correct ?

#

await stripe.payouts.create({
amount: amount,
currency: 'eur',
},
{
stripeAccount: stripeId,
});

cursive bane
#

Yep!

versed lark
#

The reason Im asking is cuz theres no stripeAccount field in the API spec !

#

Thanks so much !

cursive bane
#

It applies to the entire API, so it's not repeated on every endpoint.

versed lark
#

Ah nice! Have a great day !