Where any persons are bound in any bond, bill or other writing made payable to any person, his or her executors, administrators, order or assigns, and the money due thereon or any balance thereof, shall be paid or tendered by a surety therein, the obligee shall be obliged to assign such bond, bill or other writing to such surety, and such assignee shall, by virtue of such assignment, have an action in his or her own name thereon against the principal debtor or his or her representative.