When the tax collected for any period is in excess of 4 percent, the total tax collected shall be paid over to the commissioner less the compensation to be allowed the dealer.