money counter hotspot telegram

Good night guys!

I have an issue .I am trying to figure out how to send a message to telegram the total amount of money made in one month on my hotspot.
My advanced so far is the i already send the message to telegram.
But every time a user logs in i want to send how much did the user spend and have a total amout counter.

User: 12
Price: $5
Total: $0

So the next user that logs in. It has to send


User: 198127
Price: $15
Total: $ 20

This is my advanced so far:
:global aPrice "Price: "
:local cost 5
/tool fetch url=“https://api.telegram.org/bot$token/sendmessage?chat_id=$id&text=User: $user $aPrice $cost”

If some one gives me a hint a will appreciated!