#afonso
1 messages · Page 1 of 1 (latest)
Hi there, what do you mean by get all the money that I got from a certain product ?
All time earnings for a particular product id.
Dashboard only shows MRR.
I want all-time revenue.
Excluding of course refunds.
I just want net revenue of a product.
Are you using Checkout sessions?
yes
OK, then you can use the List Checkout Sessions API (https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions) to get the list of checkout sessions and filter them out based on your criteria. Remember to expand 'data.line_items' field so that you can get the product info from the line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this feels so indirect
isn't there a more direct way?
how does stripe itself get the MRR for a product?
because on the dashboard it shows mrr
I can only help with Stripe API related questions. and I don't have details on how Stripe Dashboard is implemented.
isn't there a way to do like that with the charges?
i think the charges are a more true reflection no?
A charge object doesn't carry information of products
damn
so i basically need to go checkout sessions and check if the product is on line items
but with the checkout it doesnt have in account the subscriptions
why is this so difficult?
just want total net revenue for 1 product
and then we need to remove the stripe tax as well
damn this is trouble, don't you have easier way?