A quasi-contract (or implied-in-law contract or constructive contract) refers to a fictional contract recognised by a court. The notion of quasi-contract can be traced to Roman law and is still a concept used in some modern legal systems.
In common law jurisdictions, the law of quasi-contract can be traced to the medieval form of action known as indebitatus assumpsit. In essence, the plaintiff would recover a money sum from the defendant as if the defendant had promised to pay it: that is, as if there were a contract subsisting between the parties. The defendant's promise - her agreement to be bound by the "contract" - was implied by law. The law of quasi-contract was generally used to enforce restitutionary obligations.
The form of action known as indebitatus assumpsit came to include various sub-forms known as the common money counts. The most important of these for the later development of the law of quasi-contract included: (i) actions for money had and received to the plaintiff's use; (ii) actions for money paid to the defendant's use; (iii) quantum meruit; and (iv) quantum valebat.
Quasi-contractual actions were generally (but not exclusively) used to remedy what would now be called unjust enrichment. In most common law jurisdictions the law of quasi-contract has been superseded by the law of unjust enrichment.
A quasi-contract was distinct from a contract implied in fact.