#bastien_transfer-balance

1 messages Β· Page 1 of 1 (latest)

dusky larkBOT
#

πŸ‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

πŸ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1225015674313641985

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

polar thornBOT
silent path
#

Hi, let me help you with this.

#

Sorry didn't notice the ID

#

Did you add the transfer_group parameter to your PaymentIntent?
It might be that the charge amount is smaller than the sum of Transfer amounts you are trying to make.

fervent summit
#

yes we have a transfer_group with number of order, yes we have an another bug when an exeption is thrown which replay 3 time first transfert

#

but the original error is balance_insufficient which is hit sometimes right after initial payment

#

there is a log on it

polar thornBOT
fervent summit
#

balance log is done by : $this->client->balance->retrieve();

vagrant nexus
#

bastien_transfer-balance

#

πŸ‘‹ taking over!

fervent summit
#

with api version 2020-08-27 we have not this issue

#

hello @vagrant nexus

vagrant nexus
#

@fervent summit when you create the Transfer that way it's pulling the funds straight from your own platform's balance. Not the funds associated with a payment you just did (where the funds would be pending). So you need to have funds directly available in your own balance, for example by building it up over time and being on manual Payout.

#

The transfer_group feature is really here just to "link" the money movements together

#

There hasn't been a specific change that I can think of in an API version that changed this behaviour, it's always been like this

fervent summit
#

my client say before there is an automatic transfert from bank account to balance, there is a change on it ?

vagrant nexus
#

I'm sorry this is really too vague and unclear right now so it's hard to understand what you could mean

#

The flow you are using right now seems to be Separate Charges and Transfers: https://stripe.com/docs/connect/charges-transfers
This moves money completely separately between when the customer pays the platform (you) and when you give funds to the seller/connected account

fervent summit
#

sorry, try to rephrase it, when available balance is too low stripe do an automatic transfert from bank

vagrant nexus
#

No Stripe doesn't do that.

#

when the balance is negative we pull funds back from your bank account, yes. Not when it's low.
And if you don't have enough funds you can't transfer funds to another account

fervent summit
#

yep when negative sorry, and now we have a -31 cts πŸ™‚

vagrant nexus
#

okay so we will likely pull that amount the next day. But that won't really change anything to the Transfer failing, you will still have 0 after we get those 31 cents back

fervent summit
#

ok ok it's more understable, so for our transfert we have to delay this (time to pending payment arrived) (and had a check to available balance) ?

vagrant nexus
fervent summit
#

hoo yes but when we have multi transfert, we cannot use source_transaction for each transfert with same group (only cannot be used on first trans) . so how to do with 3 transferts for same group ?

vagrant nexus
#

you can absolutely do what this doc says for each transfer?

#

You can create multiple transfers with the same source_transaction, as long as the sum of the transfers doesn’t exceed the source charge

fervent summit
#

i have to update code to test it, can we keep this channel open ?

#

time to code it πŸ™‚

vagrant nexus
#

We archive threads quickly as we help a lot of developers in parallel here but you're welcome to ask a new question if the thread is closed.
But you should have everything you need to test the flow end to end with the doc I shared!

fervent summit
#

ah yes there is this msg

ou cannot use transfer_group if the source_transaction already has one set.

#

You cannot use transfer_group if the source_transaction already has one set.

vagrant nexus
#

correct! It's all covered in details in the doc I shared earlier. I recommend taking a few minutes to carefully read all the bullet points

fervent summit
#

ok so the solution is to use source_transaction and have a unique transfert_group ?

vagrant nexus
#

yes

fervent summit
#

hannnnn thank you for your time πŸ™‚

vagrant nexus
#

sure thing! I'm around for a bit if you have a follow up question!