Hi Tony C,
I think in general a lot will depend on who actually has your money and who it was originally paid to and what papers were signed at the time.
I work in the area you mention and generally in the papers that are signed for a new build reservation etc it would state that the deposit is returned to you when you sign the deeds. Of course, if you decide not to complete you will never sign the deeds. The builders see this as an option you have chosen.
Secondly, generally it will say that if you fail to make an agreed stage payment you will lose any monies already paid or maybe a percentage of the monies paid.
I have had a few clients over the years that have returned to England then given me their deposit. I have always had to pay this on to the builder otherwise the builder considers the property unreserved.
Im only speaking in general terms and different builders will do different things. Maybe you could post some of the Spanish text etc from your receipts so some advice could be given with the legality of the receipts.