Yes, you can definitely do this with Local Storage, there are plenty of examples and tutorials.
However, if you are talking about In-app purchases and real money, then you should have a system allowing to restore purchases from some online storage. Otherwise people who spent $50 and then accidentally cleared storage on their device will be very upset.