#vitorthedev
1 messages · Page 1 of 1 (latest)
Hello
To test Subscription cycles like this you want to take advantage of test clocks. See: https://stripe.com/docs/billing/testing/test-clocks
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.
oh sorry
No worries
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.
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
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?
We detail our rate limits here: https://stripe.com/docs/rate-limits
You have 100 WPS and 100 RPS
So as long as you stay under those then you are fine