A surety who pays for a debtor shall be indemnified by the latter.
The indemnity consists of:
(1) The total amount of the debt.
(2) Legal interest on the same from the day on which the payment may have been communicated to the debtor, even when it did not produce interest for the creditor.
(3) The expenses incurred by the surety after the latter has informed the debtor that he has been sued for payment.
(4) Losses and damages, when proper.
The provisions of this section shall be valid, even should the security have been given without knowledge of the debtor.
History —Civil Code, 1930, § 1737.