The debtor's right to make application of the payment is lost if he makes the payment without directing the application,1 or at any rate if the creditor makes application before the debtor does ;2 or if suit is brought before the debtor makes the application even if the creditor does not make any application ;3 while it has been held that the debtor's right is lost absolutely upon making payment.4 If the debtor does not make the application when he makes the payment and the creditor then makes, the debtor's right is lost.5 If a vendee makes a payment to bind the bargain he can have it applied to the price of any goods which he accepts.6 Payment made in pursuance of a preexisting contract as to its application is treated in la*v as being so applied,7 especially if the rights of third persons are prejudiced thereby, as where, in reliance upon an agreement to apply a payment to a debt secured by a deed of trust a third person has acquired a lien upon the property secured by such trust deed.8 Thus under a contract to pay rent by doing certain work no further application of such payment is necessary. The mere doing of such work operates as such payment.9