Exchanges with custody
“Exchanges that are tax resident in Spain and hold their users’ private keys: RGAT Art. 39 bis requires them to report all balances at December 31.”
Legal advice on Form 172 (Modelo 172): the annual information return on virtual currency balances, who must file, the content of Annex I to Order HFP/887/2023, XML filing with the Spanish Tax Agency (AEAT / Hacienda), deadlines and penalties.
Free Form 172 consultation
We reply within 24 h
Six areas of legal support to help entities required to file Form 172 correctly meet their annual reporting obligations on virtual currency balances to the AEAT.
Legal assessment of whether your entity is required to file under RGAT Art. 39 bis: custody of private keys, exchanges, wallets and permanent establishments in Spain.
Internal procedures to capture, value and consolidate balances at December 31, with price sources, tax ID (NIF) logic and criteria for authorized persons and beneficiaries.
Support in generating the XML file in line with Annex I to Order HFP/887/2023 and filing it through the Tax Agency’s electronic office.
Analysis of the returns filed, error detection, regularization strategy and handling of supplementary returns before an audit.
Assistance with requests for information, proposed penalties and appeals for failure to file or incorrect filing of Form 172 (€200 per data item, 2% cap).
Design of your crypto reporting framework: Form 172 and 173 information obligations, interaction with Form 721 (individuals) and adaptation to DAC8 from 2026.
RGAT Art. 39 bis sets the scope: entities that provide services to safeguard private cryptographic keys on behalf of third parties. It is not the individuals who own the cryptocurrency who report, but the professional custodians.
“Exchanges that are tax resident in Spain and hold their users’ private keys: RGAT Art. 39 bis requires them to report all balances at December 31.”
“Companies that provide digital wallet services with custody of keys: the service may be their main business or ancillary to another activity; they are also required to file Form 172.”
“Foreign entities with a permanent establishment in Spain that carry out key custody activities: they are also required to file Form 172.”
“Individual holders do not file Form 172: they report gains and wealth through the ordinary channels (IRPF, wealth tax) and, where applicable, Form 721 if they hold more than €50,000 abroad.”
The AEAT has stepped up its scrutiny of the crypto sector: it cross-checks Form 172 data against holders’ personal income tax (IRPF) returns, detects inconsistencies and issues requests for information. For custodians, errors are costly; for their clients, they can trigger personal reviews.
A direct obligation under Art. 39 bis of the RGAT (Royal Decree 1065/2007) and Order HFP/887/2023: annual filing through the electronic office with balances at December 31.
Cross-checks with IRPF and Form 721: the AEAT compares the balances reported by the custodian with the information on holders; inconsistencies trigger personal reviews.
Stepped-up scrutiny in 2025–2026: the AEAT has announced specific reviews of Spanish platforms that hold cryptocurrency in custody and of individuals with digital assets.
A fine for each data item omitted or incorrect in Form 172, capped at 2% of the undeclared amount; errors in bulk reporting escalate very quickly.
From 2026, the DAC8 Directive strengthens the exchange of crypto tax information at EU level; Form 172 is aligned with this supranational framework.
Form 172 (balances) sits alongside Form 173 (transactions). Many entities must file both; ignoring one exposes you to additional penalties.
We help you determine whether you are required to file, design the filing process and file Form 172 in line with Annex I to Order HFP/887/2023, avoiding penalties for errors or omissions.
Form 172 is the “Information return on virtual currency balances”, approved by Order HFP/887/2023 of July 26, which implements the obligation set out in Art. 39 bis of the RGAT (Royal Decree 1065/2007).
Its purpose is to let the AEAT know the cryptocurrency balances that custodians hold on behalf of third parties at December 31 each year, to support its oversight of personal income tax (IRPF), corporate income tax, wealth tax and Form 721.
Under RGAT Art. 39 bis, the obligation applies to individuals and entities resident in Spain and to permanent establishments in Spain of non-resident individuals or entities that provide services to safeguard private cryptographic keys on behalf of third parties (custody, holding, storage and transfer of virtual currencies).
This includes exchanges with custody, custodial wallets and any entity that provides this service, whether as its main or an ancillary activity.
No. Form 172 is filed by custodian companies, not by the individuals who own the assets. Individuals report their cryptocurrency, where applicable, through the ordinary channels: IRPF (gains/losses), wealth tax and Form 721 when their digital assets abroad exceed €50,000.
This does not mean individuals are left out: through Form 172, the AEAT receives detailed information that it cross-checks against their returns.
Annex I to Order HFP/887/2023 requires: identification data (name, NIF tax ID and address) of the holder, authorized person or beneficiary; balances at December 31 in each different virtual currency; valuation in euros; the name and ticker of the virtual currency; and, where applicable, fiat currency balances held on behalf of third parties.
If the custodian stopped safeguarding those currencies before December 31, the information refers to the date it stopped.
Form 172 is filed in January each year and reports balances at December 31 of the previous year. Filing is electronic, in XML format, through the AEAT electronic office, with a digital certificate.
Annex I was replaced by Order HAC/1504/2024 of December 26, so you should always check the latest technical version in force.
Balances in virtual currencies are reported in units of the relevant cryptocurrency and, in euros, by reference to cryptocurrency rating websites such as CoinMarketCap, using the name and ticker shown there.
For balances in fiat currency other than the euro held on behalf of third parties, the exchange rate in force at December 31 (or at the date custody ended) is applied, and the rate used is stated expressly.
Non-compliance with Form 172 (failure to file, late filing, omitted or incorrect data) is penalized as a tax offense: €200 for each data item omitted or incorrect, with a cap of 2% of the undeclared amount.
In practice, errors in bulk returns escalate quickly, so data quality and the traceability of valuations are critical.
Form 172 fits into a wider European framework: the DAC8 Directive, applicable from 2026, introduces the automatic exchange of tax information on crypto-assets between EU tax authorities, in line with the OECD CARF standard.
The combination of Form 172 (balances), Form 173 (transactions) and DAC8 creates a very demanding crypto reporting framework for service providers.
Form 172 cannot be improvised in January. It requires designing, throughout the year, the processes for data capture, tax IDs (NIF), valuation and balance consolidation, with enough traceability to withstand an AEAT request for information.
Law 11/2021 (anti-fraud measures), Additional Provision 13(6) of Law 35/2006 on Personal Income Tax (IRPF), RGAT Art. 39 bis (Royal Decree 1065/2007), Order HFP/887/2023 and the replacement of Annex I by Order HAC/1504/2024.
January each year, balances at December 31 of the previous year, electronic XML filing through the AEAT electronic office, with a digital certificate and strict compliance with the Annex I record layouts.
Correct tax IDs (NIF), valuations with a documented source, consistent treatment of stablecoins (USDT, USDC) and euro stablecoins (including MiCA EMTs), and change logs to trace errors and regularize.
If you hold EMTs under MiCA in custody or serve clients with exposure to jurisdictions on the FATF list, Form 172 must be coordinated with your AML/CFT program. For pilot projects, it is advisable to rely on the financial sandbox, and for entities with regulated vehicles (SGIIC) or independent directors of investment firms (ESI), crypto reporting should be built into overall governance.
Filing Form 172 is a technical and legal exercise: it requires aligning KYC, the accounting snapshot at December 31, valuation policies and XML validation before you click “submit”. This is the operational dashboard we work through with our clients.
1) KYCName/company name, tax ID (NIF) and address of the holder, authorized person or beneficiary, with verification and update processes aligned with client KYC onboarding.
2) SnapshotAutomated extraction of balances per client and per different virtual currency, with checks on custody ending before year-end and an auditable record.
3) ValuationDocumented pricing policy (CoinMarketCap or other), treatment of stablecoins and fiat currencies with the exchange rate in force at the reference date.
4) XML + AEAT e-officeBuilding the XML file in line with Annex I to Order HFP/887/2023 (as updated by Order HAC/1504/2024), technical validation and filing on the AEAT electronic office.
Quick decisionBalances at December 31. Custodians of private keys. RGAT Art. 39 bis. January, XML.
Transactions (purchase/sale/swap/transfer). RGAT Art. 39 ter.
Individuals with crypto abroad > €50,000. Order HFP/886/2023.
Determine whether the entity provides private key safeguarding services (RGAT Art. 39 bis).
Legal memorandum on whether the obligation applies, with a description of the service and its legal classification.
Full identification of holders, authorized persons and beneficiaries with up-to-date data.
KYC files, UBO evidence and documented periodic reviews.
Controlled extraction of closing balances, per client and per different virtual currency.
System logs, hashed scripts, evidence of replicability and reconciliation with the accounts.
Conversion to euros using a documented official source and consistent treatment of currencies.
Approved valuation policy, price files and the exchange rate used.
Generation of the XML file and electronic filing through the electronic office in January.
AEAT acknowledgment of receipt, version of the annex applied and a backup of the file filed.
Protocol for supplementary/substitute returns when errors are detected later.
Documented incidents, a remediation plan and internal reporting to management.
Indicators that suggest reviewing your filing process before an AEAT audit.
If you are dealing with Form 172, these terms appear in Order HFP/887/2023, in the AEAT’s FAQs and in audit procedures.
Return on virtual currency balances held in custody on behalf of third parties at December 31.
The provision of the General Regulation on Tax Management and Inspection Actions and Procedures (RGAT) on which Form 172 is based.
Amended the Personal Income Tax Law (Additional Provision 13(6)) to create the crypto information obligations, the legal origin of Forms 172, 173 and 721.
Defines the fields, formats and validation rules of the Form 172 XML. Replaced by Order HAC/1504/2024.
A digital representation of value not issued by a central bank, accepted as a means of exchange and capable of being transferred/stored electronically.
The service of holding, storing and transferring virtual currencies by safeguarding users’ private cryptographic keys.
Sister form to Form 172. Reports acquisitions, disposals, swaps, transfers, collections and payments in virtual currencies.
Information return for individuals with cryptocurrency held abroad above €50,000.
An EU directive that, from 2026, establishes the automatic exchange of tax information on crypto-assets between Member States.
Tell us about your Form 172 situation and we will explain how to organize your crypto reporting so the next filing cycle goes smoothly.
Form 172 is the centerpiece of Spain’s tax information system for cryptocurrency. It stems from Law 11/2021 of July 9 on measures to prevent and combat tax fraud, which added new information obligations on holding and transacting in virtual currencies to Additional Provision 13 of the Personal Income Tax (IRPF) Law.
The General Regulation on Tax Management and Inspection Actions and Procedures (RGAT, Royal Decree 1065/2007) added a new Article 39 bis, which requires individuals and entities resident in Spain and permanent establishments in Spain of non-resident entities that provide private cryptographic key safeguarding services (custody, holding, storage and transfer) to report annually the balances they hold on behalf of third parties.
Order HFP/887/2023 approved Form 172, the “Information return on virtual currency balances”, and its sister form, Form 173 (transactions), setting the procedure and format. The technical content of Annex I was replaced by Order HAC/1504/2024 of December 26, so the applicable version should be checked before each cycle.
For each holder, authorized person or beneficiary, Annex I requires reporting: identification data (name/company name, NIF and address); balances at December 31 in each different virtual currency; the name and ticker as used on reference websites such as CoinMarketCap; the valuation in euros; and fiat currency balances held on behalf of third parties, with the exchange rate applied.
Form 172 is filed during January each year, with information on balances at December 31 of the previous tax year. Filing is electronic, in XML format, through the Tax Agency’s electronic office, in line with the Annex I record layouts.
Non-compliance (failure to file, late filing, omitted or inaccurate data) is penalized under the general tax regime: €200 per data item omitted or incorrect, with a cap of 2% of the undeclared amount. In a bulk return, data quality is critical.
Form 172 cannot be understood in isolation. It sits alongside Form 173 (transactions, RGAT Art. 39 ter), Form 721 (cryptocurrency held abroad, for individuals, Order HFP/886/2023) and, from 2026, the DAC8 Directive, which extends the automatic exchange of crypto tax information in the EU in line with the OECD CARF standard.