This  action  is  founded  upon  the  equitable  consideration  that  the  defend-
ant has  received  the  plaintiffs'  money  under  circumstances  rendering  it
unjust  and  inequitable  for  it  to  retain  it.  Wherever  that  is  shown  to  be
the  case  the  action  should  be  sustained  ;  but  where,  as  in  the  present  case,
the  money  received  by  the  defendant  was  not  the  property  of  the  plaintiff,
and  was  not  detained  against  equity  and  good  conscience,  neither  justice
nor  precedent  will  sustain  the  action  brought  for  its  recovery.  In  cases  of
this  description  it  has  long  been  held,  and  justly  so',  too,  that  the  defendant
''  may  claim  every  equitable  allowance ;  in  short,  he  may  defend  himself
by  everything  which  shows  that  the  plaintiff  ex  cequo  et  bono  is  not  entitled
to  the  whole  of  his  demand,  or  any  part  of  it."  Eddy  v.  Smith ;  *  Wright
t,  Butler ;  *  Buel  v.  Bough  ton.'

And  it  has,  therefore,  been  held  that  the  action  for  the  recovery  of
money  paid  by  mistake  should  not  be  so  far  extended  as  to  allow  it  to  be
maintained  where  it  will  deprive  the  defendant  of  a  right.  Eathbone  v.
Stocking ; '  Moyer  v.  Shoemaker  ; '  Barber  v,  Cttrj.^  And  this  qualifica-
tion of  the  general  rule  clearly  includes  the  present  case.
In  the  case  of  McDonald  v.  Todd,^^  the  action  was  brought  to  recover
money  received  by  the  defendant  upon  a  judgment  recovered  by  him  under
circumstances  quite  similar  to  those  presented  by  the  present  case ;  and  it
was  maintained  solely  upon  the  ground  that  the  defendants*  attorney  had
fraudulently  represented  the  lien  of  the  judgment  on  which  the  payment

1  1  Hill,  287,  294.  «  3  Cora.,  230,  237.  »  25  N.  Y.,  289.
