#lennard.
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
It depends on your application.
If you just want to have a hard limit of calls for each month, you can track it in your database.
I can give more info:
Every user gets 5 credits. Each time they use an API its 1 less. If they subscribe they have 100/mo.
But how do I reset that every month?
Or do I just increment infinite and then divide by months subscribed?
So if 100 credits and 1 month subscribed -> Block
But at 980 / 10 mo sub -> Approve
Or is there an official way? @split kestrel
There's no official way, because the way you track your usage is not related to Stripe.
But I'd suggest recording the calls and a timestamp, and then counting how many calls they made in the current billing period. If it's over your limit, you block the call.
Okay! I didn't think about the timestamps. Thanks a lot for the help! @split kestrel
Happy to help!