#Scott-pagination
1 messages · Page 1 of 1 (latest)
It's a question but when I use it I am calculating the total volume and it's different to what I see on stripe dashboard
On stripe dashboard I see €103.88
Where on my website I see: €91.61
You mean the "gross volume" showed on the dashboard main page?
Could you share the code you wrote to compute the volume?
Excuse my stupid question.. that 103 was gross..
[code]
public async Task<IActionResult> TestBalance()
{
ConnectAccount acc = GetConnectAccount();
var service = new BalanceTransactionService();
var requestOptions = new RequestOptions();
requestOptions.StripeAccount = AppEncryption.Decrypt(acc.StripeAccountID);
var options = new BalanceTransactionListOptions{
Limit = 100,
Type = "charge"
};
List<BalanceTransaction> balance = await GetAllBalances();
long bal = 0;
await foreach(var _bal in service.ListAutoPagingAsync(options, requestOptions))
{
bal = bal + _bal.Net;
}
return new JsonResult(bal);
}
[code]
Apologies for wasting your time on that one.
I was looking at the Connect Account without going into the connect account dashboard
No worries! So you managed to fix your issue?
I did indeed, thank you. My last question will be, if there is say 10000 charges on a connected account, this method of getting the balance should work fine?
Might take a while to gather them all but overall it should work to get every balance transaction
This should work yes! But let me check if there's a better way.