Compensation takes place when two
persons, in their own right, are creditors and
debtors of each other. However, there are obligations which cannot be compensated. These obligations are expressed in Articles 1287 and 1288 of the Civil Code, to wit:
ART. 1287. Compensation shall not be proper when one of
the debts arises from a depositum or from the obligations of a
depositary or of a bailee in commodatum.
Neither can compensation be set up against a creditor who
has a claim for support due by gratuitous title, without prejudice to the provisions of paragraph 2 of Article 301. (1200a)
ART. 1288. Neither shall there be compensation if one of the
debts consists in civil liability arising from a penal offense. (n)

The contract of
depositum and
commodatum cannot be compensated. Future
support due by gratuitous title cannot also be compensated as stated in paragraph 2 of Art. 1287. Furthermore,
civil liability arising from a penal clause cannot be compensated. In Metropolitan v. Tonda, the Supreme Court held that if one of the debts consists in civil liability arising from a
criminal offense, compensation would be improper and inadvisable
because the satisfaction of such obligation is imperative.[1]
[1] Metropolitan Bank & Trust Company
vs. Tonda, 338 SCRA 254 (2000).