An obligor who pays a debt with money or other fungible things borrowed for that purpose may subrogate the lender to the rights of the obligee, even without the obligee's consent.
The agreement for subrogation must be made in writing expressing that the purpose of the loan is to pay the debt.
La. C.C. § 1828