An animal received into a pound shall be detained until sold under section 23 unless before the time for the sale the fees prescribed and the cost referred to in section 21 are paid.