It was easy enough to see that in many of these cases the obligation, being imposed by law, had nothing contractual about it. It was obvious, for instance, that the obligation to make a customary payment, or to pay a penalty for the breach of a bye-law, was simply imposed by law; and the same fact was equally obvious in many of these cases in which the law imposed an obligation to pay, in order to remedy an unjust enrichment. But these cases were numerous and varied, and the principle which underlay them badly needed to be stated. Here Lord Mansfield had his chance. He was not faced by a coherent body of principles like the doctrine of consideration, or the rules as to disseisin, or the rule in Shelly's Case. He found an incoherent set of rules stated in a number of heterogeneous cases; and if there was any one principle at their back, it was the innate feeling of judges that it was just and equitable that a convenient remedy should be given in these cases. This was a situation with which he was eminently qualified to deal. In the passage on his judgment in Moses v Macferlan, in which he laid down the conditions under which an action would lie for these cases of unjust enrichment, he summed up and thereby gave precision to the principle underlying the earlier cases. The actual decision in the case is erroneous; but the principles there laid down are the starting point of the modern development of what is the largest and most important part of the law of quasi-contract; and their acceptance has done much to liberalise the common law. "This kind of equitable action", he said, "to recover back money which ought not be in justice to be kept, is very beneficial, and therefore much encouraged. It lies only for money which, ex aeqo et bono, the defendant ought to refund: it does not lie for money paid by the plaintiff, which is claimed of him as payable in point of honour and honesty, although it could not have been recovered from him in any course of law; as in payment of a debt barred by the statute of Limitations, or contracted during his infancy, or to the extent of principal and legal interest upon an usurious contract, or for money fairly lost at play: because in all these cases the defendant may retain it with a safe conscience, though by positive law, he was barred from recovering. But it lies for money paid by mistake; or upon a consideration which happens to fail; or for money got through imposition (express or implied); or extortion; or oppression; or an undue advantage taken of the plaintiff's situation, contrary to laws made for the protection of persons under those circumstances. In one word, the gist of this kind of action is, that the defendant, upon the circumstances of the case, is obliged by the ties of natural justice and equity to refund the money."
It was thus in the action of indebitatus assumpsit that the larger part of our modern law of quasi-contract has originated. But as we have seen, there are also a certain number of quasi-contractual obligations which had never come within its sphere. On a judgment only debt could be brought; and there were a certain number of obligations still only remediable by actions on the case. It is not till forms of action are things of the past, that the products of these various parallel developments will be able to be grouped together into a uniform law of quasi-contract. It is not till these procedural changes have taken place that the fiction of a promise, and with it the confusion between implied contracts and contracts implied by law, will be got rid of, and the law of quasi-contract will be able to emerge as a distinct branch of the law."