
10 So.3d 1169 (2009)
LONESTAR ALTERNATIVE SOLUTION, INC., Appellant,
v.
LEVIEW-BOYMELGREEN SOLEIL DEVELOPERS, LLC., Appellee.
No. 3D08-2158.
District Court of Appeal of Florida, Third District.
May 27, 2009.
*1170 Herron Jacobs Ortiz, and Kevin P. Jacobs, Jose A. Ortiz, and Ryan C. Zagare; HomerBonner and Christopher J. King, Miami, for appellant.
Broad and Cassel and Mark F. Raymond and David B. Rosenberg, Miami; Beverly A. Pohl and Linda Spaulding White, Fort Lauderdale, for appellee.
Before RAMIREZ and SUAREZ, JJ., and SCHWARTZ, Senior Judge.
RAMIREZ, J.
Lonestar Alternative Solutions, Inc. appeals the trial court's order granting the Leview-Boymelgreen Soleil Developers, LLC's ("Soleil") motion to dismiss Lonestar's amended complaint with prejudice. We reverse the trial court's dismissal with prejudice because Lonestar's amended complaint stated a cause of action and thus dismissal was incorrect.
In 2005, Soleil hired Majestic Properties Miami as its exclusive listing agent to help sell units in a high-rise luxury condominium called "Soleil" at 3100 Biscayne Boulevard in Miami-Dade County, Florida. Soleil and Majestic entered into a Listing Agreement. Paragraph 6 of the Agreement set out Soleil's obligation to compensate Majestic for the sales of units, and stated as follows:
6. Compensation of Broker. Developer shall compensate Broker as specified in the event that any contract for the acquisition of any interest in the Property is properly executed during the Term by a buyer who is ready, willing and able to purchase a residential and/or commercial condominium unit within the Property,....
Under the same "Compensation of Broker" paragraph, the agreement also authorized Majestic to work with co-brokers:
Developer shall also pay the following commissions to any co-broker who is the procuring cause of a sale or lease of a residential and commercial or commercial unit:
....
(g) four percent (4.00%), or such higher percentage as Developer may approve on a case-by-case basis of the total contract price for each residential unit sold through the efforts of a co-broker.
The agreement further set out the schedule of payments for the required commissions and stated as follows:
Developer shall pay the commissions due Broker and Co-Broker as follows: one-third of each commission within fifteen (15) business days after the 15-day rescission period expires and receipt of the first ten-percent deposit ...; one-third of each commission within fifteen (15) days after receipt of the second ten percent deposit, if any; and the balance of each commission upon the occurrence of the closing or the Developer's default.
The Agreement also identified other non-exclusive events upon which broker's commissions "shall be due and payable," such as
[I]f Developer defaults on an executed purchase and sales agreement or permits a unit buyer to cancel an executed purchase and sale agreement after the expiration of the 15-day rescission period, if applicable.
Lonestar sold six units at Soleil in June 2005, and other co-brokers sold other units. Every buyer entered into a Purchase and Sale Agreement, which included the following statutorily mandated term:
THIS AGREEMENT IS VOIDABLE BY THE BUYER BY DELIVERYING WRITTEN NOTICE OF THE BUYER'S INTENTION TO CANCEL *1171 WITHIN 15 DAYS AFTER THE DATE OF EXECUTION OF THIS AGREEMENT BY THE BUYER.... THIS AGREEMENT IS ALSO VOIDABLE BY THE BUYER BY DELIVERING WRITTEN NOTICE OF THE BUYER'S INTENTION TO CANCEL WITHIN 15 DAYS AFTER THE DATE OF RECEIPT FROM THE DEVELOPER OF ANY AMENDMENT WHICH MATERIALLLY ALTERS OR MODIFIES THE OFFERING IN A MANNER THAT IS ADVERSE TO THE BUYER.
None of Lonestar's buyers cancelled within the first fifteen day period. Soleil paid Lonestar two commission installments on each of Lonestar's six sales.
However, in April 2007, Soleil sent buyers a letter stating that Soleil intended to make substantial changes to the project. Buyers could cancel their sale agreements, accept the changes or use their deposits for another Miami-Dade condominium that Soleil claimed to be building. All the buyers cancelled. Soleil then refused to pay the co-brokers the balance of the commissions due on the sales.
Lonestar filed a class action complaint in January 2008 on behalf of itself and other co-brokers. Lonestar amended the complaint. The amended complaint cites provisions from the Listing Agreement entitling co-brokers to four percent commissions upon "procuring ... a sale or lease" of the units and alleges the outstanding commissions owed to Lonestar. The class as defined in the amended complaint includes similarly situated co-brokers who also are owed the balance of their commissions.
The amended complaint contains one count for breach of contract. The amended complaint alleges that Soleil "breached the Listing Agreement by failing and refusing to pay remaining co-broker commissions due and owing to Lonestar and the Class Members," and Soleil's "unilateral decision to make materially adverse changes to the plans constituted a clear default under the Listing Agreement, causing all remaining co-broker commissions to be due and owing to Lonestar and the Class Members." Lonestar attached the Listing Agreement and the Purchase and Sale Agreements to the amended complaint.
Soleil moved to dismiss the amended complaint, under Florida Rule of Civil Procedure 1.140, on the basis that the amended complaint failed to state a cause of action. Soleil argued that the Agreement contained a condition precedent to the obligation to pay the last third of the commissions (i.e., a closing or a developer's default), and that since neither of those events had occurred, no further commissions were owed. Soleil argued that because it could allegedly make "material changes" under the Agreement, these changes did not constitute a default.
The trial court held a hearing at which Soleil conceded that Lonestar procured buyers who entered into sale agreements. The trial court agreed with Soleil that it had a contractual right to make material changes and that no further commissions were owed because no default had occurred. Thereafter, the trial court entered an order consistent with that oral ruling.
Lonestar now argues that the sole inquiry on a motion to dismiss is whether the plaintiff has stated a claim and that they have, in fact, stated numerous theories to support its breach of contract allegations. We agree.
A motion to dismiss under rule 1.140(b) tests whether the plaintiff has stated a cause of action, not whether the plaintiff will prevail at trial. Meadows Cmty. Ass'n v. Russell-Tutty, 928 So.2d *1172 1276, 1280 (Fla. 2d DCA 2006). With respect to a breach of contract claim, an action cannot be dismissed "unless it clearly appears as a matter of law that the contract cannot support the action alleged." Helms v. Gen. Film Dev. Corp., 346 So.2d 1064, 1065 (Fla. 3d DCA 1977). The trial court is bound by the four corners of the complaint and attachments, and all ambiguities and inferences drawn from "the recitals in the complaint, together with the exhibits attached," must be construed in the light most favorable to the plaintiff. Vienneau v. Metro. Life Ins. Co., 548 So.2d 856, 858 (Fla. 4th DCA 1989).
A review of the record here indicates that Lonestar's amended complaint alleged sufficient facts to support two ways Soleil breached its contractual obligations. First, Soleil failed to pay all "commissions due and owing" under the Listing Agreement, and second, Soleil defaulted under the Listing Agreement by making "materially adverse changes to the plans."
Soleil moved to dismiss first due to the alleged lack of a condition precedent that would trigger Soleil's obligation to pay (no closing took place), and second because Soleil allegedly could make "material changes" without defaulting. However, these are not arguments attacking the sufficiency of the allegationsthey are defenses. When deciding a motion to dismiss, a trial court may not consider affirmative defenses. Susan Fixel, Inc. v. Rosenthal & Rosenthal, 842 So.2d 204, 206 (Fla. 3d DCA 2003). This was sufficient to deny Soleil's motion to dismiss.
The amended complaint alleges that Lonestar was the procuring cause of the sale of six of the units, thus it earned and was entitled to its commission. Accordingly, because Lonestar stated a cause of action for breach of contract, dismissal with prejudice was improper at this stage. We thus reverse the trial court's dismissal with prejudice.
Reversed and remanded.
