Update 2024 on link below:
Update July 10 2021. The amount of 1000 euros maximum payments in cash is now law.
The total was 2.500, proposed the Consejo de Ministros early December 2016 to be lowered to 1.000 but that has never made it into law.
Definitions of cash transactions:
The restriction is only valid for transactions where at least one professional is involved. Includes the autonomo (self employed), a shop owner and up to large companies, the amounts are valid for the total of the price of the goods or services you pay for. This also means that a vehicle, household appliances you buy, or a builder´s invoice that is higher than the max amount of 2.500 euros cannot be paid for in instalments that are lower, the total amount of the invoice counts. Nor can you pay your rent in cash (if over 2.500 euros) if you pay the rent to an agent or a bank, for example.
The same restriction is not applicable to transactions between two private individuals, nor is it applicable to transactions that tourists or non-residents make in Spain. The limit there is 15.000 euros for cash payments.
Note 1: The fines that the Tax Agency can issue are 25% of the amount that was paid in cash erroneously!
If either party involved in a cash transaction over the max. amount realise within 3 months that in fact they should have chosen another method of payment, they can alert Hacienda through a special form on their website without risk of being fined. You need to have a digital certificate installed on your computer or have applied for a Cl@ve Pin for access. Info on how to do both in the Library, Taxation and Certificates sections.
Info from the Agencia Tributaria website
Note 2: Be aware that Hacienda will only accept proof of legal payments where you want to deduct costs on your RENTA declaration. So any invoices, if paid in cash ´erroneously´ instead of accompanied by proof of legal payment, like a bank transfer, will not be accepted.