#sandy.nozaki
1 messages · Page 1 of 1 (latest)
the page https://stripe.com/docs/connect/charges-transfers is very brief and we want to see more information
What do you mean by multiple charges with a single transfer?
Separate Charges & Transfers
You can do this, but you'll need to have a sufficient available balance on your platform for the transfer, as the transaction_source approach supports only a single pending charge
You can have charge 1,2,3 for say 10 USD each, then create a transfer for 25 USD
can i see a sample API for that?
In the current API documentation, there is only one sample with only one input data in source_transaction and amount.
However, we wonder if the data should be included in this way [{amount, source_transaction}...{amount, source_transaction}] to transfer multiple charges with a single transfer.
There's nothing in the docs showing exactly that, but it would be the same as what you see on that page except there's be two payment intent calls
const paymentIntent1 = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
transfer_group: 'ORDER10',
});
const paymentIntent2 = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
transfer_group: 'ORDER10',
});
const transfer = await stripe.transfers.create({
amount: 18000,
currency: 'usd',
destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
transfer_group: 'ORDER10',
});
like that
so the above is what multiple charges with a single transfer would look like?
At a high level, that's an example, yes. Do you have something more specific in mind?
In the current API documentation, there is only one sample with only one input data in source_transaction and amount.
However, we wonder if the data would be included in this way [{amount, source_transaction}...{amount, source_transaction}] to transfer multiple charges with a single transfer.
No, that's not something supported in the API. source_transaction is for a single charge only in the case of transferring a pending charge amount.
so for SC&T, multiple charges and transfers will just show however many payment intent calls based on however many charges?
im assuming if there are 2 charges itll show 2 payment intent calls
What will show that?
Can you explain a specific scenario you're considering and where you're looking at data?
what would multiple charges to 1 transfer API call look like
we want to see what the API call would look like for multiple charges to 1 transfer. The stripe doc only shows 1 charge and not multiple
This is the same as 1 charge 1 transfer, but the amount would presumably be based on the sum of multiple charges
These calls are up to you, you pick that amount
If you're asking about how to use source_transaction when there are multiple charges, I'm telling you that you can't do that. It only supports a single charge id.
Instead you need to have sufficient available balance to cover the transfer amount
can i get a sample of this, when there are multiple charges to a transfer
we will have sufficient available balance in platform so this wont be an issue
That's the example i showed above
#1095423782283395103 message
so are you saying that its reconciled then sum'ed up in 1 charge for the transfer?
if there were 3 charges, would there be 3 payment intent calls?
Not sure what you mean by reconciled here. You create the payments and you create the transfer, including all the amounts for each.
well you said its 1 charge 1 transfer. and you said that those multiple charges would be summed to 1 transfer..but im asking about when its multiple charges to 1 transfer
The way the payments happen before the transfer is entirely up to you, that's the idea of separating the payment & transfer.
I said it was the same as that scenario, but with more payments before the transfer
Sure, go ahead
so a sample of the multiple charges w single transfer is :
const paymentIntent1 = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
transfer_group: 'ORDER10',
});
const paymentIntent2 = await stripe.paymentIntents.create({
amount: 10000,
currency: 'usd',
transfer_group: 'ORDER10',
});
const transfer = await stripe.transfers.create({
amount: 18000,
currency: 'usd',
destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
transfer_group: 'ORDER10',
});
can you explain why we see 2 payment intents? is it because there were 2 charges?
Yes, that's right
Your integration might look different in where those payments come from, but this is a simplified example
Sorry, that was a mistake, didnt mean to lock this
ah no worries
can you explain why we see 2 payment intents in the API sample? is it because there were 2 charges?
In this simplified example yes
so if there were 3 charges, it will show 3 payment intents?
Sure, again in this simplified model
got it, thats what i was asking in the beginning
depending on however many charges the same amount of payment intents will display
Sure, again this is just a simplified example. The payments that comprise a transfer are entirely under your control. There might be 1, 2, 3 or 20 of them, and the transfer amount can be whatever calculation from those payment amounts you want.
👍