If you take a look at our guide here, this shows how you can use the commerce system (See the commerce section on the left of the guides)
With regards to those specific items, it would depend on where the key is coming from. You can generate a key by selecting that option within the product benefits section, when setting up a new product
With regard stock, this is done in the "Stock & Price Adjustments" tab.