#Andrew-connect-balances
1 messages · Page 1 of 1 (latest)
Hey! Why specifically do you need to account for any discrepancies? Generally we'd recommend to rely on the values returned via the API
Well it's the same reason stripe does it here. For example the "Total Balance" column isn't a value that's returned from the API it's actually calculated.
Available to payout is the instant which is fine, the Available soon in the pending value i believe.
I don't understand the question I'm afraid. Total balance there (in your screenshot) is a sum of available soon and available to payout
Give me a second i wanna see the actual response. coming back. it was calculated weirdly when the available soon was a negative balance due to a refund. i'll try to recreate.
Ok given this JSON from the balance API for a connect account:
{
"livemode":false,
"object":"balance",
"pending":[
{
"amount":2205,
"currency":"usd",
"sourceTypes":{
"card":2205
}
}
],
"instantAvailable":[
{
"amount":0,
"currency":"usd",
"sourceTypes":{
"card":0
}
}
],
"available":[
{
"amount":-2824,
"currency":"usd",
"sourceTypes":{
"card":-2824
}
}
]
}
I now have these values. @jaunty flicker
$22.05 - $28.24 = -$6.19
So pending minus absolute value of available
I'm assuming the "Available to payout" is a combination of available and instantAvailable?
Total balance is just the sum of all 3 values
Those could be negative, as you're seeing here
Ah ok i see. i was doing available - abs(pending) for the total.
Hope that helps?
Yea trying it out now but seems like it will. thanks!
Np!