#afonso

1 messages · Page 1 of 1 (latest)

carmine sorrelBOT
bronze bramble
#

Hi there, what do you mean by get all the money that I got from a certain product ?

gaunt island
#

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.

bronze bramble
#

Are you using Checkout sessions?

gaunt island
#

yes

bronze bramble
#

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

gaunt island
#

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

bronze bramble
#

I can only help with Stripe API related questions. and I don't have details on how Stripe Dashboard is implemented.

gaunt island
#

isn't there a way to do like that with the charges?

#

i think the charges are a more true reflection no?

bronze bramble
#

A charge object doesn't carry information of products

gaunt island
#

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?