#barrel-subscription-usage
1 messages ยท Page 1 of 1 (latest)
Hi there
Hello
There is no batch API here in the sense of sending multiple usage records together. The recommendation is to batch the usage so you just make a single API call daily per Sub for instance -- so you are already doing the right thing there. Mostly you will just have to space out your usage reporting here to not hit rate limits but yes you will need 10k requests/day if you have 10k active Subs
We discuss this a bit in our docs here: https://stripe.com/docs/billing/subscriptions/usage-based#report
In your case, it might be better to batch over a longer period of time than a day
Oh my, first of all thanks for such a quick answer, that's great!
Hmm I see, I was just hoping that I can deal with all the subs that I might have in single call.
Gotcha, so just to summarise:
If I want to charge user per day until they stop the sub or until the sub expire sin my system it is best to maybe call that on the last day of the billing period? Is that correct?
Anyway that clears up a lot and I can stop reading docs now, cheers ๐
Yep exactly, just submitting usage at the end of the billing period would be recommended here.
You'll also want to ensure you have retry mechanisms in place in case you do hit a 429 (rate limit) error if you end up submitting a lot of usage records at the same time
And happy to help! That's what we are here for ๐
perfect ๐ I will do that thanks again ๐