You will need to register for tax in Spain with the Agencia Tributaria, the Spanish tax authority, whether you are a resident or non-resident. You will need your Foreigner’s Identity Card (NIE) number, which you can get through the local Foreigner’s Office (Oficina de Extranjeros) or police station within 30 days of arrival in Spain. You use Modelo 30 to register your obligation to pay tax as a resident or non-resident for the first time, or to change your details.