Issue about pppoe quotes

Hi there, my name is Rutin.

I need a way of script to controlling and managing a small network to limit each PPPOE or HOTSPOT user uses the bandwidth capacity as example “20GB” for 30 day or daily and after it “his quote” ended it’s shifting his speed automatically to lower speed to his new date start in date 1 in his new month. Could that be fixed?.
Any help would be appreciated
Thanks in advance

For this you most likely have to look at a RADIUS server.

You can look at the MikroTik user manager:
https://wiki.mikrotik.com/wiki/Manual:User_Manager
https://wiki.mikrotik.com/wiki/User_Manager/Limiting