I am thinking about building a system where customers would put money into their account and they can use there balance to purchase things. Whats the best way to store the money and keep track of who's is who's. I am planning on using stripe. Thanks for your help in advance.
You'll essentially need to build a ledger, keeping track of customer accounts and how much balance they have left. When closing their account, refund whatever's left to the last payment method they used to fund the account.