For the privilege of occupancy in any hotel each transient shall pay a tax of four and one-half percent (4.5%) of the rent charged by the operator for the occupancy. The tax shall constitute a debt owed by the transient to the city and be extinguished only by payment to the operator or the city. The transient shall pay the tax to the operator of the hotel at the time the rent is paid. The operator shall enter the tax on the operator’s records when the rent is collected, if the operator keeps the operator’s records on the cash accounting basis, and when earned, if the operator keeps the operator’s records on the accrual accounting basis. If the rent is paid in installments, a proportionate share of the tax shall be paid by the transient to the operator with each installment. If for any reason the tax due is not paid to the operator of the hotel, the tax administrator may require that the tax be paid directly to the city. In all cases the rent paid or charged for occupancy shall exclude amounts received for the sale of goods, services or commodities, other than the furnishing of rooms, accommodations, and parking space in mobile home parks or trailer parks.