The mayor and council, by ordinance, shall have the power and authority to require any individual, person, firm, partnership, company, or corporation which transacts business in the city or which practices or offers to practice any trade, business, calling, avocation, or profession therein to obtain a license or permit for these activities from the city and to pay a reasonable fee for the license or permit for the regulation of any activity not prohibited by general law. These fees may reflect the total cost to the city of regulating the activity and if unpaid shall be collected as provided in section 5-110 of this chapter. The mayor and council, by ordinance, may establish reasonable requirements for obtaining or keeping licenses as the public health, safety, and welfare necessitate, including, but not limited to, denial or revocation for any violation of federal or state law or city ordinances.