Short answer. Possibly. Article 1414 offers a way out for someone who repents in time. If you paid for an illegal purpose but repudiated the deal before it was accomplished and before anyone was harmed, the court may — if the public interest is served — allow you to recover what you gave.

What the law says

the contract may be repudiated by one of the parties before the purpose has been accomplished, or before any damage has been caused to a third person. In such case, the courts may, if the public interest will thus be subserved, allow the party repudiating the contract to recover the money or property.

Civil Code, Article 1414 — Repudiation Before the Illegal Purpose. Read the full provision →

A reward for pulling back in time

The starting instinct of the law is unkind to those who deal in illegality: normally a person who pays into an unlawful arrangement cannot come to court to get his money back. Article 1414 carves out an exception for genuine repentance. Where money is paid or property delivered for an illegal purpose, the contract may be repudiated by one of the parties before the purpose has been accomplished, or before any damage has been caused to a third person. Backing out early is the whole point — the law would rather encourage a person to abandon an unlawful scheme than trap him in it by denying any chance of recovery.

The timing is everything

The window is narrow and it closes fast. You must repudiate before the illegal purpose has been carried out, and before any damage has been caused to a third person. Once the scheme has done its work, or once someone outside the deal has been harmed, the door shuts and the ordinary rule — no recovery for a party to an illegal contract — reasserts itself. So the article rewards the person who thinks better of it while there is still time to undo the harm, not the one who tries to recover only after the plan has run its course or gone wrong.

Recovery is discretionary, not automatic

Even a timely repudiation does not guarantee a refund. The article says the courts may, and only if the public interest will thus be subserved, allow recovery. This is a discretion exercised for the public good, not a right the repudiating party can simply demand. A court weighs whether returning the money actually serves the policy of discouraging illegal bargains. The provision is best understood as a door the law leaves ajar to encourage withdrawal from wrongdoing — not as a safe way to gamble on an illegal deal knowing you can always claw the money back.

What this does not cover

This relief is for illegal purposes that fall short of a criminal offense; where the act agreed upon is itself a crime, a different and stricter set of rules applies to what, if anything, can be recovered. The article also does not help the party who waited too long, nor does it excuse the illegality — it only addresses whether the money comes back. And it speaks to repudiation by one party before completion; it is not a general licence to unwind any regretted contract. Whether a particular arrangement fits its terms is a fact-specific question that needs individual assessment.

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.