#lennard.

1 messages · Page 1 of 1 (latest)

harsh impBOT
split kestrel
#

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.

hushed tusk
#

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.

hushed tusk
#

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

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.

hushed tusk
#

Okay! I didn't think about the timestamps. Thanks a lot for the help! @split kestrel

split kestrel
#

Happy to help!