Download the PHP package aichadigital/lara-verifactu without Composer

On this page you can find all versions of the php package aichadigital/lara-verifactu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lara-verifactu

Lara Verifactu

Latest Version Total Downloads Pipeline PHPStan level 8 PHP Version Laravel Version License

Development happens on gitlab.castris.com. The GitHub repository is a read-only distribution mirror: issues and pull requests opened there are not seen.

Laravel package for *VERIFACTU (AEAT) compliance** — Spain's invoicing records regulation (Real Decreto 1007/2023). It generates AEAT-conformant chained fingerprints (huella), validation QR codes and registration XML, and submits registration and cancellation records to the AEAT web service.

Status: v1.0.0 — stable.

The public API (including src/Contracts/*) and the published database schema are frozen under SemVer; breaking changes require a MAJOR bump (see VERSIONING.md). Every artifact this package produces has been validated against the official AEAT specifications, and the full submission flow has been accepted live by the AEAT external testing environment (Pruebas Externas): real registration and cancellation records submitted with a representative certificate, answered Correcto with CSV, including AEAT-side validation of the chained fingerprint. "Stable" means the API and schema are locked for the declared scope, not full Spanish-law coverage — see the honest-core support matrix below. The post-1.0 coverage roadmap is tracked in AID-209.

Conformance

Regulatory deadlines

The adaptation deadline for obligated taxpayers was extended to 2027 by Real Decreto-ley 15/2025 (2 December 2025), which amended the final provision of RD 1007/2023:

Support matrix (v1.0 honest core)

The package implements an honest core: it emits only what it can produce correctly and rejects fail-loud (a ValidationException) anything it cannot, rather than sending XSD-valid XML the AEAT would reject — or accept con errores (subsanable).

Core — supported and emitted

Area Supported in the core
TipoFactura F1, F2, F3, R1, R5
Impuesto 01 IVA, 02 IPSI, 03 IGIC
ClaveRegimen 01 (general regime)
CalificacionOperacion S1; N2 (no sujeta por reglas de localización — intra-EU B2B services)
Recipient (Destinatario) Spanish NIF; IDOtro for a foreign counterpart (NIF-IVA 02 without CodigoPais; 04 / 06 with a non-ES CodigoPais)
OperacionExenta E1, E4, E6 (E2/E3 only with IPSI; rule 1199)
Recargo de equivalencia 21% → 5,2 / 1,75 · 10% → 1,4 · 4% → 0,5
Anulación RegistroAnulacion + SinRegistroPrevio / RechazoPrevio + GeneradoPor / Generador
Rectificativas R1 (S/I), F3 substitution of simplified invoices
Coherence guards (fail-loud) ImporteTotal/CuotaTotal (±10 €), per-line CuotaRepercutida (±10 €), Macrodato (≥ 100 M), F2 ≤ 3.000 €, date validity

Rejected fail-loud (post-1.0)

Out of scope

Notes

Requirements

Installation

Configure your environment:

Note: macOS Keychain exports .p12 files with legacy RC2-40 encryption that OpenSSL 3.x rejects (misleadingly reported as a wrong password). Re-package with modern encryption:

Verify your setup against AEAT:

Usage

Facade

Testing your integration

Artisan commands

Custom invoice models

Any model implementing AichaDigital\LaraVerifactu\Contracts\InvoiceContract can be registered — the bundled Invoice model (native mode) is optional. See config/verifactu.php for the model bindings.

Now supported (AID-344): Registry::invoice() resolves the model class from config('verifactu.models.invoice') and the hardcoded FK to verifactu_invoices was dropped, so any Eloquent model — any table, integer primary key — implementing InvoiceContract can be registered, cancelled and queried through the facade (register/cancel/status).

Still native-only: the verifactu:register artisan command (single-ID and --all), ProcessInvoiceRegistrationJob and verifactu:status resolve/query the native Invoice Eloquent model directly and don't go through the config binding — use the facade programmatically for a custom model instead of those entry points. A non-integer/string invoice primary key is also not supported (InvoiceContract::getId(): ?int and invoice_id are int-only).

Already model-agnostic: verifactu:retry-failed never touches the Invoice model — it retries pending Registry submissions directly, so it works the same way regardless of which invoice model registered them.

Architecture notes

Sandbox validation

The suite includes tests/Feature/RealSandboxSubmissionTest.php, which performs a real registration and cancellation against AEAT Pruebas Externas. It is skipped automatically unless a real certificate is configured through the VERIFACTU_* environment variables — CI never contacts AEAT.

Testing & quality

Running the suite (MariaDB / MySQL)

The suite runs against MariaDB/MySQL (the deployment engines), not SQLite, so it surfaces schema and engine behavior SQLite silently masks. One-time local setup (this repo's dev box runs MariaDB on port 3307):

Point the suite at it (CI uses the same values but DB_PORT=3306):

CI runs the full suite against both MariaDB 12.3 and MySQL 8.4. composer test is serial (parallel testing is intentionally disabled, see AID-259).

Security

If you discover a security vulnerability, please email [email protected] instead of using the issue tracker. Never commit certificates or credentials; keep your .p12 outside the project tree with restrictive permissions.

Logging & privacy

Third-party fiscal PII never reaches the logs unredacted. The SOAP request/response payload (NIF, names, amounts, dates, signature) is not logged by default; enable it with VERIFACTU_LOG_SOAP_PAYLOAD=true and even then it is always passed through a redactor — there is no raw-payload mode. Full stack traces and AEAT error text are gated behind VERIFACTU_LOG_DEBUG and a redactor respectively.

What the logs do carry are the issuer's own operational identifiers — invoice_number, invoice_serie, registry_number, invoice_id and the AEAT csv (cotejo) code. These are the issuer's references to its own operations, not third-party personal data, and they are kept on purpose for support and operational audit ("what happened to invoice FA-2026-001 / CSV A-xxx?"). They are controlled by the log level (VERIFACTU_LOG_LEVEL, default info):

Changelog

See CHANGELOG.md.

License

The MIT License (MIT). See LICENSE.md.

Credits


Made with ❤️ by Aicha Digital


All versions of lara-verifactu with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
ext-libxml Version *
ext-openssl Version *
ext-soap Version *
bacon/bacon-qr-code Version ^3.0
illuminate/contracts Version ^12.0||^13.0
phpseclib/phpseclib Version ^3.0
robrichards/xmlseclibs Version ^3.1
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aichadigital/lara-verifactu contains the following files

Loading the files please wait ...