When a non-tax resident person or company sells a real estate property here in Spain, the law forces the purchaser to retain the amount of 3% of the total price. The purchaser then has to put within a month after completion, the said amount, into the tax office on behalf of the vendor. This 3% is NOT the capital gain tax liability of the vendor BUT A DEPOSIT of the capital gain tax liability of the vendor.
Therefore, with the 3% declared to the tax office by the purchaser, the liability of the vendor against the tax office is not finished yet. Once the payment is done by the purchaser, the vendor will have to make his tax return in order to calculate exactly the tax to be paid for his gain. Take into account that the vendor has to pay to the tax office the 19% of the net capital gain (the difference between the purchase price – plus expenses – and the sale price – minus expenses).
It use to be that the money retained in the deeds (the said 3% of the price) is not always enough to cover the total amount of the tax that the vendor needs to pay for his gain, so they need to pay the difference after taking out the amount of the 3%.
In case the capital gain tax is LESS than the 3% retained and declared by the purchaser, the vendor is entitled to claim back the difference. The vendor will have to make the tax return and, at the end taking into account the 3% retention, it will come to a figure in your favour and the tax office will have to pay you back the difference.
There is one important point when the vendor claims for the money back to the tax office, which is that the Tax office could investigate if the vendor has paid all his taxes during the time, he owned the property and, specially, the income tax for non-resident. If this tax was not paid, as many foreigners do not, as they know that there is not much control in those payments, the Tax office will claim for those taxes plus the interest before they give the vendor any money back.