#viky_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285875610651988038
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- viky_api, 19 hours ago, 15 messages
hi! maybe use a report instead of building your own logic. https://docs.stripe.com/reports/select-a-report
No that will not work for me
ok. Well then listing charges works yes! if you have a lot of them it and you don't filter it in any way(like adding created as a filter on charges.list() then it will take a while to list them all, that's normal and you'd need a long-running backend process
dont understood
can you give me an example
an example of what?
The things you said
you need to be more specific about what part you are struggling with.
let count = 0
const succeededCharges = await stripe.charges.list(
{
limit: 100,
},
).autoPagingEach(function (item) {
count++
console.log(item.status, "item")
})
This thing is taking 30 seconds
how can the api survive 30 seconds
and giving me count of 853
what if transactions are more than it
it will take more time
that's all normal yes, making the API requests takes time
I'd recommend not passing limit:100, so that instead it is more, but faster because they're smaller, API calls
This will degade the quality of our platform
you don't use this API in a customer-facing page. You use it for a backend report generation purpose.
your customer facing page should be reading from e.g. your database that you periodically update with backend syncs with Stripe.