#streak_code

1 messages ยท Page 1 of 1 (latest)

placid oreBOT
ocean agateBOT
#

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.

placid oreBOT
#

๐Ÿ‘‹ 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.

tribal silo
#

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

small kestrel
#

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?

tribal silo
#

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

small kestrel
#

is that the lifetime report^ in the screenshot?

#

I don't know that page well , can you confirm by downloading the report and checking?

tribal silo
#

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.

#

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

placid oreBOT
west rampart
#

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?

tribal silo
#

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

west rampart
#

Which values are you expecting to line up? Can you also describe the math you're using to calculate the value?

tribal silo
#

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

#

So maybe the ui is just missing some transactions? I'm not sure, but something is inconsistent

west rampart
#

The time range is identical?

tribal silo
#

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

west rampart
#

What's the earliest Balance Transaction returned by your code?

tribal silo
#

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

west rampart
#

So that accounts for some (if not all) of the delta, no?

tribal silo
#

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

west rampart
#

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.

tribal silo
#

Was not account for "payment" transfer types

west rampart
#

Ahhhhh, okay. So it's looking better now?

tribal silo
#

not sure why those don't show up in the csv or ui though

#

yes the value is now consistent with the total shown for charges in the ui

#

confusing that they are split in the api but show up as the same in the report

#

Thank you