#code-transfer-balance-insufficient
1 messages · Page 1 of 1 (latest)
The problem is that the funds need to be really available to be transferred out. What you see is only for Instant Payouts to your own bank account
You likely want to transfer funds from a payment that is still pending. And you should use the source_transaction parameter on Transfer creation
Detailed docs: https://stripe.com/docs/connect/charges-transfers#transfer-availability
Ok, thank you.
Is this one of those things that succeeds in test mode silently and we don't know about it until we try it on live?
There's more money than that in the account but there's a current payout in progress - so this wouldn't be an issue if we maintained a balance?
no it works the same way in Live and Test mode
I don't think we can use the source_transaction with out setup, we're using a single invoice for multiple products by multiple connected accounts so we can checkout with 1 purchase price and then pay all the connected vendors
hmmmm
You can totally use this
Imagine you charge $100, the funds are pending for 2 days in the US for cards. And then you want $20 to account A and $50 to account B, you can create a transfer for each with source_transaction: 'ch_123' and the right amounts
and then the transfer's funds will take the same pending state/funds availability as the original payment
So that source_transaction would be the same ID even if we paid out Account A, B, C, D, E with 1 invoice?
We operate a store that has multiple vendors that sell products on our store. When you check out, it creates an invoice for all the items in the cart, which might be from several vendors. Can we use that invoice as the source_transaction on multiple transfers to send to multiple vendors (connected accounts)
(I'm with <code>)
We have a negative balance on our Test account and the Transfers still report successful in the Logs btw
(sorry for the ping, forgot to turn that off)
No the source_transaction has to be the Charge id ch_123 not the invoice id in_123 but the Invoice has one successful charge so it's easy to get there
do you have an example request/transfer in Test mode that works? My guess is you have funds available in your balance in Test mode already
But it's fine to re-use the Charge ID multiple times for different transfers?
yes as long as the SUM of transfer amounts is lower or equal to the charge's amount
Do you know how this will work with Refunds through the Dashboard? If we did 5 Connected account payouts from a single charge on a single invoice and we need to refund $40 of a $500 invoice, how we can get that money back from the correct connected account?
I'm guessing this is a nightmare and we'll have to custom-code a refund thing that determines that and requests funds from the connected account separately?
honestly I don't think this is a nightmare, but it's work. Each Transfer is to one connected account so you/your support team should know which one to reverse based on what is refunded for example
Yeah, but definitely no existing mechanism through Stripe GUI currently for this I assume?
no since we don't know what each transfer is for and what you are refunding
Gotcha - well as always, thank you immensely for your help with this (previously on IRC)!
I guess we could in theory build a UI that when you refund a charge, it would show all transfers and you;'d pick the one(s) to refund. But that's definitely not supported nor on our roadmap
Just wanted to loop back and say thanks - we added the source_transaction and that solved the issue we were having
Yay great news!