The mayor and council, by ordinance, shall have the individual, person, firm, partnership, company, or corporation who transacts business in the city or who 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 the general laws of the state. 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-112. The mayor and council, by ordinance, may establish reasonable requirements for obtaining or keeping licenses as the public health, safety, and welfare necessitates, including but not limited to denial or revocation for any violation of federal or state law or city ordinances.