Not tax advice. Computation tools only. Have a professional check your work before filing.
openaccountants/skills/spain-einvoice.md

Use this skill with your AI agent

View on GitHub

Paste this skill into your AI agent's context, or save the file to your project. Works with any AI agent that reads markdown.

spain-einvoice.md359 lines16.8 KB
v10Spain
Not yet verified by an accountantContact accountant
1---
2name: spain-einvoice
3description: >
4 Use this skill whenever asked about Spanish e-invoicing, factura electrónica Spain, FACe, Facturae, Veri*factu, VERI*FACTU, SII (Suministro Inmediato de Información), AEAT e-invoicing, B2B e-invoicing mandate Spain, RD 1007/2023, RD 238/2026, Ley Crea y Crece, QR tributario, anti-fraud invoicing software, SPFE (Solución Pública de Facturación Electrónica), or any question about issuing, receiving, validating, or archiving electronic invoices in Spain. Also trigger when configuring Veri*factu-compliant billing software, setting up SII real-time reporting, submitting B2G invoices via FACe, or advising on the transition from SII to Veri*factu. This skill covers FACe B2G, SII reporting, Veri*factu anti-fraud system, B2B mandate timeline, accepted formats (Facturae, UBL, CII), mandatory fields, validation rules, archiving, penalties, and interaction with Spanish VAT returns. ALWAYS read this skill before touching any Spanish e-invoicing work.
5version: 1.0
6jurisdiction: ES
7category: invoicing
8depends_on:
9 - einvoice-workflow-base
10---
11 
12# Spain E-Invoicing -- FACe / SII / Veri*factu Skill v1.0
13 
14---
15 
16## Section 1 -- Quick Reference
17 
18| Field | Value |
19|---|---|
20| Country | Spain (Reino de España) |
21| Currency | EUR |
22| B2G platform | FACe (Punto General de Entrada de Facturas Electrónicas) |
23| B2G format | Facturae 3.2.x (XML) |
24| Real-time reporting | SII (Suministro Inmediato de Información) -- since 2017 |
25| Anti-fraud system | Veri\*factu (RD 1007/2023 -- RRSIF) |
26| B2B e-invoicing system | SPFE (Solución Pública de Facturación Electrónica) + private platforms |
27| Governing body | Agencia Estatal de Administración Tributaria (AEAT) |
28| Key legislation | Ley 25/2013 (B2G); Ley 18/2022 (Ley Crea y Crece, B2B); RD 1007/2023 (RRSIF/Veri\*factu); RD 238/2026 (B2B technical rules) |
29| FACe URL | https://face.gob.es |
30| AEAT Veri\*factu | https://www.agenciatributaria.gob.es (sede electrónica) |
31| B2G mandatory since | 15 January 2015 |
32| SII mandatory since | 1 July 2017 (large taxpayers, monthly filers) |
33| Veri\*factu effective | 1 January 2027 (companies); 1 July 2027 (self-employed) |
34| B2B e-invoicing Phase 1 | 1 October 2027 (turnover > EUR 8M) |
35| B2B e-invoicing Phase 2 | 1 October 2028 (all businesses) |
36| Current status | B2G and SII fully operational; Veri\*factu services in production (voluntary since April 2025); B2B mandate pending ministerial order |
37| Skill version | 1.0 |
38 
39---
40 
41## Section 2 -- Mandate Scope
42 
43### Three Parallel Systems
44 
45Spain operates three distinct but overlapping e-invoicing/reporting systems:
46 
471. **FACe (B2G)**: Mandatory electronic invoicing to public administrations since 2015
482. **SII (Real-Time Reporting)**: Near real-time VAT ledger reporting to AEAT for large taxpayers since 2017
493. **Veri\*factu + B2B E-Invoicing**: Anti-fraud certified invoicing software and mandatory B2B structured invoice exchange (phasing in 2026--2028)
50 
51### Who Must Comply
52 
53| System | Who | Since/From |
54|---|---|---|
55| FACe (B2G) | All suppliers to Spanish public entities | 15 January 2015 |
56| SII | Companies with annual turnover > EUR 6M, monthly VAT filers, REDEME members, large corporate groups | 1 July 2017 |
57| Veri\*factu (RRSIF) | Corporate income tax payers (Impuesto sobre Sociedades) | 1 January 2027 |
58| Veri\*factu (RRSIF) | Self-employed (IRPF economic activities) and other obligados tributarios | 1 July 2027 |
59| B2B e-invoicing | Businesses with turnover > EUR 8M | 1 October 2027 |
60| B2B e-invoicing | All remaining businesses and professionals | 1 October 2028 |
61 
62### Veri\*factu vs Non-Veri\*factu
63 
64Under RD 1007/2023 (RRSIF), all invoicing software must be certified in one of two modes:
65 
66| Mode | Description |
67|---|---|
68| Veri\*factu | Real-time online transmission of invoice records (registros de facturación) to AEAT; includes QR tributario on every invoice; automatic chain integrity via hash linking |
69| Non-Veri\*factu | Offline storage of invoice records with strict integrity, inalterability, traceability, and completeness guarantees; no real-time transmission but audit-ready on demand |
70 
71SII participants may continue using SII instead of Veri\*factu, but their software must still comply with RRSIF technical requirements.
72 
73### B2B E-Invoicing (RD 238/2026)
74 
75| Requirement | Detail |
76|---|---|
77| Structured format | EN 16931-based: CII, UBL, Facturae, or EDIFACT |
78| Exchange channel | SPFE (public solution, free) or certified private platforms |
79| Invoice lifecycle | Must report: acceptance/rejection, full payment date/amount |
80| Payment reporting | Recipients must report payment within 4 calendar days (excluding weekends/holidays) |
81| Interoperability | Private platforms must support all accepted formats and transform between them |
82 
83---
84 
85## Section 3 -- Technical Format
86 
87### B2G: Facturae Format
88 
89| Parameter | Value |
90|---|---|
91| Format | Facturae 3.2.2 (XML) |
92| Schema | Defined by Spanish Ministry of Finance |
93| Namespace | `http://www.facturae.gob.es/formato/Versiones/Facturaev3_2_2.xml` |
94| Digital signature | XAdES-EPES mandatory (enveloped XML signature) |
95| Certificate | Qualified electronic certificate issued by a recognised Spanish CA |
96 
97### B2B: Accepted Formats (RD 238/2026)
98 
99| Format | Standard | Notes |
100|---|---|---|
101| UBL 2.1 | EN 16931 semantic model | With adaptations for Spanish requirements |
102| CII | EN 16931 (UN/CEFACT Cross-Industry Invoice) | Interoperable with other EU systems |
103| Facturae | Spanish national format | Widely used domestically, accepted for B2B |
104| EDIFACT | UN/EDIFACT | Legacy format, accepted for interoperability |
105 
106Private platforms must transform invoices between all accepted formats while preserving data integrity and origin.
107 
108### Veri\*factu Invoice Records
109 
110| Field | Description |
111|---|---|
112| NIF emisor | Seller tax ID (NIF) |
113| Número factura | Invoice number |
114| Fecha expedición | Issue date |
115| Tipo factura | Invoice type (F1 standard, F2 simplified, R1--R5 credit notes) |
116| Descripción operación | Transaction description |
117| Base imponible | Taxable amount per rate |
118| Tipo impositivo | Tax rate |
119| Cuota | Tax amount |
120| Huella (hash) | SHA-256 hash of the invoice record, chained to previous record |
121| QR tributario | QR code containing verification URL for AEAT check |
122 
123---
124 
125## Section 4 -- Mandatory Fields
126 
127### FACe (B2G) Mandatory Fields
128 
129| Facturae XML Path | Field | Required |
130|---|---|---|
131| `FileHeader/SchemaVersion` | Schema version (3.2.2) | Yes |
132| `FileHeader/Modality` | Individual or batch | Yes |
133| `Parties/SellerParty/TaxIdentification` | Seller NIF and name | Yes |
134| `Parties/BuyerParty/TaxIdentification` | Buyer CIF and name | Yes |
135| `Parties/BuyerParty/AdministrativeCentres` | Órgano Gestor, Unidad Tramitadora, Oficina Contable codes | Yes |
136| `Invoices/Invoice/InvoiceHeader/InvoiceNumber` | Invoice number | Yes |
137| `Invoices/Invoice/InvoiceHeader/InvoiceDocumentType` | Document type (FC, FA, AF) | Yes |
138| `Invoices/Invoice/InvoiceIssueData/IssueDate` | Issue date | Yes |
139| `Invoices/Invoice/InvoiceIssueData/TaxCurrencyCode` | Currency | Yes |
140| `Invoices/Invoice/TaxesOutputs/Tax/TaxTypeCode` | Tax type (01 = IVA) | Yes |
141| `Invoices/Invoice/TaxesOutputs/Tax/TaxRate` | Tax rate | Yes |
142| `Invoices/Invoice/TaxesOutputs/Tax/TaxableBase/TotalAmount` | Taxable base | Yes |
143| `Invoices/Invoice/TaxesOutputs/Tax/TaxAmount/TotalAmount` | Tax amount | Yes |
144| `Invoices/Invoice/InvoiceTotals/TotalGrossAmount` | Gross total | Yes |
145| `Invoices/Invoice/InvoiceTotals/TotalExecutableAmount` | Amount to pay | Yes |
146| `Invoices/Invoice/PaymentDetails` | Payment terms | Yes |
147 
148### B2B EN 16931 Mandatory Fields (Spanish CIUS)
149 
150In addition to EN 16931 core requirements:
151 
152| Field | Description | Required |
153|---|---|---|
154| Seller NIF | Spanish tax identification number | Yes |
155| Buyer NIF | Recipient tax identification number | Yes |
156| Invoice type | Must map to Spanish invoice types (F1, F2, etc.) | Yes |
157| Tax breakdown | Separate lines per IVA rate + IRPF withholding if applicable | Yes |
158| IRPF retention | Professional withholding (retención) details if applicable | Conditional |
159 
160---
161 
162## Section 5 -- Transmission Method
163 
164### FACe (B2G)
165 
166| Method | Description |
167|---|---|
168| FACe Web Portal | Upload via https://face.gob.es |
169| FACe Web Services | SOAP-based automated submission |
170| Peppol | Under development for interoperability |
171 
172FACe requires three administrative centre codes for routing: Órgano Gestor, Unidad Tramitadora, and Oficina Contable. These are obtained from the contracting public entity.
173 
174### SII (Real-Time Reporting)
175 
176| Parameter | Detail |
177|---|---|
178| Endpoint | AEAT sede electrónica web services |
179| Protocol | SOAP with mutual TLS (client certificate required) |
180| Submission deadline | 4 calendar days from invoice date (8 days during 2017 transitional period) |
181| Content | Summary invoice data (not full XML invoice) -- libro registro de facturas emitidas/recibidas |
182| Certificate | Qualified electronic certificate |
183 
184### B2B E-Invoicing (SPFE + Private Platforms)
185 
186| Method | Description |
187|---|---|
188| SPFE (Public Solution) | Free public platform operated by AEAT; acts as universal repository |
189| Certified private platforms | Must be authorised, interoperable, and connected to SPFE |
190| Platform interoperability | All platforms must exchange invoices in any accepted format |
191| Invoice statuses | Must report acceptance/rejection and payment status to SPFE within 4 calendar days |
192 
193### Veri\*factu Transmission
194 
195| Parameter | Detail |
196|---|---|
197| Endpoint | AEAT sede electrónica (production since April 2025) |
198| Protocol | REST API with certificate authentication |
199| Submission | Real-time, automatic, consecutive transmission of invoice records |
200| QR verification | Third parties can scan QR to verify invoice with AEAT |
201| Offline fallback | If connectivity fails, records queue with automatic retry |
202 
203---
204 
205## Section 6 -- Validation Rules
206 
207### FACe Pre-Checks
208 
209| Check | Description |
210|---|---|
211| Schema validation | XML against Facturae 3.2.2 XSD |
212| Digital signature | XAdES-EPES signature must be valid and from recognised CA |
213| Administrative centre codes | Must match FACe directory entries |
214| NIF validation | Seller and buyer tax IDs verified |
215| Duplicate detection | Same seller NIF + invoice number + issue date = duplicate |
216 
217### SII Validation
218 
219| Check | Description |
220|---|---|
221| Submission deadline | Must be within 4 calendar days of invoice/registration date |
222| NIF validation | Counterparty NIFs verified against census |
223| Amount consistency | Tax base × rate must equal reported tax amount |
224| Invoice type codes | Must use valid tipo factura codes (F1--F6, R1--R5) |
225 
226### Veri\*factu Validation
227 
228| Check | Description |
229|---|---|
230| Hash chain integrity | SHA-256 hash must reference previous record correctly |
231| QR code validity | QR must encode correct AEAT verification URL with invoice reference |
232| Sequential numbering | Invoice records must be consecutive without gaps |
233| NIF format | Must conform to Spanish NIF/CIF format rules |
234| Tax calculations | Base × rate = amount, rounded correctly |
235 
236### Common Rejection Reasons
237 
238| Issue | Resolution |
239|---|---|
240| Invalid or expired certificate | Renew qualified electronic certificate |
241| Wrong administrative centre codes | Verify codes with the contracting public entity |
242| Missing XAdES signature (B2G) | All FACe invoices must be digitally signed |
243| Hash chain break (Veri\*factu) | Regenerate chain from last valid record |
244| SII late submission | File within 4 days; late submissions incur penalties |
245 
246---
247 
248## Section 7 -- Tax Computation Rules
249 
250### IVA Rates (2025/2026)
251 
252| Rate | Application |
253|---|---|
254| 21% | Standard rate (tipo general) |
255| 10% | Reduced rate (tipo reducido) -- food, water, hospitality, transport |
256| 4% | Super-reduced rate (tipo superreducido) -- bread, milk, medicines, books |
257| 0% | Temporarily applied to essential food items (extended through 2025) |
258 
259### IRPF Withholding (Retención)
260 
261Professional service invoices may include IRPF withholding:
262 
263| Scenario | Rate |
264|---|---|
265| Standard professional withholding | 15% |
266| New professional (first 3 years) | 7% |
267 
268The invoice must show gross amount, IVA, IRPF retention, and net payable separately.
269 
270### Rounding
271 
272- Tax per line: `base imponible × tipo impositivo / 100`, rounded to 2 decimal places
273- Standard arithmetic rounding
274- Invoice total = sum of taxable bases + sum of IVA amounts − sum of retenciones
275- SII and Veri\*factu validate that reported amounts are arithmetically consistent
276 
277### Multi-Rate Invoice Handling
278 
279- Each IVA rate must appear as a separate `TaxesOutputs/Tax` block (Facturae) or BG-23 group (EN 16931)
280- Exempt operations require the applicable exemption cause (e.g., Art. 20 LIVA)
281- Reverse charge (inversión del sujeto pasivo) requires explicit mention and IVA = 0%
282 
283### Equivalence Surcharge (Recargo de Equivalencia)
284 
285For retail businesses under the equivalence surcharge regime:
286 
287| IVA Rate | Surcharge |
288|---|---|
289| 21% | 5.2% |
290| 10% | 1.4% |
291| 4% | 0.5% |
292 
293The surcharge must appear as a separate line in the invoice.
294 
295---
296 
297## Section 8 -- Archiving Requirements
298 
299| Requirement | Detail |
300|---|---|
301| Tax retention | 4 years (Art. 66 Ley General Tributaria) |
302| Commercial retention | 6 years (Art. 30 Código de Comercio) |
303| Fixed assets | 9 years (extended retention for capital goods IVA adjustments) |
304| Format | Original electronic format with integrity and authenticity preserved |
305| Digital signature | Archived invoices must retain valid digital signatures or equivalent integrity mechanisms |
306| Veri\*factu records | Invoice records (registros de facturación) must be stored immutably with hash chain intact for the full prescription period |
307| SPFE archive | The public e-invoicing solution acts as a legal repository for B2B invoices |
308| Audit access | Tax authorities may request full access during inspections |
309 
310---
311 
312## Section 9 -- Penalties for Non-Compliance
313 
314| Violation | Penalty |
315|---|---|
316| Failure to issue/provide B2B e-invoice (Ley 18/2022) | Up to EUR 10,000 per incident (6-month grace period after mandate start) |
317| Using non-certified invoicing software (Art. 201 bis LGT) | Up to EUR 50,000 per year for the user |
318| Developing/selling non-compliant software | Up to EUR 150,000 per year for the vendor |
319| SII late submission | 0.5% of invoice amount per late/incorrect record (min EUR 300, max EUR 6,000 per quarter) |
320| SII failure to report | EUR 150 per missing record (max EUR 6,000 per quarter) |
321| Failure to maintain archives / tampering | EUR 150 per missing or flawed invoice; higher for serious violations |
322| Tax fraud via invoice manipulation | Criminal penalties under Ley General Tributaria |
323| Failure to report payment status (B2B) | Subject to penalties under RD 238/2026 (specific amounts pending ministerial order) |
324 
325---
326 
327## Section 10 -- Interaction with Tax Skills
328 
329### VAT (IVA) Return Integration
330 
331- **SII participants**: Invoice data is reported in near real-time via SII, replacing quarterly Modelo 303 informational annexes. SII data pre-populates the annual Modelo 390 summary and feeds into compliance risk assessment.
332- **Veri\*factu participants**: Invoice records transmitted to AEAT provide a parallel real-time view of all transactions. AEAT can cross-reference Veri\*factu data with Modelo 303 declarations.
333- **B2B e-invoicing**: Invoice data flowing through SPFE will progressively feed into pre-filled VAT returns, similar to Italy's SDI model.
334 
335### Income Tax Integration
336 
337- Self-employed professionals (autónomos): Invoice data, including IRPF withholdings reported via SII/Veri\*factu, feeds into the annual Modelo 100 (IRPF return)
338- The Modelo 130 (quarterly IRPF prepayment) relies on accurate invoice records
339- Companies: Corporate income tax (Impuesto sobre Sociedades, Modelo 200) is reconciled against SII/Veri\*factu transaction records
340 
341### Withholding Tax Reporting
342 
343- IRPF retenciones reported on invoices must reconcile with Modelo 111 (quarterly withholding return) and Modelo 190 (annual summary)
344- Veri\*factu invoice records capture retention amounts, enabling automated cross-checks
345 
346### Intra-EU and Cross-Border
347 
348- Intra-EU supplies are reported via Modelo 349 (recapitulative statement)
349- SII captures intra-EU transaction details in the libro registro de facturas
350- Cross-border import VAT is managed through customs declarations (DUA) linked to invoice records
351 
352---
353 
354## Disclaimer
355 
356This skill and its outputs are provided for informational and computational purposes only and do not constitute tax, legal, or financial advice. Open Accountants and its contributors accept no liability for any errors, omissions, or outcomes arising from the use of this skill. All outputs must be reviewed and signed off by a qualified professional (such as an asesor fiscal, gestor administrativo, or equivalent licensed practitioner in your jurisdiction) before filing or acting upon.
357 
358The most up-to-date, verified version of this skill is maintained at [openaccountants.com](https://openaccountants.com). Log in to access the latest version, request a professional review from a licensed accountant, and track updates as tax law changes.
359 

Run this skill, then get an accountant to check it

After running the full skill pack in your AI agent, sign up and upload your worksheet. We'll connect you with a trusted accountant in our network who can review your numbers before you file.

Verification status

Research-verified

Drafted from authoritative sources (tax authority sites, Big-4 summaries). Awaiting credentialed sign-off.

Needs section-by-section practitioner review to reach accountant-verified.

Section review progress

0/32

About

Use this skill whenever asked about Spanish e-invoicing, factura electrónica Spain, FACe, Facturae, Veri*factu, VERI*FACTU, SII (Suministro Inmediato de Información), AEAT e-invoicing, B2B e-invoicing mandate Spain, RD 1007/2023, RD 238/2026, Ley Crea y Crece, QR tributario, anti-fraud invoicing software, SPFE (Solución Pública de Facturación Electrónica), or any question about issuing, receiving, validating, or archiving electronic invoices in Spain. Also trigger when configuring Veri*factu-compliant billing software, setting up SII real-time reporting, submitting B2G invoices via FACe, or advising on the transition from SII to Veri*factu. This skill covers FACe B2G, SII reporting, Veri*factu anti-fraud system, B2B mandate timeline, accepted formats (Facturae, UBL, CII), mandatory fields, validation rules, archiving, penalties, and interaction with Spanish VAT returns. ALWAYS read this skill before touching any Spanish e-invoicing work.

ESty-2025

Use this skill

This skill is open source and free to use in any AI agent. Copy it, download it, or clone the repo. If you find an error, report an issue — a licensed accountant will review.

15 of 20 in the ES workflow: