Skip to main content

Documentation 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.

All Sistemas Informáticos de Facturación (SIFs) operating under Spain’s VERI*FACTU regulation must pass a self-certification process before going into production. After self-certification, the software manufacturer must issue a declaración responsable (responsible declaration) that attests compliance with the applicable technical requirements. This declaration must be renewed for every new version of the SIF that is released.

What is required

Article 13 of RD 1007/2023 establishes three obligations for SIF manufacturers:
  1. Self-certification — the manufacturer must verify that the SIF meets all technical and functional requirements defined in the regulation before the system is put into use.
  2. Responsible declaration per version — for each version of the SIF, the manufacturer must draft and sign a responsible declaration (declaración responsable) confirming the system’s compliance.
  3. Renewal on every new version — any update that results in a new SIF version requires a fresh declaration. A declaration issued for version 1.0.0 does not cover version 1.1.0.
Distributing or deploying a SIF without having issued the corresponding responsible declaration is a violation of RD 1007/2023. Ensure your declaration is ready before any production release.

Where to find examples

The Agencia Tributaria publishes a reference template you can use as a starting point. You can find the official ejemplo de declaración responsable on the AEAT website. Review the template carefully — it documents the minimum required fields, including system identifier, version number, vendor details, and the specific articles of the regulation that are being declared compliant.

Verifactu-PHP disclaimer

Verifactu-PHP is a building block for SIF developers, not a SIF itself. It is a PHP library that handles the generation of billing records, hash chaining, XML serialisation, and communication with the AEAT web service. Because it is not a SIF in its own right, this library is not distributed with a responsible declaration. Using Verifactu-PHP in your SIF does not transfer any compliance obligation to the library author. It is your responsibility to:
  • Audit the library’s source code and satisfy yourself that it meets the technical requirements of the regulation.
  • Issue your own responsible declaration covering your SIF as a whole, including the version of Verifactu-PHP you depend on.
  • Renew that declaration whenever you update Verifactu-PHP to a new release or release a new version of your SIF.
Verifactu-PHP is released under the MIT licence. You are free to use it in commercial projects, provided you retain the original authorship attribution as required by the licence.

What to document in your declaration

At a minimum, your responsible declaration should record the following information:
  • SIF name and identifier — the $system->name and $system->id values you set on your ComputerSystem instance.
  • SIF version — the $system->version string that will appear in every billing record submitted to AEAT.
  • Verifactu-PHP version — the exact version of josemmo/verifactu-php listed in your composer.lock file.
  • Vendor details — the $system->vendorName and $system->vendorNif of the entity that developed and is responsible for the SIF.
  • Statement of compliance — an explicit declaration that the SIF meets the requirements of RD 1007/2023 and any applicable technical specifications published by the AEAT.
use josemmo\Verifactu\Models\ComputerSystem;

// These values must match exactly what appears in your responsible declaration
$system = new ComputerSystem();
$system->vendorName         = 'Acme Billing Solutions, S.L.';   // matches declaration
$system->vendorNif          = 'B12345678';                       // matches declaration
$system->name               = 'AcmeSIF';                        // matches declaration
$system->id                 = 'AC';                              // matches declaration
$system->version            = '2.3.0';                          // version declared to AEAT
$system->installationNumber = 'INST-00042';
$system->onlySupportsVerifactu    = true;
$system->supportsMultipleTaxpayers = false;
$system->hasMultipleTaxpayers      = false;
$system->validate();
Keep a copy of every responsible declaration you have issued, indexed by SIF version. The AEAT may request these documents during an inspection.

Build docs developers (and LLMs) love