#streak_code
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- streak_code, 21 minutes ago, 3 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260280763748712571
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
this is what the lifetime report looks like on our test account
Unless im misunderstanding the values which is possible, but I'm still not sure why the total revenue is being miscalculated
did you see my last mesage in the other thread? you didn't respond so I closed it
I had said:
hello! there may be reasons why that wouldn't total up. There are many BalanceTransactions (BT) types. I think refunds or chargebacks need to be taken into account.
e.g. $100 charge BT = +100
followed by $100 refund BT = -100
sum = 0
ah you're saying Refunds is 0
is that right?
Yes sorry, I had to leave for a moment and by the time I got back the thread was closed
correct we have no refunds or anything else like that. I;m not sure what the partial-capture reversal is but its a small amount
is that the lifetime report^ in the screenshot?
I don't know that page well , can you confirm by downloading the report and checking?
its from the balance report page and I set the date range to the earliest it would let me to the latest date it would let me. I'll check the download as well.
Here is the download, seems to line up with what is shown on the UI at a glance
I thought maybe it was a currency issue but I checked and they're all usd
I am noticing that that iterator is returning 281 transactions but the csv only has 261 lines of information
Hi there ๐ taking over, as my colleague needs to step away
Is the issue here that you're seeing no refunds? Or is it something else?
If you're expecting to see refunds show up in that report, do you have an example of a refund that occurred in this time range?
No I'm expecting the sum of the charges to match one of the values shown in the screenshot but it is slightly different
In the test dashboard we have a gross amount of $1,213,898.83 and fees of -$35,266.99 which did not line up with the returned amount of $1,194,208.83
Which values are you expecting to line up? Can you also describe the math you're using to calculate the value?
So I thought our lifetime revenue would be equal to the sum of all balance transactions of the type "charge"
That is what I'm computing in the code
but this returned the amount $1,194,208.83
I was expecting this to match either the gross amount or gross amount - fees for charges in this screenshot from the balance reports page on the stripe dashboard
But the math doesn't add up
This is the download of the report which also has less line items than the number of balance transactions returned by the code, 261 in the csv vs 281 from the code
So maybe the ui is just missing some transactions? I'm not sure, but something is inconsistent
The time range is identical?
There is no time range in the code, I'm just getting all balance transactions
On the UI I went as far back in time as it would let me which is December 14, 2023 and the latest it would let me which is July 7, 2024
which as far as I know December 2023 is when the stripe account was created/when it was starting to be used so there shouldn't be anything before that
What's the earliest Balance Transaction returned by your code?
Let me try and check
Jan 23, 2024
Which matches what is in the csv
But the latest one is Monday, July 8, 2024
whereas the latest in the csv is July 2, 2024
So that accounts for some (if not all) of the delta, no?
Problem is we don't have $19690 worth of transactions between july 2 to july 8
actually let me check
that might not be true
This is all we have
you can see the $199k transaction at the end of the csv
we've gotten at most $300 in charges since then
The next step would be to find out which of the different Balance Transactions have a type that doesn't coincide with what's in the report. So if I were you, I'd get the full Balance Transaction list and look at the types to make sure only the relevant Balance Transactions are included: https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-type
If all else fails, you'll need to map each Balance Transaction to its corresponding charge, then look for duplicates and outliers.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hmm okay i figured it out
Was not account for "payment" transfer types
Ahhhhh, okay. So it's looking better now?