VeriFactu Integration Setup Guide - BBCWiki/IPos-Internal GitHub Wiki
VeriFactu Activation & Configuration
Guide for sending invoices to AEAT (Spain)
1. Obtaining the Digital Certificate
To use VeriFactu, you must have a digital certificate issued by AEAT.
This certificate is used to confirm the identity of the issuer (the company sending the invoices).
2. Configuring the Required Parameters
After obtaining the certificate and storing it locally, configure the following parameters in the application:
VeriFactuCertificatePath
Description: Full file path to the certificate (.pfx).
Example:
C:\bbc\certificates\aeat-certificate.pfx
VeriFactuCertificatePassword
Description: Password associated with the digital certificate.
Without this parameter, authentication with AEAT is not possible.
VeriFactuSistemaInformaticoNIF
Description: The NIF of the software system.
Since we do not use a separate software certificate, this value must be the same NIF as the issuing company.
Set this parameter to the company’s NIF.
IsVeriFactuEnabled
Description: Enables or disables the VeriFactu submission workflow.
Value: true to enable the feature.
Important: The company to which the store belongs must have its country set to Spain (ES).
If the company is not configured as Spanish, the VeriFactu workflow will not run even if the parameter is enabled.
VeriFactuEnvironment
Description: Determines which AEAT environment the system will use.
Possible values:
"Test"→ sends invoices to the AEAT test endpoint"Prod"→ sends invoices to the AEAT production endpoint
3. Configuration Summary
For VeriFactu to work correctly, the following must be configured:
- ✔ AEAT digital certificate installed
- ✔
VeriFactuCertificatePathset - ✔
VeriFactuCertificatePasswordset - ✔
VeriFactuSistemaInformaticoNIF= company’s NIF - ✔
IsVeriFactuEnabled = true - ✔ Store country set to Spain (ES)
- ✔
VeriFactuEnvironment=TestorProd
4. Testing VeriFactu Integration
Once all parameters are correctly configured, you can test the integration.
How to test:
- Perform a sale transaction in the POS so the system generates an invoice.
- On the printed receipt, a VeriFactu QR code should appear automatically.
- Scan the QR code using any smartphone camera or QR scanner.
- The device will open an AEAT page showing the validation result.
Expected result in TEST mode:
You should see a page similar to this:
- A header indicating you're in the AEAT TEST environment
- A message such as “Invoice found”
- The issuer’s NIF
- The invoice number
- The date of issue
- The amount
- Confirmation that AEAT has a record of an invoice with identical characteristics
This confirms that:
- The invoice was correctly signed,
- The data was successfully transmitted,
- AEAT processed the information.
Example Test Environment Output
- Invoice found
- Issuer NIF correctly displayed
- Invoice number matches the one printed
- Amount and date are correct
- Notice at the top: “This invoice has been checked in the AEAT TEST environment. It is not a validation in a real environment.”
5. Final Notes
- In Test mode, AEAT does not store invoices permanently. It only validates the format and signature.
- In Prod mode, invoices are officially registered with the Spanish Tax Agency.
- Always verify that the QR code resolves correctly before switching the environment to Production.