My place in the WordPress community
- I have had a wordpress.org account since 2006.
- I contributed to WordPress core for versions 7.0 and 7.1.
- I maintain 30 plugins on wordpress.org.
- I organise and speak at WordCamps.
- I have attended every WordCamp Europe from 2017 to 2026.
- Local WordPress meetup: WordPress Sevilla
Seville companies that issue many invoices to Spanish customers often learn about the SII from their accountant, not from the web team. The Suministro Inmediato de Informacion del IVA means that VAT invoice books are no longer kept and filed later: the records go to the Agencia Tributaria within days. I am Mariusz Szatkowski, and I build web applications from Gdynia. Tax advice is not my field. This page lays out what the AEAT and the Reglamento del IVA say, and what that means for a Next.js back office.

Torre del Oro and the Guadalquivir in Seville. Image by Ввласенко, CC BY 4.0, via Wikimedia Commons.
Who must use the SII in Spain?
The obligation sits in article 62.6 of the Real Decreto 1624/1992, the Reglamento del IVA, as published in the BOE. The VAT books must be kept through the AEAT electronic office by supplying the billing records electronically, for taxpayers whose settlement period is the calendar month under article 71.3. That article names the monthly filers:
- businesses whose volume of operations exceeded 6,010,121.04 euros in the previous calendar year
- taxpayers authorised to claim a refund each period (the REDEME register)
- businesses under the VAT group regime
- holders of fuel tax warehouses and those who extract fuel from them
The AEAT sede summarises the same list as large companies with turnover above 6 million euros, VAT groups, REDEME registrants and, from 1 January 2025, fuel warehouse holders. Everyone else may choose it. Article 62.6 allows any other taxpayer to keep the books through the electronic office, and the AEAT states that the option can be exercised at any time. It takes effect from the day after the settlement period in which it is exercised ends, and the taxpayer remains in the system for at least the calendar year covered by the option. The AEAT adds that participants do not have to file forms 347 and 390.
Whether your company falls into the mandatory group is a question for your gestor. The software question starts after that answer.
What are the SII deadlines?
Article 69 bis of the Reglamento sets the clock. Counted in calendar days, with Saturdays, Sundays and national holidays excluded from the count:
| Record | Deadline |
|---|---|
| Issued invoice | four days from issue; eight days when the recipient or a third party issues it |
| Received invoice | four days from the date of the accounting entry |
| Rectifying invoice, issued or received | four days from issue or accounting entry |
| Payment or collection under the cash accounting regime | four days from the payment or collection |
On top of the four days there is an outer limit. Issued invoices must be supplied before the 16th of the month following the accrual of the tax. Received invoices must be supplied before the 16th of the month following the settlement period in which they are included. For imports, the four days run from the accounting entry of the customs document.
The four days are the part that touches a web application. A monthly export from the accounting package no longer fits. The moment an invoice is issued or booked, something must queue a record.
How does the SII web service work?
The AEAT publishes a description of the web service (version 1.1, 356 pages, printed 1 February 2026) on the technical information page of the SII section. The parts that matter for an integration:
- Transport: HTTPS, SOAP 1.1 in document mode with literal encoding, and a WSDL per book. The XML messages are not signed.
- Authentication: the application authenticates with a recognised electronic client certificate. It can belong to a natural or a legal person. The submitter may be the taxpayer, an authorised representative or a social collaborator, and every tax number is validated against the AEAT central database.
- Batch size: one submission is a container of invoices, with a maximum of 10,000 invoices.
- Message type: all invoices in one message share the same communication type, either new records or modifications, never both. Cancellations travel in a separate message.
- Identity of an invoice: a group of fields identifies it uniquely: the issuer’s identification, the series and number (up to 60 characters) and the issue date. A later modification must carry the same identity.
- Response: format errors in the XML produce a SOAP fault. Otherwise the AEAT validates the business rules and answers per invoice with Correcto, AceptadoConErrores or Incorrecto, and for the whole submission with Correcto, ParcialmenteCorrecto or Incorrecto. A secure verification code (CSV) records the submission unless every invoice was rejected.
- Duplicates: a record rejected as a duplicate comes back with a block describing the record already on file.
The AEAT keeps an external test portal for trial submissions, linked from the technical page. Test there before any production certificate is configured.
How does a Next.js back office send the records?
A back office built with the App Router has a natural place for this: a server-only module behind a Route Handler or a Server Action. The Next.js documentation says Route Handlers are not cached by default, and that environment variables without the NEXT_PUBLIC_ prefix are available only on the server. Both matter, because the client certificate and its password must never reach the browser.
A minimal sketch of the transport layer, with the certificate read from the server environment:
// lib/aeat/transport.ts
import 'server-only'
import https from 'node:https'
import { readFileSync } from 'node:fs'
const agent = new https.Agent({
pfx: readFileSync(process.env.AEAT_CERT_PATH!),
passphrase: process.env.AEAT_CERT_PASSPHRASE!,
})
export function postSoap(url: string, action: string, xml: string) {
return new Promise<string>((resolve, reject) => {
const req = https.request(
url,
{
method: 'POST',
agent,
headers: { 'Content-Type': 'text/xml; charset=utf-8', SOAPAction: action },
},
(res) => {
let body = ''
res.setEncoding('utf8')
res.on('data', (chunk) => (body += chunk))
res.on('end', () => resolve(body))
},
)
req.on('error', reject)
req.end(xml)
})
}The Node.js https module accepts pfx and passphrase among the options it takes over from tls.connect(). The WSDL and the exact action names come from the AEAT files, not from this sketch. The URL is a configuration value, so the same code runs against the test portal and later against production.
Around that function the design decisions are about state, not about SOAP:
- An outbox table. An invoice event writes a row with the invoice identity, the book (issued or received), the communication type, the payload hash and a due date computed from article 69 bis. Nothing calls the AEAT inside the request that saves the invoice.
- A worker or scheduled route. It groups pending rows by book and communication type, builds batches below 10,000 invoices, and sends them. The Next.js guide on data security advises treating Route Handlers as powerful entry points: protect the trigger with a secret or the platform scheduler, never with a public URL.
- Per-invoice results. Store the AEAT status, the error code and the CSV against each row. An invoice that comes back AceptadoConErrores is registered, so the UI should show it as accepted with a fix to make, not as failed. An Incorrecto invoice is not registered and needs a correction and a resend.
- A deadline view. Sort the outbox by due date and show what is close to the four-day limit or the 16th. This is the screen a finance team will actually open.
Server Actions that start a resend need their own authorisation check. The Next.js data security guide says a Server Action is reachable by a direct POST request, so the check belongs inside the action, not only on the page that renders the button.
What does the integration not decide for you?
Several questions are tax questions and stay with your adviser: whether the company is in the mandatory group, how an operation is classified in the books, which of the several book types applies, and what to do with a rejected record. The same goes for who holds the certificate and who signs as representative. If an adviser submits as a social collaborator, the flow is different from a company submitting with its own certificate, and the application has to be built for one of them.
What the application can do is keep the facts in order: which invoice produced which record, when it was due, when it was sent, what the AEAT answered. That log is useful when the adviser asks what happened to invoice number 1042.
Checklist for a Seville company
- Confirm with your gestor whether the SII is mandatory or optional for the company.
- Decide who submits: the taxpayer with its own certificate, a representative or a social collaborator.
- Get the AEAT WSDL files, schemas and the web service description for the version in force.
- Test with the AEAT external test portal before the production certificate is installed.
- Build an outbox with a due date per record, derived from article 69 bis.
- Keep per-invoice status, error codes and the CSV.
- Keep the certificate file and password outside the repository, in server-only configuration.
How does a project run?
- You send the invoicing and accounting systems in use, the kind of VAT period, and who will hold the certificate. Expect a written answer within a working day.
- I write down the scope and my assumptions: which events create records, which books, and what the adviser still has to confirm.
- I build the outbox, the sender and the status screens on a staging copy and run them against the AEAT test portal.
- Once you accept in writing, I move the setup to production with the real certificate configured by you or your adviser.
I need read access to the invoice data source and the test credentials. The wider scope of custom builds is described on the Next.js developer page.
Send me your invoicing setup
If a Seville company needs invoice records sent to the AEAT from its own back office, write through the contact form with the systems you use and the date you need this working. The first written estimate is free, and it states what the adviser has to confirm before the build starts.
Selected projects
Examples of my work.
Healthcare Website: fermentum-mobile.pl
The website fermentum-mobile.pl is a dedicated platform created for fermentation enthusiasts who wish to explore traditional processing methods and discover ...
High Quality Artificial Plants - sztuczne-rosliny.pl E-commerce Platform
The sztuczne-rosliny.pl website is a modern e-commerce platform for a company specializing in the import and distribution of high-quality artificial plants in Poland.
Innoopract.com - Developer Tools and Services Platform
Innoopract is a company specializing in software and services, supporting developers and corporations in maximizing returns on investment in developer tools and platforms.
Need this service: Next.js developer in Seville?
Describe your project by e-mail. I reply within 24 hours.
Describe your projectExplore other WordPress services and knowledge base
Migration to Astro, Next.js, and headless WordPress.
WooCommerce sync with ERP and wholesale systems.
Business process automation around WordPress and company systems.
Library of concrete automation use cases.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Related categories
Supporting articles

Six to sixteen weeks for typical engagements, with a four-phase shape: discovery, scoping, build and cutover, tuning. The variables are catalogue size, integration count, URL preservation, and editorial team readiness, not framework choice.

A definitive 4-year Total Cost of Ownership (TCO) analysis, real-world Core Web Vitals benchmarks, Astro 7 GraphQL APQ architecture, and a 10-point executive decision matrix for choosing between decoupled and traditional WordPress.

The Shopify Plus vs WooCommerce headless decision in 2026 is no longer a binary "platform vs custom" trade-off. Both can run headless, both integrate AI, both ship at the edge. The real axes are control, total cost over five years, and exit strategy. This article walks the matrix with confirmed platform facts.