Token Quotas - anyone?

Has anyone written code to store a certain amount of “pours” or flow allowed for a particular token?

I wish I could code, I see it as being another field in a user table and deduct from it each pour.

Probably not that simple.

What I would like to do is grant my sons say 2L of beer per week and make them authorise to pour.

I have RFID and user accounts working, next is solenoids. I suppose I can at least track what they are doing by not allowing guest pours