delivered the opinion of the court.
The Bank of Porto Bico, in liquidation, brought suit by its attorney against Carlos Ereño and José A. Canals in the District Court of San Juan, Section 1, to recover from them in solidum the sum of $500 as the balance due on a written obligation for $650 which they had executed in its favor. By the said obligation, which was transcribed in the complaint, they agreed also to pay interest in case of default, together with the costs and disbursements arising in the action to recover, including the fees of the attorney employed by the bank.
Among other things, it is alleged in the complaint “that the court should fix the amount of the attorney’s fees in case of trial and judgment for the plaintiff, and in case of entry of judgment by default the plaintiff fixed the same at $75 and a like amount for appeal.” . The summons served on the defendants contained the warning that if they should fail to appear and answer the complaint, the plaintiff would take judgment for the amount claimed, together with interest, costs, and disbursements and $75 for the fees of plaintiff’s attorney in the lower court and a like'amount for appeal.
No answer to the complaint having been filed, the secretary of the court entered judgment by default against the defendants, but did hot include therein a requirement for the payment , of attorney fees. The plaintiff appealed on the *388sole ground that the judgment should exact also the payment of attorney fees.
•The Act of March 12,1908, provides that in all cases where costs have been allowed to one paxtj in an action or proceeding, if the subject-matter exceeds $500, said party .shall be entitled to receive from the defeated party the amount of fees due the former’s attorney for his services, which fees and costs shall be allowed in the discretion of the court after considering the degree of blame, if any, of the party against whom judgment is rendered, provided that such attorney fees shall not be included in the costs when the defendant has not entered appearance in the action or proceeding.
The allowance of attorney fees in these cases arises from a statutory provision, but as contracts are the supreme law between the parties when their stipulations are not incompatible with law, morality or public order, we áre of the opin-ión' that if the parties agreed to pay the attorney fees'in the event of action to recover, they should live up to their contract. The validity of an agreement to pay the fees of an attorney when his services are necessary to enforce ah obligation in the courts is so clear that the act itself has provided therefor in certain cases..
In order that the said agreement may be enforced by a judgment entered by the secretary without the necessity of a trial, the amount' claimed must be fixed by agreement between the parties either by specifying the amount to be paid as such fees or by some other way by which it is ascertainable by Simple calculation, as, for instance, a certain percentage -of the amount- claimed; but when this is not done the court must determine the amount of the fees to be paid; for, the claim being unliquidated, the default admits plaintiff’s right to recover, but not the amount to which he is entitled. 23 Cyc., 753. The obligation to pay fees when the amount has not. been determined .is enforceable only as to such fees as are reasonable. 20 Ann. App. Cases, 1730-1734.
*389The fact that the amount is arbitrarily fixed by the plaintiff in the complaint and that the said amount appears in the summons is not sufficient to convert an unliquidated amount into a liquidated amount nor to 'deprive the court of its discretional power to determine what amount should be paid as a reasonable attorney’s fee.
For the foregoing reasons the judgment entered by the secretary of the lower court should be
Affirmed.
Justices Wolf, del Toro and Hutchison concurred. Mr. Chief Justice Hernández took no part in the decision of this case.