Short answer. When the breach that actually occurred is not the kind the parties had in mind when they set the penalty clause, the law takes over from the stipulation. Article 2228 of the Civil Code removes the stipulated amount from the picture and allows the law — not the agreed figure — to determine the measure of damages.
What the law says
When the breach of the contract committed by the defendant is not the one contemplated by the parties in agreeing upon the liquidated damages, the law shall determine the measure of damages, and not the stipulation.
Civil Code, Article 2228 — Partial or Irregular Performance. Read the full provision →
Why the stipulation may not control
Article 2228 of the Civil Code addresses a specific mismatch: parties agree on a fixed damages figure for a particular kind of breach, but a different kind of breach occurs. The article is clear: "When the breach of the contract committed by the defendant is not the one contemplated by the parties in agreeing upon the liquidated damages, the law shall determine the measure of damages, and not the stipulation." The penalty clause only governs the breach it was designed to address.
How this differs from ordinary liquidated damages
In an ordinary case where the defendant commits exactly the breach the parties anticipated, liquidated damages clauses are generally enforceable. The pre-agreed amount replaces the need to prove actual loss. Article 2228 carves out an exception for the case where the breach is different in kind from what the penalty clause covered. The clause does not become void — it simply does not apply to the unanticipated breach. The aggrieved party must then rely on the general law of damages rather than the contract figure.
What contemplated means in practice
Whether the actual breach was the one the parties contemplated depends on how specifically the penalty clause was drafted and what the parties' evident intention was. A clause that says in case of delay in delivery, the penalty is a fixed sum, does not automatically cover a complete failure to deliver, an abandonment of the project, or a deliberate substitution of inferior materials. Each of those is a different kind of breach. Courts will examine the clause and the surrounding circumstances to determine whether the actual breach falls within or outside what the parties had in mind.
Proving damages under the law rather than the stipulation
When Article 2228 applies and the stipulation is displaced, the aggrieved party must establish actual damages under the general rules. This means proving loss — which is more demanding than pointing to an agreed penalty figure. The advantage of liquidated damages clauses is that they avoid the burden of proof on quantum; when Article 2228 removes that advantage, the injured party returns to the ordinary rules. Reviewing how your penalty clause was worded and what breach actually occurred is therefore important before deciding how to proceed.