Verifactu API for developers Does your software submit correctly to the AEAT?
A Spain e-invoicing API and Verifactu audit, free up to 50 records, on your own computer: your coding agent runs npx fiscalgrid-audit, shows what fails on which invoice, and fixes your code. Your invoices never leave your machine.
Free up to 50 records. No account, nothing to install. Audit free now →
Rejected, never resent
The recipient NIF must be present and differ from the issuer’s NIF (official AEAT text, in Spanish).
Fix Resend with Subsanacion = S and RechazoPrevio = X
Hash does not match
Declared 9F86D0…0A08 · expected AD1DC2…0BF8
Fix Fix the calculation, then send the correction
Chain restarted
PrimerRegistro = S with earlier records
Fix Correction chained to the last record
Before you submit: every customer’s NIF, checked.
A Portuguese customer set up as if it were Spanish. One API call and the record goes out right.
1 · Your recordbefore
"IDDestinatario": {
"NIF": "500077568"
}2 · FiscalGrid1 call
- Spots a foreign number
- Looks it up in VIES: valid in Portugal
- Tells you how it must go
3 · Your recordafter
"IDOtro": {
"CodigoPais": "PT",
"IDType": "02",
"ID": "PT500077568"
}Real response from the FiscalGrid API. Your software decides and submits, as usual.
Free NIF check
Check a Spanish NIF or EU VAT number in VIES.
Spanish NIF, NIE, CIF or EU VAT number. The Portuguese case is already filled in: press the button.
Live check against VIES.
Verifactu audit
Every record, four checks.
It recalculates the hash, follows the chain, checks every recipient and matches the AEAT responses. Results in seconds, in your terminal or with your coding agent, and by API for CI.
- Hash recalculated
error 2000 - Unbroken chain, no restarts
error 2007 - NIF and EU VAT of every recipient
VIES - Unresolved rejections and warnings
AEAT responses
- Paste the line into your agentIt reads the instructions on fiscalgrid.io and finds your XML files and the AEAT responses.
- Audit on your machinenpx fiscalgrid-audit checks them on your computer. Only error codes reach FiscalGrid.
- Fix your softwareEvery error with its invoice, its fix and the AEAT rule. Your agent changes the code.
Over 50 records, you buy the audit, get a token and run the same line again: all your records and a report registered at fiscalgrid.io/verificar.
- CI and servers
POST /v1/audit- MCP agents
audit_records- Scripts
--json
Pricing
Start with the free sample.
Verifactu audit
€299 + €49 per issuer NIF
- All your records, no 50 limit
- Hash, chain, recipients and AEAT responses
- 90-day token and a registered report
NIF and VIES API
€0
- Spanish NIF, NIE, CIF and EU VAT numbers
- MCP server for your coding agent
- Official date
- 1-1-2027 companies · 1-7-2027 others Royal Decree-law 15/2025
- Announced
- delay to 2028 not yet in the BOE
Questions
Verifactu, NIF and VIES: what people ask most.
What is Verifactu?
The Spanish tax agency’s rules for billing software: for every invoice, the program creates a record chained to the previous one, prints a QR code and can send the record to the AEAT straight away. Verifactu (Spanish) →
When does Verifactu start?
1 January 2027 for companies that pay corporate tax and 1 July 2027 for everyone else, under Royal Decree-law 15/2025. A delay to 2028 has been announced but is not yet in the official gazette (BOE). Dates (Spanish) →
Who has to comply?
Businesses and self-employed people in Spain who invoice with software. Exceptions include companies on the SII and the Basque Country (TicketBAI) and Navarre, which have their own systems. Who must comply (Spanish) →
Is Verifactu mandatory for the self-employed?
Yes, if you invoice with software. For the self-employed the date is 1 July 2027. If you invoice by hand, Verifactu stays out of scope; B2B e-invoicing will still arrive. Dates (Spanish) →
Is e-invoicing mandatory in Spain?
Between businesses, yes: the Crea y Crece law requires it. Royal Decree 238/2026 sets the deadlines: 12 months for companies above 8 million euros of turnover and 24 months for the rest, counted from 6 October 2026. B2B e-invoicing (Spanish) →
How do I check a Spanish NIF or EU VAT number for free?
Type it in the box above. We verify the check letter or digit and, for EU VAT numbers, query VIES. The number is all you need. NIF check (Spanish) →
What is VIES?
The EU register of VAT numbers. If you sell without VAT to a business in another EU country, its number must be registered in VIES. VIES check (Spanish) →
What if I send a wrong NIF to the AEAT?
Checking the NIF before invoicing gets the record right first time. With a wrong NIF, the AEAT may reject it or accept it with errors, and it has to be corrected. AEAT errors (Spanish) →
What data does the audit need?
Only the records you already sent to the AEAT and its responses. The audit runs on your computer with npx fiscalgrid-audit: your invoices stay on it. By API they are analysed in memory and never stored.
Do I need to install anything or switch billing software?
You keep your program. The audit is one command, npx fiscalgrid-audit, that your coding agent runs on your machine over the records you already sent to the AEAT; to check each customer’s NIF, one call to our free API is enough. Audit questions (Spanish) →
Does it work with Odoo, WooCommerce, PrestaShop or custom software?
Yes. If your program produces Verifactu records, we audit them: we read the AEAT’s official format, whichever program created it. The check API works from PHP, Python, Node, Java or .NET. Audit questions (Spanish) →
Does the AEAT certify billing software?
The AEAT does not certify programs: each producer declares that theirs complies, in a statement of conformity. Our audit applies the specifications the AEAT publishes and cites each one in the report. Audit questions (Spanish) →
Do you have a Verifactu API for developers?
Yes. An API and an MCP server to check the recipient before every submission, free with instant access. Your coding agent can wire it in within minutes. Documentation (Spanish) →
Why not just ask my coding agent?
Your agent writes the integration in minutes, and our API is built for that: give it the prompt and it wires it in. What you get on top is what comes after: we keep the NIF, NIE, CIF and VIES rules up to date, and the audit checks what your software already sent to the AEAT against every official specification, in seconds. See the audit →
Sources: Real Decreto 1007/2023 (consolidated text, BOE) · Real Decreto-ley 15/2025 · VIES (European Commission). Reviewed on .