An absolutely null contract, or a relatively null contract that has been declared null by the court, is deemed never to have existed. The parties must be restored to the situation that existed before the contract was made. If it is impossible or impracticable to make restoration in kind, it may be made through an award of damages.
Nevertheless, a performance rendered under a contract that is absolutely null because its object or its cause is illicit or immoral may not be recovered by a party who knew or should have known of the defect that makes the contract null. The performance may be recovered, however, when that party invokes the nullity to withdraw from the contract before its purpose is achieved and also in exceptional situations when, in the discretion of the court, that recovery would further the interest of justice.
Absolute nullity may be raised as a defense even by a party who, at the time the contract was made, knew or should have known of the defect that makes the contract null.
La. C.C. § 2033