Spain · VERI*FACTU Guide
🇪🇸 Issue invoices in Spain with VERI*FACTU.
Introduction
VERI*FACTU is a fiscal initiative by the Spanish Tax Agency (AEAT) that requires businesses to report invoices through certified software. The system generates unique identifiers for each invoice and creates digitally signed XML files that are submitted to the tax authorities.
Prerequisites
To register a supplier and issue invoices, you need:
- Supplier details:
- Company name
- Spanish tax ID (NIF)
- For B2B sales, customer details including:
- Tax ID (for Spanish/EU entities)
- Invoice line items with:
- Price
- VAT rates
Setup
Configure your Invopop Workspace for VERI*FACTU invoicing by following these steps:
Connect the VERI*FACTU app
- Go to Configuration → Apps in the Console.
- Find VERI*FACTU Spain in the app list.
- Click Connect to activate the app.
After connecting, you’ll see VERI*FACTU listed in the Enabled Apps section.
Configure the supplier registration workflow
Add a new workflow to your workspace for registering suppliers. You can start with the template below.
Copy and paste into a new Empty Party workflow code view.
Before starting, review the workflows guide to understand the general setup process.
In Console, create a new workflow and choose Empty Party workflow as the base. Then name the workflow with a descriptive label such as “VERI*FACTU Supplier Registration”.
The new workflow will need to perform a single step:
- Register for VERI*FACTU - Prepares the system so that provided supplier can send invoices.
Finally, in the Error Handling area, add the Set State action and select Error
.
Add any additional steps you may need, and save the new workflow.
Keep the workflow ID at hand—you’ll need it later.
Configure invoice workflow
Add a new workflow to your workspace for issuing invoices. You can start with the template below.
Copy and paste into a new Empty Invoice workflow code view.
In Console create a new workflow and select Empty Invoice workflow in the template selector, then add the following steps:
- Sign Envelope - Signs the VERI*FACTU document. You can also use
Add Sequential Code
withSign Document
enabled. - Generate VERI*FACTU (Spain) - Creates the XML document and adds it to the chain. View it in the
Files
section. - Send VERI*FACTU (Spain) - Submits the XML to AEAT and returns the response.
- Generate PDF - Creates the PDF invoice with the required QR code.
In the Error Handling section, add the Set State action and select Error
.
Keep the workflow ID at hand—you’ll need it later.
VERI*FACTU allows for document modifications after submission. If a document is rejected or contains errors, update the GOBL details and resubmit to the same workflow.
Running
Learn how to register a business entity (supplier) and issue VERI*FACTU invoices:
Register a Supplier
Invopop has a collaboration agreement with the Spanish tax agency (AEAT) that lets us issue invoices on behalf of any entity using our certificate. This eliminates the need for you to request the entity’s certificate.
However, we need the supplier to provide the following documents:
- An agreement from the entity
- The signatory’s fiscal ID
- Documentation proving the signatory’s authorization
This is handled by the supplier registration workflow we created during setup. Let’s see how.
Upload a Supplier
Use the Create an entry endpoint to upload a new supplier. Include a party (you can copy the example below) object in the data field. The following fields are required:
-
name
-
tax_id
-
address
-
email
After successful upload, you’ll see the supplier in the Contacts section with status Empty
.
Send the Supplier to the registration workflow
Send the supplier to the registration workflow using the Create a job endpoint. Use:
- The supplier’s UUID from the previous step
- The Supplier Registration workflow ID from the Setup section
The supplier’s status will change to Registered
when the workflow completes successfully.
This feature is currently in beta. The Registration Workflow assumes the agreement and necessary documents have been provided outside the system and simply marks the supplier as registered. We’ll soon provide a new workflow to manage signatures and documentation. Contact us at support@invopop.com if you’re interested in using this feature.
Issue an Invoice
Upload an Invoice
Use the Create an entry endpoint to upload the invoice details. Include an invoice object in the data field with these required fields:
regime
:ES
- Add the
es-verifactu-v1
addon supplier_id
: The supplier’s UUID from step 1
You can copy one of the example invoices below as a reference.
After successful upload, you’ll see the invoice in the Invoices section with status Empty
.
Send the Invoice to the VERI*FACTU invoice workflow
Send the invoice to the VERI*FACTU workflow using the Create a job endpoint. Use:
- The invoice’s UUID from step 1
- The VERI*FACTU invoice workflow ID
The invoice’s status will change to Sent
when the workflow completes successfully.
Issue a Credit Note (Rectificativa por Diferencias)
In Spain, one way to correct an invoice is by issuing a credit note, known as a Rectificativa por Diferencias. An alternative method is to issue a Rectificativa por Sustitución, which involves creating a new invoice with the type corrective.
The difference between the two is subtle but important:
- A credit note adjusts the value of the original invoice.
- A corrective invoice replaces the original invoice entirely.
For example, if you issued an invoice for €100 but later realized it should have been €80, you can either:
- Issue a credit note for €20, or
- Issue a corrective invoice for €80.
Unless you have a specific requirement to use a corrective invoice we recommend only using credit notes. They’re more widely supported across countries, while corrective invoices are specific to a few jurisdictions like Spain.
Upload a Credit Note
A credit note in Invopop is an invoice of the type credit note. So the process is very similar to uploading an invoice. Use the Create an entry endpoint to upload a credit note. Include an invoice object in the data, with these required fields:
regime
:ES
- Add the
es-verifactu-v1
addon supplier_id
: The supplier’s UUID from step 1type
:credit-note
preceding
: references the original invoice, within it, you must include:uuid
: the UUID of the original invoice (optional but recommended)type
: type of the original invoiceissue_date
: the date of the original invoiceseries
: the series of the original invoicecode
: the code of the original invoice
You can copy one of the example credit notes below as a reference.
After successful upload, you’ll see the credit note in the Invoices section with status Empty
. If you’ve included the uuid
of the invoice in preceding, you’ll see a link to the credit note we’ve just created in the Related tab of the invoice.
Send the Credit Note to the VERI*FACTU invoice workflow
Send the credit note to the VERI*FACTU workflow using the Create a job endpoint. Use:
- The credit note’s UUID from step 1
- The VERI*FACTU invoice workflow ID
The credit note’s status will change to Sent
when the workflow completes successfully.
Issue a Corrective Invoice (Rectificativa por Sustitución)
Upload a Corrective Invoice
A corrective invoice in Invopop is an invoice of the type corrective
. So the process is very similar to uploading an invoice. Use the Create an entry endpoint to upload a corrective invoice. Include an invoice object in the data, with these required fields:
regime
:ES
- Add the
es-verifactu-v1
addon supplier_id
: The supplier’s UUID from step 1type
:credit-note
preceding
: references the original invoice, within it, you must include:uuid
: the UUID of the original invoice (optional but recommended)type
: type of the original invoiceissue_date
: the date of the original invoiceseries
: the series of the original invoicecode
: the code of the original invoice
tax
: the tax section of the original invoice, you can copy it from the original invoice
You can copy one of the example corrective invoices below as a reference.
After successful upload, you’ll see the corrective invoice in the Invoices section with status Empty
. If you’ve included the uuid
of the invoice in preceding, you’ll see a link to the corrective invoice we’ve just created in the Related tab of the invoice.
Send the Corrective Invoice to the VERI*FACTU invoice workflow
Send the corrective invoice to the VERI*FACTU workflow using the Create a job endpoint. Use:
- The corrective invoice’s UUID from step 1
- The VERI*FACTU invoice workflow ID
The corrective invoice’s status will change to Sent
when the workflow completes successfully.
Cancel an Invoice
VERI*FACTU also allows you to cancel an invoice. In general, you should only cancel an invoice if it hasn’t been handed to the customer nor accepted by the tax authority.
Different from a credit note or a corrective, canceling an invoice doesn’t produce a second document, which means you don’t have a paper to hand to your customer to show the cancellation. That’s why, if the invoice has been handed to the customer, we recommend issuing a credit note instead.
Add a cancel invoice workflow (only once)
To cancel an invoice, you need a workflow with the Cancel VERI*FACTU (Spain) step. You can start with the template below.
Copy and paste into a new Empty Party workflow code view.
Before starting, review the workflows guide to understand the general setup process.
In Console, create a new workflow and choose Empty Invoice workflow as the base. Then name the workflow with a descriptive label such as “VERI*FACTU Cancel Invoice”.
We recommend adding the following steps:
- Cancel VERI*FACTU (Spain) - Cancels the VERI*FACTU document.
- Set State - select Void in the step configuration. This will set the state of the invoice to
Void
. - In the Error Handling area, Set State - select
Error
in the step configuration.
Add any additional steps you may need, and save the new workflow.
Send to cancellation workflow
To cancel an invoice, simply send it to the VERI*FACTU cancel invoice workflow we just created using the Create a job endpoint.
The invoice’s status will change to Void
when the workflow completes successfully.