Where several persons are bound together in any bond, bill or other writing as joint debtors or as joint sureties, in any sum of money made payable to any person, his or her executors, administrators, order or assign and such bond, bill, or other writing shall be paid by any of such joint debtors or joint sureties, the creditor shall assign such bond, bill, or other writing, to the person paying the same; and such assignee shall, in his or her own name, as assignee, or otherwise, have such action or remedy as the creditor himself or herself might have had against the other joint debtors, or sureties, or their representatives, to recover such proportion of the money, so paid, as may be justly due from the defendants.