What are quasi-contracts?

One of the sources of obligation are quasi-contracts. Article 2142 of the New Civil Code of the Philippines provides:
Art. 2142. Certain lawful, voluntary and unilateral acts give rise to the juridical relation of quasi-contract to the end that no one shall be unjustly enriched or benefited at the expense of another. (n)
 From the above legal precept, quasi-contracts give rise to an obligation so that no one will be unjustly enriched or benefited at the expense of another. There are two kinds of quasi-contracts: a) solutio indebiti; and b) negotiorum gestio. There is solutio indebiti if something is received when there is no right to demand it, and it was unduly delivered through mistake.[1] On the other hand, negotiorum gestio exists when someone voluntarily takes charge of the agency or management of the business or property of another and without any power from the latter.[2]

[1] Art. 2154, NCC.

[2] Art. 2144, NCC.