I am building a React App that will be subscription based and it will be using Stripe. Briefly, it saves prompts (text) with a label
The problem I am facing is that I want to give the user 5 free saves and then ask him to subscribe. Can anyone help me know what is the best way to do this?
Thanks in advance
I thought of creating a counter in the user document and decrement it whenever a prompt is added. But the question is, should I do this in the client side after each save request or should I make an even-based cloud function that is triggered on document addition.