#themechanic_api
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/1262689338995642380
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Depending on what data you want to display, you can use API to get individual objects, e.g. PaymentIntents, and calculate it yourself.
Oh, I understand. I would suggest calling this endpoint on your side at the start of the month and saving the data, to display to the user later: https://docs.stripe.com/api/balance/balance_retrieve
In short, Stripe doesn't make report data available via API, so you will need to construct it yourself.
oh, so i would have to call it for each of my accounts connect, at the 1st at 00:00 ?
does Stripe think about make this data available ?
Yes, that's one workaround idea. You could alternatively sum all the pay ins and payouts to find the balance at a given time, but this seems more difficult.
I am not aware of such plans
ok, or i could download the csv file and parse it
Yeah, that's another option
are the monthly balance reports generated automatically or have i to create it ?
๐ taking over for my colleague. Let me catch up.
you can, schedule the reports to run automatically or you can run them whenever you want, using report_runs
hi !
you can also schedule reports on the dashboard
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
ok ! when i create a report a report run, how many times it takes to achieve ? am i obliged to use webhooks or can i just wait in my script ?
it's recommended to use webhooks because it's async
and if you await in your code this means that you're blocking your server and potentially even timeouting
ok i'll dig it
let me know if you need any more help