#brokenlaptopdev_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ 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/1354829718549172326
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello there
Hello
Can you share the request ID for this error?
Yep you do need to take the Pending balance into account here.
It looks like you had funds set aside for a Payout
Which is why you have negative pending
And thus insufficient balance to Transfer
So before creating a transfer, we should take into account any negative pending when determining the available balance?
Could you also tell me how this payout was initiated: po_1R74q8Iup7uyHJD7EEsNgan6
Was it something done manually or by some automation?
For ACH payments, when the payment_intent.succeeded webhook event is sent, is that money supposed to be available in our balance immediately?
When we handle our payment_intent.succeeded event for ACH payments, we check the available ACH balance, and if it is available we do the transfer - our expectation was that the funds would be available at that point, is that correct?
No, funds are available (which is required to pay them out) after the Balance Transaction reaches its available_on date. However you can Transfer these funds prior to that point if you set source_transaction with your Transfer: https://docs.stripe.com/api/transfers/create#create_transfer-source_transaction
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We originally had been using source_transaction before moving to using source_type, and had been getting insufficient balance errors because it appeared to be using the card balance instead of the bank account balance for payment intents that had come from a bank account. If we wanted to guarantee that our source type balance is sufficient for a transfer, what would be the correct method of determining that?
Would it just be (available + pending) in order to account for negative pending? Or would it need to be (available + min(pending, 0)) in order to not add positive pending?
When you retrieve your balance it should be broken out by source_type so you would want to check the relevant source_type here. If you are not using source_transaction then yes you would do available + min(pending, 0)
Cool, thank you for the assistance, you may hear from us again ๐