Is there an api endpoint I can use on the server side to see the current total balance in my square account?
I don’t want to have to go through wearing down the server by making numerous calls to the entire list of payments and list of refunds and do the math to figure out the balance.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
At this time the ability to get the current balance for a location within a Square account isn’t currently possible. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.
Forgive me for saying so, but that is very disappointing and rather poor on Square’s behalf.
Is there anyone who has an algorithm to calculate any balance in the Square account from the Payment records?
I mean I can do this:
client = Square(
token=SQUARE_ACCESS_TOKEN,
environment=SQUARE_ENVIRONMENT,
)
payments = client.payments
payments_pager = payments.list()
for payment in payments_pager:
...
where payment I can inspect but I see no attribute of it that classifies it as having been paid out (being part of a payout) or not (as one might rightly conclude there’s a balance to be paid out form payments received that have not been paid out yet.