If you are using any payment extension then there must be a block for payment succes then just put blocks like when payment succes then call your database to get user current balance and then add the amount which user paid you usin math component and for withdrawal just call your database and check that the entered amount is available in user account or not if yes then minus then entered value to get value of user balance and then run a block to store data in which you can take user payment details and payed amount