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.

Related provisions

Note. Statute text quoted on this page is reproduced from the official enactment and is linked to the full provision. The explanation around it is general legal information from Vivas & Nobles Law Office, not legal advice. Whether it applies to your situation depends on facts only a lawyer reviewing them can assess.