You can deduct the fees you pay for your union membership. These are entered as “Rendimientos del trabajo, casilla 014. Cuotas satisfechas a sindicatos” on your tax declaration according to the Spanish law “artículo 19.2 de la Ley de IRPF”.
You don’t need any certificate at all in order to get your tax return.
Doing this the Tax collection agency (Hacienda) will give you back a percentage of the union fees you have paid during the previous year.
In the next screenshot you can see what field you need to fill in with the total amount paid as membership fees: