#Sumit1993

1 messages · Page 1 of 1 (latest)

sick joltBOT
coral jolt
nimble charm
#

will the data from reports api include the revenue generated from subscriptions also?

#

@coral jolt

coral jolt
#

It should

nimble charm
#

i am still unable to get the api ... can u help me with some sample request to get revenue ?

#

this is all i got with the payout reconcilation endpoint

coral jolt
nimble charm
#

this endpoint is also not providing me the figures

coral jolt
#

You would need to wait for a webhook event reporting.report_run.succeeded, then find the URL and download it

#

Please follow above Doc

nimble charm
#

so it cant be done through simple api calls ... i have to use webhook right ?

coral jolt
nimble charm
#

we are charging through subscriptions at the moment

#

will the paymentintents work for that purpose ?

coral jolt
#

Subscription should create PaymentIntent under the hood, so I think yes, but please test via Test mode

nimble charm
#

sure ... so we are developing a dashboard for our application where we would list out the revenue generated through subscriptions for today , last 30 days , last year .... what way u wud suggest me to fetch all this data as it might be accessed frequently

#

i mean subscription is charged one time but the payment is done every month/year as per plan.... how can i fetch all that revenue

sick joltBOT
hollow storm
#

Every billing cycle will generate the invoice which has Payment Intent under the hood. You can List Payment Intent to get the payment amount to calculate the revenue

sick joltBOT
nimble charm
#

so if i save all the data from payment_intent.succeeded webhook to our database and then run queries to get sum of those records... it will solve the purpose right ?

#

@hollow storm @solid stirrup

solid stirrup
#

Hi! I'm taking over this thread.

#

Give me a few minutes to catchup.

nimble charm
#

ok sure awaiting you

solid stirrup
#

So you have a few options (as mentioned above):

  • Use the reporting API, that will give you all the numbers you need (recommended)
  • Or compute the numbers by yourself by listening to payment_intent.succeeded for example (not recommended, because that's a lot more work (how do you take into account refunds, coupons, disputes, etc.?)
nimble charm
#

but reporting api i cant call every time user visits our dashboard right

#

i will have to push realtime updates then to the frontend everytime reports webhook completes

solid stirrup
#

If you want a real time dashboard, I guess you are right. But if you dashboard is updated every N hours, you could use the reporting API and cach the results on your end.

nimble charm
#

ok great.... thanks for the support guys... you guys have brilliant support system