Short answer. Automatically. Article 1290 provides that when all the requisites in Article 1279 are present, compensation takes effect by operation of law and extinguishes both debts to the concurrent amount, even though the creditors and debtors are not aware of the compensation. No court order is needed to create it.
What the law says
compensation takes effect by operation of law, and extinguishes both debts to the concurrent amount, even though the creditors and debtors are not aware of the compensation
Civil Code, Article 1290 — Compensation by Operation of Law. Read the full provision →
It happens the moment the conditions coincide
Article 1290 could hardly be plainer: once the requisites are present, compensation takes effect by operation of law, and extinguishes both debts to the concurrent amount, even though the creditors and debtors are not aware of the compensation. Nothing is required of either party — no notice, no demand, no agreement, no filing. The extinguishment dates from the instant the last requisite falls into place, not from the day someone notices. That date does real work: interest and penalties on the extinguished portion stop running then, so a creditor who kept charging interest afterwards was charging it on a debt that no longer existed.
The requisites it depends on
Article 1279 sets them out. Each party must be bound principally and be at the same time a principal creditor of the other. Both debts must consist in a sum of money, or, where the things due are consumable, be of the same kind and quality. Both must be due. Both must be liquidated and demandable. And over neither of them may there be any retention or controversy commenced by third persons and communicated in due time to the debtor. Miss one and nothing happens automatically — an unliquidated claim, in particular, is the usual reason a set-off argument collapses.
What a court is actually for
A court does not create the compensation; it declares that it occurred. That distinction is practical rather than academic. If you are sued for a debt that was already extinguished by set-off, you must raise it — a defence nobody pleads is a defence nobody rules on, and the judgment will be for the full amount. So the automatic character of Article 1290 protects your position in substance, but it does not excuse you from asserting it, and it does not relieve you of proving the requisites of Article 1279 when the other side disputes them.
Where it does not operate
Some debts are excluded outright. Article 1287 bars compensation where one of the debts arises from a depositum or from the obligations of a depositary or of a bailee in commodatum, and Article 1288 bars it where one debt is civil liability arising from a penal offence. Assignment complicates it too: under Article 1285 a debtor who consented to the assignment of the credit cannot set up against the assignee the compensation he would have had against the assignor, unless he reserved his right when he gave that consent. If a credit against you has changed hands, check what you signed at the time.
Cases citing this provision
These Supreme Court decisions cite the provision above. We list them so you can read them yourself; the summaries of what each decided are not ours to give.
- Union Bank of the Philippines vs. Development Bank of the Philippines, G.R. No. 191555, January 20, 2014 — read the decision on LawPhil →
- Gatchalian Realty, Inc. vs. Evelyn M. Angeles, G.R. No. 202358, November 27, 2013 — read the decision on LawPhil →
- Banco De Oro Unibank, Inc. vs. Edgardo C. Ypil, Sr., et al, G.R. No. 212024, October 12, 2020 — read the decision on LawPhil →
- First United Constructors Corporation, et al. vs. Bayanihan Automotive Corporation, G.R. No. 164985, January 15, 2014 — read the decision on LawPhil →
Related provisions
- Civil Code, Article 1290 — Compensation by Operation of Law
- Civil Code, Article 1279 — Requisites of Legal Compensation
- Civil Code, Article 1285 — Compensation and Assignment of Credit
- Civil Code, Article 1287 — Debts Excluded From Compensation (Deposit, Support)