163. Liability to repay to third person.

The receipt of money from a third person by an agent on his principal's behalf does not in itself render the agent personally liable to repay it when the third person becomes entitled as against the principal to repayment, whether the money remains in the agent's hands or not1. If, however, a third person pays money to an agent under a mistake of fact2, or in consequence of some wrongful act3, the agent is personally liable to repay it4, unless, before the claim for repayment was made upon him, he has paid it to the principal or done something