#paulC. - Checkout Transfers
1 messages · Page 1 of 1 (latest)
Hello !
Hello! The transfer_group string can actually be anything you want, as long as it's unique to a specific business action. The Checkout Session ID may be a good choice. See here for more info: https://stripe.com/docs/connect/charges-transfers#transfer-options
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 ?
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.
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
});
}))
You would specify the transfer_group when creating the Checkout Session here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-transfer_group
And then the same transfer_group when creating the Transfers associated with that Checkout Session here: https://stripe.com/docs/api/transfers/create#create_transfer-transfer_group
Yep ! Thanks so much ! You guys rock on this chat . Best technical support ever , cheers !
Happy to help!
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 ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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
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.
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?
yes
Yep, so you would use the stripeAccount property to create the Payouts on the connected accounts.
So in the end it has to look something like this , correct ?
await stripe.payouts.create({
amount: amount,
currency: 'eur',
},
{
stripeAccount: stripeId,
});
Yep!
The reason Im asking is cuz theres no stripeAccount field in the API spec !
Thanks so much !
There is, but it's up here: https://stripe.com/docs/api/connected_accounts
It applies to the entire API, so it's not repeated on every endpoint.
See also this page in the docs: https://stripe.com/docs/connect/authentication
Ah nice! Have a great day !