The clerk of the supreme court, the clerk of each district court, sheriff, or recorder, in all cases, may require the party for whom any service is to be rendered to pay the fees in advance of service, or to give security for the costs of service, to be approved by the officer.