#barrel-subscription-usage

1 messages ยท Page 1 of 1 (latest)

brave parcelBOT
marsh ore
#

Hi there

rigid hedge
#

Hello

marsh ore
#

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

#

In your case, it might be better to batch over a longer period of time than a day

rigid hedge
#

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 ๐Ÿ˜„

marsh ore
#

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 ๐Ÿ™‚

rigid hedge
#

perfect ๐Ÿ™‚ I will do that thanks again ๐Ÿ™‚