Verifactu-PHP is an open-source PHP library that covers the complete lifecycle of billing records required by Spain’s VERI*FACTU regulation (RD 1007/2023). From building chainedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/josemmo/Verifactu-PHP/llms.txt
Use this file to discover all available pages before exploring further.
RegistrationRecord and CancellationRecord objects with correct SHA-256 hashes, to validating them against AEAT rules and submitting them via SOAP with an mTLS certificate — the library handles all the low-level complexity so you can focus on your invoicing logic.
Quickstart
Send your first billing record to the AEAT in minutes
Installation
PHP requirements, Composer setup, and dependencies
VERI*FACTU Overview
Understand the regulation and the two compliance modes
API Reference
Full reference for every class, method, and enum
Core capabilities
Registration Records
Create
RegistrationRecord objects with invoice details, tax breakdown, and chained hashesCancellation Records
Annul previously submitted records using
CancellationRecordAEAT Communication
Submit records via the AEAT SOAP endpoint with mTLS certificate authentication
Model Validation
Validate any model against AEAT rules before submission
QR Code URLs
Generate AEAT verification URLs to print on invoices
XML Import / Export
Round-trip serialization: export records to XML or import them back
Get started
Build a registration record
Create a
RegistrationRecord, populate the invoice header and tax breakdown, then call calculateHash() to produce the chained SHA-256 fingerprint.Configure the AEAT client
Instantiate
AeatClient with your ComputerSystem and taxpayer FiscalIdentifier, point it at your PFX/PEM certificate, and switch to the pre-production endpoint for testing.Verifactu-PHP is a tool for building Sistemas Informáticos de Facturación (SIFs). It does not ship with a self-certification declaration. As the SIF developer, you are responsible for auditing the library and issuing your own responsible declaration. See Certification for details.