verifactuPHP is an open-source PHP library built by Invocash that wraps the VeriFactuAPI — Spain’s electronic invoicing service — into a clean, object-oriented interface. Use it to register issuers, create and submit invoice records, handle cancellations, and manage webhooks, all while staying compliant with Spain’s new electronic invoicing regulations.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NemonInvocash/verifactu-php/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install via Composer and get the library into your PHP project in minutes.
Quickstart
Authenticate, create an issuer, and submit your first invoice record end-to-end.
API Reference
Full reference for every method on the
ClienteVerifactu class and all model classes.Guides
Step-by-step guides for managing emisores, invoices, cancellations, and webhooks.
What is VeriFactu?
VeriFactu is Spain’s mandatory electronic invoicing system operated by the AEAT (Agencia Estatal de Administración Tributaria). Under Spain’s new invoicing regulations, billing software must be capable of validating and submitting electronic invoices through VeriFactu. verifactuPHP makes this integration straightforward for PHP developers.Key Features
Token Authentication
Automatically authenticates with VeriFactuAPI using email and password, storing and reusing the Bearer token for all subsequent requests.
Invoice Registration
Create and submit
RegistroAlta records for standard, simplified, and rectified invoices directly to AEAT.Invoice Cancellation
Cancel invoice records with
RegistroAnulacion or by ID using bajaRegistro, with full support for prior-rejection flags.Webhook Support
Register webhooks to receive real-time notifications for invoice status updates from VeriFactuAPI.
Full VAT/IGIC Breakdown
Model detailed tax breakdowns with
Desglose, supporting IVA, IGIC, tax regimes, exempt operations, and surcharges.PHP 7.4 & 8.x
Supports PHP 7.4 and all PHP 8.x versions. Uses Guzzle for HTTP with SSL verification configurable per environment.
Quick Example
quickstart.php
Install the library
Add
invocash/verifactu-php to your project with Composer. See Installation for both methods.Get your credentials
Register at verifactuapi.es to obtain your API email and password.
Create your first invoice
Follow the Quickstart to authenticate, set up an issuer, and submit a
RegistroAlta to AEAT.Explore the reference
Browse the API Reference for complete method signatures and model documentation.

