require "iab" iab = IAB.new("google") iab:setUp(google_store_key) iab:setProducts( { monthly_subscription_product_id = "GooglePlayMonthlySubscriptionProductID", other_product_id = "GooglePlayOtherProductID" } iab:addEventListener(Event.AVAILABLE, function(e) iab:addEventListener(Event.PRODUCTS_COMPLETE, function(e) for i = 1, #e.products do local p = e.products[i] -- make note of id, title, description and price end -- of loop through available products end -- of products complete ) end -- of function called when store is available )