I have an app that generates short stories. Since I don’t want to just let anyone generate stories indefinitely, I need to find a way to limit this per user. If the user wants to generate more stories, they shall pay for the ability to generate more.
Does anyone have any advice or guidance on best practices for achieving this? I am familiar with the Stripe API (though, I have never actually implemented it before) and I currently use Firebase to manage authentication and a data store for user profiles, etc.
Do I just shut off their access after a certain number of stories are generated? Then, if the user wants to generate more, he has to pay a subscription and then his user profile role is upgraded to a higher tier, etc. Is this a reasonable approach?
Yep, this is a common method to resolve this. This is the underlying principle behind SaaS. It sounds like you got the tools all ready and set up to do this.
You could also base usage off of “tokens” (not LLM tokens). Basically, make your own tokens as currency for using your tool. If the user runs out of tokens, then they can’t use the tool until they purchase more.
If you need further help, like more technical coding questions on pursuing this, just post and we will be more than happy to help!