#vitorthedev

1 messages · Page 1 of 1 (latest)

night pewterBOT
reef basalt
#

Hello

bold creek
#

nice

#

that's what I needed, thank you bismarck!

reef basalt
#

Sure thing

#

@bold creek you can ask any future questions in the same thread

#

You said: ```I'm currently running a batch job every hour to get the amount_remaining from invoices.retrieveUpcoming for every customer.
I'm doing it sequentially and with a few hundred milliseconds in between to avoid rate limits.
My question is: can i get the upcoming amount remaining from events via webhooks? I could avoid checking every hour.

bold creek
#

oh sorry

reef basalt
#

No worries

bold creek
#

I'm currently running a batch job every hour to get the amount_remaining from invoices.retrieveUpcoming for every customer.
I'm doing it sequentially and with a few hundred milliseconds in between to avoid rate limits.
My question is: can i get the upcoming amount remaining from events via webhooks? I could avoid checking every hour.

reef basalt
#

There won't be any webhooks that fire with this info

#

The real recommendation here is that you just track this data in your own database

#

But using the upcoming Invoice API works as well

bold creek
#

ok I will keep that in mind! I think I can do it on my own db. But for now I will stick to the implementation I have.

#

do you think I need more than 300ms between calls to avoid rate limits?

reef basalt
#

You have 100 WPS and 100 RPS

#

So as long as you stay under those then you are fine

bold creek
#

ok! i will give it a read!

#

thanks bismack, that will be all for today!