#slvfelix
1 messages · Page 1 of 1 (latest)
I'd suggest deleting that file if you can since it seems full of personal info on a public server.
in general to answer the question, there's no great way beyond listening to webhook events or tracking it in your system as you go
No worries, is full of dummy information
for example you can listen to customer.subscription.updated events and inspect the details of previous_attributes and the current items in the event, to see what has changed, and write that to a database where you generate the report from later
Ok, I'll try to that
But it really catches my attention how some companies build stuff like the csv I'm sending you. I dont understand why there's not history of a suscription api which would make my job a lot easier.
mainly because we'd have to build such an API and it's just not been done yet, it's more of a feature request.
in any case I'd point out the existence of various reports you can view/download/configure such as
https://stripe.com/docs/billing/subscriptions/view-metrics
https://stripe.com/docs/reports/balance
which might help solve your actual use case without having to build something custom.(I looked at your CSV but I have no idea what the numbers in each column are intended to actually represent so I can't be sure I understand exactly what you're looking for).
That is how much revenue a deal generated
per month
I feel that the information is there, but I dont know which api or combination of apis to grab
because if external providers managed to pull it off, there's gotta be a reason
well for example maybe that is the same as the MRR-per-customer we mention above.
Or in the API you can list successful payments for a given customer in a given time range (https://stripe.com/docs/api/charges/list) and sum them to get a general "this is how much money this customer paid me in a month" figure (but then it gets more complicated because you then also have to check if there were any refunds/disputes, but that's a starting point).
hmm, I mean of course this is all possible, all the information on raw payments and other details is available in the API, but it can be a lot of work to generate and customise code to develop and export exact views/reports to match your needs(which is why other providers have businesses that provide that service).
The only thing I need, is when a subscription item is created and when it ended in a subscription.
I will:
1- Check the webhook event to listen to subscriptions items changes
2- Check this API: https://stripe.com/docs/api/charges/list
3- And see: https://stripe.com/docs/billing/subscriptions/view-metrics
But the third one is just a user interface feature in the website? Is not an API I cann access to, right?
👋 stepping in as karllekko needs to step away
That's correct -- you would have to calculate those pieces yourself
If I can know when a subscriptiuon item starts and ends, I know how much revenue it generated.
If its a feature in the user interface, is not the way as third party proviuders dont access that stuff in the api. I'll check solution 1 and 2 and if I have any more doubts I'll let you guys know.