The court shall, in the order of sale, direct the terms of credit which may be allowed for the purchase money of any portion of the premises, of which it may direct a sale on credit; and for that portion of which the purchase money is required by the provisions hereinafter contained, to be invested for the benefit of unknown owners, infants or parties out of the state.