If neither party makes application pursuant to § 20-4-7 or § 20-4-8 within a reasonable time after performance, the performance must be applied to the extinction of obligations in the following order; and if there be more than one obligation of a particular class, to the extinction of all in that class, ratably:
(1) Of interest due at the time of the performance;(2) Of principal due at that time;(3) Of the obligation earliest in date of maturity;(4) Of an obligation not secured by a lien or collateral undertaking;(5) Of an obligation secured by a lien or collateral undertaking. CivC 1877, § 833, subdiv 3; CL 1887, § 3457, subdiv 3; RCivC 1903, § 1150, subdiv 3; RC 1919, § 757 (3); SDC 1939, § 47.0207 (3).