#sanjeev-reports

1 messages ยท Page 1 of 1 (latest)

ancient ginkgo
#

Hello ๐Ÿ‘‹
Juggling between a few threads
Please give me a moment to catch up ๐Ÿ™‚

rich lotus
#

But we need to generate reports based on a metadata field (that refers to category of a product) which is saved in paymentIntent, and I am afraid that it wont be available in payouts

ancient ginkgo
#

I would suggest you reach out to our support about that
https://support.stripe.com/?contact=true

rich lotus
#

But in support will we be getting any technical support?

ancient ginkgo
#

Yup they should be able to route your question to the team that has more context on specific reports

rich lotus
#

Let me explain my query in a bit detail.
What I am currently doing is, I am fetching a list of PaymentIntents which contains a specific metadata key value.
Then I am looping through those PaymentIntents and fetching balance transactions to fetch fees associated.
The I am having refunds and balanceTransaction for each refund as well.
Lastly, I am fetching disputes data as well.
And by fetching all of this data I am calculating total revenue for that specific category.
But issue is this is taking a lot of time.

ancient ginkgo
#

I see. I wonder if using webhooks to handle this would be faster?
You can use the webhook to log these things when they happen rather than running a really long query

rich lotus
#

Using webhooks, do you refer saving net amount of each paymentIntent in its metadata? Like each time refund is generated that metadata will update

ancient ginkgo
#

That is certainly an option.
I was thinking of just having another table on your backend that can log/update the information whenever you receive a webhook event for payment intents, refunds etc

rich lotus
#

I got that, but currently our application is low scale and we are not having a database as such. Everything is on stripe for now

ancient ginkgo
#

I see.
You can def use metadata to hold non-sensitive information
But I'd still recommend reaching out to our support team to see if there are any specific types of reports that you can use to make this faster

rich lotus
#

Ok sure.. Thanks a lot for your time. Have a good day ahead. ๐Ÿ™‚

ancient ginkgo
#

NP! Happy to help ๐Ÿ™‚