Hello there!
I see that you are having trouble with the payment plugin, and to be honest, it is not a good practice to always goto phpadmin and manually change the credit.
So, I will be able to program that for you. If you give 50 Credit, and client use 10, the balance should be 40 = (50 -10 ).