E-invoicing in Spain: A Complete Guide for Businesses
What is Spain e-invoicing?
Spain operates a real-time invoice clearance model under the VERI*FACTU regime, introduced via Royal Decree 1007/2023 (published October 2023). The regulation targets software systems that generate invoices — any application producing commercial invoices in Spain must comply with the technical requirements of the Reglamento de facturación, which mandates that invoices be registered with AEAT (Agencia Tributaria) in real time or near-real time.
The obligation does not apply to the invoice recipient; it applies to the invoicing software itself. Software vendors and ERP providers must certify their systems as VERI*FACTU-compliant by 29 July 2025 for large businesses and companies under the Immediate Supply of Information (SII) regime, and by 1 January 2026 for all other taxpayers.
Separately, the Basque Country and Navarra operate the TicketBAI system, a regional equivalent with similar technical requirements but different submission endpoints.
The VeriFactu format
VERI*FACTU invoices are structured XML documents submitted directly to AEAT's web services. Key technical characteristics:
- Schema: AEAT-defined XSD schema (VeriFactu XML)
- Submission: real-time HTTPS POST to AEAT's
RegistroFacturacionendpoint - Invoice chaining: each invoice record contains a hash of the previous invoice, creating a tamper-evident chain
- Fields: NIF (tax ID) of both supplier and buyer, invoice series and number, issue datetime, tax breakdown per VAT rate, invoice total, hash chain fields
- QR code: invoices must carry a QR code linking to AEAT's invoice verification portal
- Rectification invoices: credit notes must reference the original invoice series and number with a
TipoRectificativacode
SII taxpayers (businesses with turnover > EUR 6M) already report invoice data within 4 days; VeriFactu extends this to all invoice-generating software.
Who does it apply to?
| Segment | Status |
|---|---|
| Businesses under SII regime (>EUR 6M turnover) | Mandatory from 29 Jul 2025 |
| All other businesses issuing invoices | Mandatory from 1 Jan 2026 |
| Basque Country / Navarra | TicketBAI (regional equivalent, already live) |
| Invoice recipients | No obligation |
The mandate is on the invoicing software, not the legal entity type. A small business using compliant software automatically satisfies the requirement.
Timeline / key dates
- Oct 2023: Royal Decree 1007/2023 published
- 29 Jul 2025: VeriFactu mandatory for SII businesses and invoicing software vendors
- 1 Jan 2026: VeriFactu mandatory for all remaining taxpayers issuing invoices
How Clearvo handles Spain e-invoicing
Clearvo handles the full VeriFactu submission lifecycle: generating the AEAT-compliant XML, computing the SHA-256 hash chain, signing the request with the required certificate, submitting to AEAT's RegistroFacturacion endpoint, and returning the AEAT acceptance response.
You send a single CustomerInvoiceInput JSON. Clearvo handles format generation, hash chain maintenance (we store the previous invoice hash per NIF/series), QR code generation, and retry logic for AEAT connectivity issues.
What you send: standard invoice fields plus supplierVatNumber (NIF), invoiceSeries, and buyerCountry: "ES".
What you get back: the AEAT CSV (Código Seguro de Verificación), the generated XML, and QR code data URI.
{
"invoiceNumber": "A-2025-00089",
"invoiceSeries": "A",
"issueDate": "2025-07-30",
"issueTime": "10:42:00",
"dueDate": "2025-08-29",
"currency": "EUR",
"supplier": {
"name": "Acme Software SL",
"vatNumber": "B87654321",
"address": {
"street": "Calle Gran Vía 28",
"city": "Madrid",
"postalCode": "28013",
"country": "ES"
}
},
"customer": {
"name": "Distribuidora Ibérica SA",
"vatNumber": "A12345678",
"address": {
"street": "Avinguda Diagonal 200",
"city": "Barcelona",
"postalCode": "08018",
"country": "ES"
}
},
"lines": [
{
"description": "Consultoría tecnológica — julio 2025",
"quantity": 10,
"unitPrice": 850.00,
"taxRate": 21,
"taxCategory": "S"
}
],
"paymentMethod": "transferencia"
}
Getting started
Full VeriFactu integration documentation, including certificate setup and the AEAT test environment endpoints, is at clearvo.io/docs. The Clearvo API handles AEAT sandbox and production environments via an environment parameter — no separate integration required for testing.
Related country guides
- France — Factur-X PDP model, mandate from September 2026
- Italy — FatturaPA SDI clearance, mandatory since 2019
- Portugal — Peppol BIS 3.0, SAFT-PT, B2G mandatory
Ready to handle e-invoicing in Spain?
One API, all 31 countries. Sign up and get your API key within 24 hours.
Get started free →