#Matty (AloysiusS)
1 messages · Page 1 of 1 (latest)
My understanding is that it should be already transfered when you get the API response about it being transferred. Are you seeing a delay when testing?
we are doing a transfer, then a balance check to ensure which bucket the transfer went into (card or bank_account). and 2% of the time we aren't seeing enough funds to do a manual payout as a 3rd step. after we do that balance check if there is enough in either bucket(there should be we just did the transfer) we do a manual payout.
but our error message that we log in our system say something like "Insufficient Funds to continue settlement; *******************, transfer_amont: 621.43, available_balance: {card: 621.43, bank_account: 0.0}"
it super weird since our error message says a simple comparison didn't work, but those number are definetely the same in our internal error message.
so I had a theory that maybe if it took a small amount of time to transfer our check would fail, but our log would do another balance check and make that mesage.
so I figure I would ask if it was guaranteed to see the balance after a transfer
Do you have example requests IDs (req_123) from a time that you tried this? I can check in to this
I think so. let me find one
req_abjchAdwBaBaFu
req_tU6CJLAR30ytDd
it happens about 15 out of 800 times
Thanks for the requests, will see if I can see anything about the delay here.
np. just knowing if one might exsist would help. we can debounce it from our side too. just as long as we know that likely the problem
I am seeing slight delays here though I'm not finding anything that indicates it is a purposeful delay so I'm not sure how much waiting I would recommend. It may be worth just making another retrieve call or two before throwing the error.
Also I am not 100% sure if the payout call would actually fail if you made that call instead of doing the retrieve. If you are always just paying out the amount you just transferred in, that may make sense to test.
Also that {card: 621.43, bank_account: 0.0} does look like it may have come from the Stripe response, so it may make sense to debug this and see if Stripe really is returning outdated data here. I would log the full json of the Stripe response along with this error and then replay it if it looks like Stripe sent the right data but the error still happened
yea. that is what I told my co-worker, but he very adimant about doing the balance check haha. the transfer always puts the funds in the payment_source bucket in the connect account that it grabbed them from and specified from the transfer call.
I assume what we got before was something that showed all 0's
I plan on doing a small wait 1 second, and maybe a last try 1 second after that
Have you already tried looking at the full API response that Stripe sends you when you see that error? Also out of curiousity, is the balance check the only thing that can cause that specific error or is it possible that that error comes from a try catch block where other errors could have triggered it?