This is an example open web app that implements some nifty features like in-app payments
Take a look at the source to see a working example of charging money for an in-app product. You can install the app from Firefox Marketplace to play the game and see it in action. If you are using a device that supports payments (such as a Firefox OS device) then you can visit the shop section and make a purchase.