Skip to content

VeriFactu — Electronic billing ​

Pool-Control generates VeriFactu compliant billing records: chained SHA-256 fingerprint, SOAP XML and QR code in the PDF.

What is implemented ​

FunctionStatus
Fingerprint and chaining when issuing invoiceAvailable
XML VeriFactu (SOAP draft)Available
Validation QR in PDFAvailable
XML download from invoice detailAvailable
Rectifications (R1 credit) with reference to original invoiceAvailable
Immutability: do not edit issued invoicesAvailable
Company Certified (.pfx)Settings → Company → VeriFactu Certificate
Sending to AEAT pre-productionTenant certificate + ALLOW_AEAT_SEND=confirm on server
XAdES SignaturePending (approved production)
Real AEAT productionBlocked (ALLOW_PROD + XAdES)

Usual flow ​

  1. Create or generate a draft invoice.
  2. Review data and press Issue — number, fingerprint and XML are assigned.
  3. The invoice cannot be edited (only rectified with credit).
  4. Download PDF (with QR) or XML.
  5. Optional: Send AEAT (PRE) from the detail (only if the server has a certificate from the obligated issuer).

Requirements for AEAT shipping ​

  • Upload the .pfx/.p12 certificate of the obligated issuer in Company Settings (the NIF of the certificate must match the NIF of the company).
  • Company name = name in AEAT census (must match the certificate).
  • Software producer NIF configured in SuperAdmin → VeriFactu (different from the tenant's NIF).
  • Default pre-production environment (verifactuProduction = false).
  • In local development you can use VERIFACTU_CERT_PATH (not in Render production).
  • When uploading the certificate in Settings: you are informed of the AES-256-GCM encryption, AEAT purpose and possibility of deletion; detail in política de privacidad and Company Settings.

Automatic test matrix ​

SuiteWhat is valid
verifactu-hash.test.tsFootprint F1/F2/R1
verifactu-xml.test.tsRecipient XML, chaining
verifactu-aeat-response.test.tsCorrect/Incorrect Parser
verifactu-compliance.test.tsAPI legal rules (immutability, VF-free purchases)
pnpm test:verifactu-xsdXML Samples (structure/XSD if xmllint)
RUN_AEAT_INTEGRATION=1Actual PRE Shipping (optional, no CI)

Internal test accounts ​

AccountSubdomainUsage
Public demoAquaDemoTesters — fictitious data (CIF demo)
VF Laboratoryvf-labVeriFactu tests with real developer data — not the public demo

Laboratory access (seed): admin@vf-lab.test / password123

Command to recreate dynamic lab data:

bash
cd packages/server && pnpm seed:vf-lab -- --reset

Purchases and VeriFactu ​

The supplier invoices, receipts, payments to the supplier and purchase cancellations/credits in the ERP are not sent to AEAT as VeriFactu registration.

DocumentVeriFactu from Pool-Control?Reason
sale invoice (customer)Yes — hash, XML, QR, PRE sendYou are the mandatory issuer
Credit / rectification sale (R1)YesRectify an invoice that you issued
supplier invoice (purchase)NoIt is registered by your provider; you only post the receipt
Payment or cancellation of purchaseNoIt is not a registration record of your billing issued

If your supplier is obliged to VeriFactu, he sends the XML to the Treasury; Pool-Control does not replace that shipment.

LayerWhat keepsWhere to see it
VeriFactu Registration (mandatory issuer)SHA-256 fingerprint, chaining, SOAP XML, AEAT statusInvoice issued: technical fields + XML download
Business auditWho issued, attempts to edit blocked, AEAT PRE submissionsSettings → Audit (SETTINGS_VIEW_LOGS)

Relevant audit actions: INVOICE_ISSUED, VERIFACTU_EDIT_BLOCKED, VERIFACTU_AEAT_SEND.

Exportable logbook (bulk CSV/XML for inspection) is pending; Today the technical record is in each invoice issued.

PRE environment until official registration in census ​

Until the company is registered and the AEAT census matches the certificate and company name:

  • Use only pre-production (verifactuProduction = false, host prewww1).
  • Shipments only with ALLOW_AEAT_SEND=confirm and supervision.
  • Validate in tenant vf-lab (not AquaDemo public demo).
  • Do not activate AEAT production or ALLOW_PROD in Render.

When the official registration is ready: tenant certificate in Settings, Correct PRE test from the app, then approval (XAdES) before production.

Rectify ≠ delete ​

Issued invoices cannot be deleted. To correct: use Rectify → credit (R1) and, if applicable, new invoice.

More information ​

Need help? soporte@poolcontrolpro.com