The creditor is not bound to accept payment or performance by a third person who has no interest in the fulfillment of the obligation, unless there is a stipulation to the contrary.
Whoever pays for another may demand from the debtor what he has paid, except that if he paid without the knowledge or against the will of the debtor, he can recover only insofar as the payment has been beneficial to the debtor. (1158a)