
54 Cal.2d 67 (1960)
GEORGE S. ALLEN, Appellant,
v.
MERCHANTS ELECTRIC COMPANY, INC., et al., Respondents.
L. A. No. 25771. 
Supreme Court of California. In Bank.  
May 4, 1960.
 Jerrell Babb and Louise A. Steele for Appellant.
 Gralla & Gralla, Isador Gralla and Henry O. Wackerbarth for Respondents.
 GIBSON, C. J.
 This is an appeal from an order discharging a writ of attachment in a suit against a resident of this state. The availability of the remedy is limited by statute to certain classes of action, and the sole question presented on this appeal is whether this action is "upon a contract, express or implied, for the direct payment of money" as required by subdivision 1 of section 537 of the Code of Civil Procedure.
 The complaint is in four counts, which allege:
 1. That by a written contract of July 23, 1957, a copy of which is made part of the complaint by reference, defendants agreed for a price of $3,145, payable on completion of the job, to furnish and install certain electrical equipment in a hotel owned by plaintiff and that they failed to perform parts of the agreement, causing plaintiff damage in the sum of $7,344, the reasonable value of the work not performed, and in an unascertained amount for injury to his business.
 2. That by a written contract of August 14, 1957, a copy of which is made part of the complaint by reference, defendants agreed to furnish and install additional electrical equipment for $2,553.68, payable on completion of the job, and that stated deficiencies in their performance caused plaintiff damage in the sum of $13,719, the reasonable value of the deficiencies, and in an unascertained amount for injury to his business.
 3. That on or about November 6, 1957, the parties entered into a written contract, a copy of which is attached to the complaint and made a part thereof by reference, whereby defendants agreed, in consideration of the payment of $1,500 by plaintiff to defendants, to do any work and to furnish any parts and materials required by plaintiff, the Electrical Division of the City of Los Angeles, the Department of Water and Power of the City of Los Angeles, and certain named companies, necessary to complete all items set forth in the contracts of July 23, 1957, and August 14, 1957; that defendants failed and refused to perform their agreement or return the sum of $1,500 or any part thereof. The writing incorporated by reference is a letter from defendants to plaintiff which acknowledges the receipt of $4,300 on account of the two contracts dated July 23 and August 14, and states that defendants have submitted to plaintiff a statement for $303.84 *69 for work not covered by those contracts. Defendants state in the letter that they will complete the two contracts and the additional work if plaintiff will pay them $1,500 "now" and $202.52 on completion of the work. (The sums of $4,300, $1,500 and $202.52 total $6,002.52, the amount of the contract prices of $3,145 and $2,553.68, plus $303.84 for extra work.)
 4. That under an oral contract of October 1, 1957, defendants installed certain light fixtures in the hotel but failed and refused to obtain a permit for the installation as required by ordinance; that plaintiff, who had made full payment under the contract, was damaged in the sum of $3,222, the reasonable cost of obtaining the permit with the help of other electrical contractors.
 The amounts of damages specified in the four counts of the complaint total $25,785.plaintiff filed an affidavit for attachment stating that defendants were indebted to him in the sum of $25,758 upon a "contract for the direct payment of money, to wit: breach of contract" and the writ of attachment issued for that sum.  [fn. 1] A motion of defendants to discharge the attachment was granted.
 [1] Counts one, two and four of the complaint state causes of action for damages for breach of express contractual obligations to do things other than pay money, and nothing is alleged from which an obligation to pay money can be implied in fact. Although such an obligation has been implied in law, as a fiction, in situations where a common count would lie (e.g., McCall v. Superior Court, 1 Cal.2d 527 [36 P.2d 642, 95 A.L.R. 1019] [action for restitution of money after rescission for fraud]; Bennett v. Superior Court, 218 Cal. 153 [21 P.2d 946] [action for restitution of money after rescission for failure of consideration]), it is settled that, where damages are sought for breach of an express obligation to do something other than pay money, a common count does not lie and attachment is not authorized by subdivision 1 of section 537 (Willett & Burr v. Alpert, 181 Cal. 652, 658-662 [185 P. 976]; San Francisco Iron etc. Co. v. Abraham, 211 Cal. 552, 554 [296 P. 82]; Doud v. Jackson, 102 Cal.App. 213, 217 [283 P. 107]; Sturtevant v. K. Hovden Co., 60 Cal.App. 696, 699 [214 P. 244]; California Packing Corp. v. Kato, 45 Cal.App. 491, 492 [188 P. 57]; see Greenebaum v. Smith, 51 Cal.App. 692, 695 [197 P. 675]). *70
 The cases relied upon by plaintiff are not in point. In Force v. Hart, 205 Cal. 670, 672-673 [272 P. 583], the action was admittedly one upon a contract for the direct payment of money, as required by the statute, and the question was whether attachment would lie where the damages were unliquidated. In Hale Bros. v. Milliken, 142 Cal. 134, 139-140 [75 P. 653], the suit was against a nonresident, and in such a case the right of attachment in an action on a contract does not depend upon the existence of an obligation to pay money. (Code Civ. Proc.,  537, subd. 2.)  [fn. 2]
 [2] With respect to count three, plaintiff argues that it states a cause of action for the restitution of money paid on a contract the consideration for which has entirely failed and that, therefore, the attachment was proper for the amount of $1,500 claimed in that count. It appears from the pleadings, however, that this amount was paid as part of the price for the work and equipment furnished under the contracts referred to in counts one and two, the benefits of which were retained by plaintiff. Even if we assume that plaintiff could properly have attached for the sum claimed in count three, it does not follow that the court erred in discharging the writ. It has been held that if the amount of the indebtedness stated in the attachment affidavit is much larger than the amount for which the remedy would lie and the writ is issued for the greater sum, the attachment must be discharged. (Doud v. Jackson, 102 Cal.App. 213, 220-221 [283 P. 107]; Ralph v. Bruns, 22 Cal.App. 153, 155 [133 P. 997]; see Kennedy v. California Sav. Bank, 97 Cal. 93, 98-99 [31 P. 846, 33 Am.St.Rep. 163].) Here plaintiff sought and obtained an attachment for $25,758, and the demand in count three was for only $1,500.
 The order discharging the attachment is affirmed.
 Traynor, J., Schauer, J., McComb, J., Peters, J., White, J., and Dooling, J. pro tem.,  [fn. *] concurred.
NOTES
[fn. 1]  1. The difference between the amount of damages alleged in the complaint and the indebtedness stated in the affidavit is probably the result of a typographical error.
[fn. 2]  2. Subdivision 2 of section 537 permits attachment "In an action upon a contract, express or implied, against a defendant not residing in this State, or who has departed from the State, or who cannot after due diligence be found within the State, or who conceals himself to avoid service of summons. ..."
[fn. *]  *. Assigned by Chairman of Judicial Council.
