> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# VERI*FACTU Invoicing 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.

<Note>VERI\*FACTU will be mandatory for companies from January 1st, 2027. The rest of tax payers from 1 July 2027. Companies reporting with SII or TicketBAI are exempt from reporting with VERI\*FACTU.</Note>

## Prerequisites

To issue your first VERI\*FACTU invoice, you must have had registered at least one supplier. Make sure you read and implemented the [VERI\*FACTU supplier registration guide](/guides/countries/es-verifactu-supplier) before continuing with this guide.

## Setup

Add a new workflow to your workspace for issuing invoices. You can start with the template below.

<Tabs>
  <Tab title="Template">
    <Card title="VERI*FACTU invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-verifactu-invoice" cta="Add to my workspace">
      This workflow will issue an invoice through VERI\*FACTU.
    </Card>
  </Tab>

  <Tab title="Code">
    Copy and paste into a new [Empty Invoice workflow](https://console.invopop.com/redirect/workflows/new?template=empty-invoice) code view.

    ```json Example VERI*FACTU invoice workflow theme={"system"}
    {
      "name": "VERI*FACTU issue invoice",
      "description": "Issue a VERI*FACTU invoice and generate PDF with QR",
      "schema": "bill/invoice",
      "steps": [
        {
          "id": "59f4dee0-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `processing`{.state .processing}",
          "config": {
            "state": "processing"
          }
        },
        {
          "id": "ec41cce0-0fc3-11f0-8a81-7911b3ecee3c",
          "name": "Add sequential code",
          "provider": "sequence.enumerate",
          "summary": "Dynamic · VERI*FACTU · 000001",
          "config": {
            "name": "Verifactu",
            "padding": 6,
            "start": 1
          }
        },
        {
          "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
          "name": "Sign envelope",
          "provider": "silo.close"
        },
        {
          "id": "ef2ce710-bc8e-11ef-8ca1-573cbe7db4cd",
          "name": "Generate VERI*FACTU XML",
          "provider": "verifactu.generate"
        },

        {
          "id": "61661540-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Send invoice to VERI*FACTU",
          "provider": "verifactu.send"
        },
        {
          "id": "65312700-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Generate PDF",
          "provider": "pdf",
          "summary": "Spanish · A4",
          "config": {
            "date_format": "%Y-%m-%d",
            "layout": "A4",
            "locale": "es",
            "logo_height": 60
          }
        },
        {
          "id": "6abb4de0-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `sent`{.state .sent}",
          "config": {
            "state": "sent"
          }
        }
      ],
      "rescue": [
        {
          "id": "798b1d00-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `error`{.state .error}",
          "config": {
            "state": "error"
          }
        }
      ]
    }

    ```
  </Tab>

  <Tab title="Build from scratch">
    In [Console](https://console.invopop.com) create a new workflow and select [Empty Invoice workflow](https://console.invopop.com/redirect/workflows/new?template=empty-invoice) in the template selector, then add the following steps:

    1. **Sign envelope** - Signs the VERI\*FACTU document.
    2. **Generate XML** - Creates the XML document and adds it to the chain. View it in the `Files` section.
    3. **Issue invoice** - Submits the XML to AEAT and returns the response.
    4. **Generate PDF** - Creates the PDF invoice with the required QR code.

    In the Error Handling section, add the **Set state** action and select `Error`.
  </Tab>
</Tabs>

Keep the `Workflow ID` at hand, you'll use it later.

<Info>
  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.
</Info>

## Issue an Invoice

<Steps>
  <Step title="Upload an Invoice">
    Use the [Create an entry](/api-ref/silo/entries/create-an-entry-put) endpoint to upload the invoice details. Include an [invoice](https://docs.gobl.org/draft-0/bill/invoice) object in the [data](/api-ref/silo/entries/create-an-entry-put#body-data) field with these required fields:

    * `regime`: `ES`
    * Add the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon
    * `supplier`: Use the details of the supplier you've registered before.

    You can copy one of the example invoices below as a reference.

    <AccordionGroup>
      <Accordion title="B2C Simplified Invoice">
        Simplified invoices are used for B2C transactions when the customer is not a business. The transaction amount should be under €400 (VAT included) with some [exceptions](https://sede.agenciatributaria.gob.es/Sede/iva/facturacion-registro/facturacion-iva/tipos-factura.html) in which this threshold is increased to €3,000.

        To create a simplified VERI\*FACTU invoice, include the `simplified` tag in your GOBL document with the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon.

        <CodeGroup>
          ```json B2C Invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "$tags": [
                  "simplified"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "rate": "general"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a standard tax"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F2"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "general",
          					"percent": "21.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"percent": "21.0%",
          							"amount": "378.00"
          						}
          					],
          					"amount": "378.00"
          				}
          			],
          			"sum": "378.00"
          		},
          		"tax": "378.00",
          		"total_with_tax": "2178.00",
          		"payable": "2178.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a standard tax"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Standard Invoice">
        Regular invoices are used for B2B transactions. Regular invoices must be issued when:

        * The customer is a registered business (has a tax identification number).
        * The transaction amount is €400 VAT included or above, or the customer requires a full invoice.
        * The customer needs a complete invoice with all tax details for accounting or tax purposes.

        To create a regular VERI\*FACTU invoice, include the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon and ensure the `customer` field contains valid tax identification details. The addon will automatically set the document type to `F1` when the silo entry is built (which happens automatically when saving a silo entry through the API or console).

        <Note>
          The `supplier` must be [previously registered](https://docs.invopop.com/guides/es-verifactu-supplier#create-a-supplier-entry) with the tax authority and the `customer` NIF or VAT ID must be valid.
        </Note>

        <CodeGroup>
          ```json B2B Invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "004",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "ES",
                      "code": "B63272603"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "rate": "general"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a exempt tax"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "004",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "ES",
          			"code": "B63272603"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "general",
          					"percent": "21.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"percent": "21.0%",
          							"amount": "378.00"
          						}
          					],
          					"amount": "378.00"
          				}
          			],
          			"sum": "378.00"
          		},
          		"tax": "378.00",
          		"total_with_tax": "2178.00",
          		"payable": "2178.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a exempt tax"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Services EU Client (Reverse Charge)">
        Reverse charge invoices are used for B2B services provided to customers in other EU member states. Reverse charge must be applied when:

        * The customer is a registered business in another EU member state (has a valid EU VAT ID).
        * The service is provided to a business customer (B2B), not a consumer.
        * The service is subject to VAT but the customer accounts for the VAT in their own country.

        To create a reverse charge VERI\*FACTU invoice, use the tax key `reverse-charge` in your invoice lines. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon will automatically set the operation class to `S2` (Subject and Not Exempt - With reverse charge) when the silo entry is built.

        <Note>
          With reverse charge, no VAT is charged by the supplier. The customer accounts for VAT in their own country. The `supplier` must be [previously registered](https://docs.invopop.com/guides/es-verifactu-supplier#create-a-supplier-entry) with the tax authority and the `customer` VAT ID must be valid and registered in the EU VIES system.
        </Note>

        <CodeGroup>
          ```json B2B Intra-community Services invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "sett/000001",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "DE",
                      "code": "111111125"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "key": "reverse-charge"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with reverse charge"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "sett/000001",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "DE",
          			"code": "111111125"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "reverse-charge",
          					"ext": {
          						"es-verifactu-op-class": "S2",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "reverse-charge",
          							"ext": {
          								"es-verifactu-op-class": "S2",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"amount": "0.00"
          						}
          					],
          					"amount": "0.00"
          				}
          			],
          			"sum": "0.00"
          		},
          		"tax": "0.00",
          		"total_with_tax": "1800.00",
          		"payable": "1800.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with reverse charge"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Goods EU Client (Intra-Community)">
        Intra-community supply invoices are used for B2B goods delivered to customers in other EU member states. Intra-community supplies must be applied when:

        * The customer is a registered business in another EU member state (has a valid EU VAT ID).
        * Goods are physically delivered to another EU member state.
        * The supply is exempt from VAT in the origin country (Spain) and subject to VAT in the destination country.

        To create an intra-community supply VERI\*FACTU invoice, use the tax key `intra-community` in your invoice lines. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon will automatically set the exemption code to `E5` ([Artículo 25 Ley de IVA](https://www.boe.es/eli/es/l/1992/12/28/37/con#a25)) when the silo entry is built.

        <Note>
          With intra-community supplies, no VAT is charged in Spain. The customer accounts for VAT in their destination country. The `supplier` must be [previously registered](https://docs.invopop.com/guides/es-verifactu-supplier#create-a-supplier-entry) with the tax authority and the `customer` VAT ID must be valid and registered in the EU VIES system.
        </Note>

        <CodeGroup>
          ```json Intra-community goods invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "sett/000003",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "DE",
                      "code": "111111125"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Goods",
                          "price": "90.00"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "key": "intra-community"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a intra-community"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "sett/000003",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "DE",
          			"code": "111111125"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Goods",
          				"price": "90.00"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "intra-community",
          					"ext": {
          						"es-verifactu-exempt": "E5",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "intra-community",
          							"ext": {
          								"es-verifactu-exempt": "E5",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"amount": "0.00"
          						}
          					],
          					"amount": "0.00"
          				}
          			],
          			"sum": "0.00"
          		},
          		"tax": "0.00",
          		"total_with_tax": "1800.00",
          		"payable": "1800.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a intra-community"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Services International Client (Outside Scope)">
        Outside scope invoices are used for B2B services provided to customers outside the EU.

        To create an outside scope VERI\*FACTU invoice, use the tax key `outside-scope` in your invoice lines. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon will automatically set the operation class to `N2` (Not Subject - Due to location rules) when the silo entry is built.

        <Note>
          Services provided to non-EU customers are generally outside the scope of Spanish VAT. The `supplier` must be previously registered with the tax authority. Customer tax identification is optional but recommended for record-keeping purposes.
        </Note>

        <CodeGroup>
          ```json B2B International Services invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "sett/000002",
              "issue_date": "2025-11-17",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "SG",
                      "code": "201312345A"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "key": "outside-scope"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a outside-scope tax"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "sett/000002",
          	"issue_date": "2025-11-17",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "SG",
          			"code": "201312345A"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "outside-scope",
          					"ext": {
          						"es-verifactu-op-class": "N2",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "outside-scope",
          							"ext": {
          								"es-verifactu-op-class": "N2",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"amount": "0.00"
          						}
          					],
          					"amount": "0.00"
          				}
          			],
          			"sum": "0.00"
          		},
          		"tax": "0.00",
          		"total_with_tax": "1800.00",
          		"payable": "1800.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a outside-scope tax"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Goods International Client (Export)">
        Export invoices are used for B2B goods delivered to customers outside the EU.

        To create an export VERI\*FACTU invoice, use the tax key `export` in your invoice lines. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon will automatically set the exemption code to `E2` ([Artículo 21 Ley de IVA](https://www.boe.es/eli/es/l/1992/12/28/37/con#a21)) and regime code to `02` (Export) when the silo entry is built.

        <Note>
          Exported goods are exempt from Spanish VAT. The `supplier` must be previously registered with the tax authority. Customer tax identification is optional but recommended for record-keeping purposes.
        </Note>

        <CodeGroup>
          ```json B2B International Goods invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "sett/000004",
              "issue_date": "2025-11-17",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "SG",
                      "code": "201312345A"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Goods",
                          "price": "90.00"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "key": "export"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a export"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "sett/000004",
          	"issue_date": "2025-11-17",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "SG",
          			"code": "201312345A"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Goods",
          				"price": "90.00"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "export",
          					"ext": {
          						"es-verifactu-exempt": "E2",
          						"es-verifactu-regime": "02"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "export",
          							"ext": {
          								"es-verifactu-exempt": "E2",
          								"es-verifactu-regime": "02"
          							},
          							"base": "1800.00",
          							"amount": "0.00"
          						}
          					],
          					"amount": "0.00"
          				}
          			],
          			"sum": "0.00"
          		},
          		"tax": "0.00",
          		"total_with_tax": "1800.00",
          		"payable": "1800.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a export"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2B Exempt E1 Invoice">
        Exempt `E1` invoices are used for B2B transactions that are exempt from VAT pursuant ([Artículo 20 Ley de IVA](https://www.boe.es/eli/es/l/1992/12/28/37/con#a20)), which covers exemptions in internal operations.

        To create an exempt E1 VERI\*FACTU invoice, use the tax key `exempt` in your invoice lines. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon will automatically set the exemption code to `E1` when the silo entry is built.

        <Note>
          Exempt operations are not subject to VAT but must still be reported. The `supplier` must be previously registered with the tax authority and the `customer` NIF must be valid.
        </Note>

        <CodeGroup>
          ```json B2B Exempt E1 Invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "004",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "ES",
                      "code": "B63272603"
                  }
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "key": "exempt"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a exempt tax"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "004",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "ES",
          			"code": "B63272603"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "exempt",
          					"ext": {
          						"es-verifactu-exempt": "E1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "exempt",
          							"ext": {
          								"es-verifactu-exempt": "E1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"amount": "0.00"
          						}
          					],
          					"amount": "0.00"
          				}
          			],
          			"sum": "0.00"
          		},
          		"tax": "0.00",
          		"total_with_tax": "1800.00",
          		"payable": "1800.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a exempt tax"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="B2C One-Stop-Shop Invoice">
        One-Stop-Shop (OSS) invoices are used for B2C distance sales of goods and services to consumers in other EU member states when the supplier is registered under the OSS scheme.

        To create an OSS VERI\*FACTU invoice, include the `simplified` tag in your GOBL document with the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon. The invoice will be treated as a simplified invoice (document type `F2`) and VAT is accounted for through the OSS scheme in the destination country.

        <Note>
          OSS allows suppliers to register for VAT in one EU member state and account for VAT on all EU distance sales through that single registration. The `supplier` must be [previously registered](https://docs.invopop.com/guides/es-verifactu-supplier#create-a-supplier-entry) with the tax authority and enrolled in the OSS scheme.
        </Note>

        <CodeGroup>
          ```json B2C One Stop Shop Invoice theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "$tags": [
                  "simplified"
              ],
              "type": "standard",
              "series": "SAMPLE",
              "code": "004",
              "issue_date": "2024-11-13",
              "currency": "EUR",
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "lines": [
                  {
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "rate": "standard"
                          }
                      ],
                      "total": "1800.00"
                  }
              ],
              "notes": [
                  {
                      "key": "general",
                      "text": "This is a sample invoice with a standard tax"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"code": "004",
          	"issue_date": "2024-11-13",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F2"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "general",
          					"percent": "21.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"percent": "21.0%",
          							"amount": "378.00"
          						}
          					],
          					"amount": "378.00"
          				}
          			],
          			"sum": "378.00"
          		},
          		"tax": "378.00",
          		"total_with_tax": "2178.00",
          		"payable": "2178.00"
          	},
          	"notes": [
          		{
          			"key": "general",
          			"text": "This is a sample invoice with a standard tax"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Credit note (rectificativa por diferencias)">
        <CodeGroup>
          ```json Rectificativa por diferencias theme={"system"}
          {
              "$schema": "https://gobl.org/draft-0/bill/invoice",
              "$regime": "ES",
              "$addons": [
                  "es-verifactu-v1"
              ],
              "uuid": "01971bb1-1499-7001-81ea-26f51cf396e1",
              "type": "credit-note",
              "series": "CN",
              "issue_date": "2025-05-29",
              "currency": "EUR",
              "preceding": [
                  {
                      "uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
                      "type": "standard",
                      "issue_date": "2024-11-13",
                      "series": "SAMPLE",
                      "code": "004"
                  }
              ],
              "supplier": {
                  "name": "Invopop S.L.",
                  "tax_id": {
                      "country": "ES",
                      "code": "B85905495"
                  },
                  "addresses": [
                      {
                          "num": "42",
                          "street": "Calle Pradillo",
                          "locality": "Madrid",
                          "region": "Madrid",
                          "code": "28002",
                          "country": "ES"
                      }
                  ]
              },
              "customer": {
                  "name": "Sample Consumer",
                  "tax_id": {
                      "country": "ES",
                      "code": "B63272603"
                  }
              },
              "lines": [
                  {
                      "i": 1,
                      "quantity": "20",
                      "item": {
                          "name": "Development services",
                          "price": "90.00",
                          "unit": "h"
                      },
                      "sum": "1800.00",
                      "taxes": [
                          {
                              "cat": "VAT",
                              "rate": "general"
                          }
                      ],
                      "total": "1800.00"
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"uuid": "01971bb1-1499-7001-81ea-26f51cf396e1",
          	"type": "credit-note",
          	"series": "CN",
          	"issue_date": "2025-05-29",
          	"currency": "EUR",
          	"preceding": [
          		{
          			"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
          			"type": "standard",
          			"issue_date": "2024-11-13",
          			"series": "SAMPLE",
          			"code": "004"
          		}
          	],
          	"tax": {
          		"ext": {
          			"es-verifactu-correction-type": "I",
          			"es-verifactu-doc-type": "R1"
          		}
          	},
          	"supplier": {
          		"name": "Invopop S.L.",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"num": "42",
          				"street": "Calle Pradillo",
          				"locality": "Madrid",
          				"region": "Madrid",
          				"code": "28002",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "ES",
          			"code": "B63272603"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "general",
          					"percent": "21.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "1800.00",
          							"percent": "21.0%",
          							"amount": "378.00"
          						}
          					],
          					"amount": "378.00"
          				}
          			],
          			"sum": "378.00"
          		},
          		"tax": "378.00",
          		"total_with_tax": "2178.00",
          		"payable": "2178.00"
          	}
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Corrective invoice (rectificativa por sustitución)">
        ```json Built version theme={"system"}
        {
        	"$schema": "https://gobl.org/draft-0/bill/invoice",
        	"$regime": "ES",
        	"$addons": [
        		"es-verifactu-v1"
        	],
        	"type": "corrective",
        	"series": "CO",
        	"issue_date": "2025-05-29",
        	"currency": "EUR",
        	"preceding": [
        		{
        			"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
        			"type": "standard",
        			"issue_date": "2024-11-13",
        			"series": "SAMPLE",
        			"code": "004",
        			"tax": {
        				"categories": [
        					{
        						"code": "VAT",
        						"rates": [
        							{
        								"key": "standard",
        								"ext": {
        									"es-verifactu-op-class": "S1",
        									"es-verifactu-regime": "01"
        								},
        								"base": "1800.00",
        								"percent": "21.0%",
        								"amount": "378.00"
        							}
        						],
        						"amount": "378.00"
        					}
        				],
        				"sum": "378.00"
        			}
        		}
        	],
        	"tax": {
        		"ext": {
        			"es-verifactu-correction-type": "S",
        			"es-verifactu-doc-type": "R1"
        		}
        	},
        	"supplier": {
        		"name": "Invopop S.L.",
        		"tax_id": {
        			"country": "ES",
        			"code": "B85905495"
        		},
        		"addresses": [
        			{
        				"num": "42",
        				"street": "Calle Pradillo",
        				"locality": "Madrid",
        				"region": "Madrid",
        				"code": "28002",
        				"country": "ES"
        			}
        		]
        	},
        	"customer": {
        		"name": "Sample Consumer",
        		"tax_id": {
        			"country": "ES",
        			"code": "B63272603"
        		}
        	},
        	"lines": [
        		{
        			"i": 1,
        			"quantity": "20",
        			"item": {
        				"name": "Development services",
        				"price": "90.00",
        				"unit": "h"
        			},
        			"sum": "1800.00",
        			"taxes": [
        				{
        					"cat": "VAT",
        					"key": "standard",
        					"rate": "general",
        					"percent": "21.0%",
        					"ext": {
        						"es-verifactu-op-class": "S1",
        						"es-verifactu-regime": "01"
        					}
        				}
        			],
        			"total": "1800.00"
        		}
        	],
        	"totals": {
        		"sum": "1800.00",
        		"total": "1800.00",
        		"taxes": {
        			"categories": [
        				{
        					"code": "VAT",
        					"rates": [
        						{
        							"key": "standard",
        							"ext": {
        								"es-verifactu-op-class": "S1",
        								"es-verifactu-regime": "01"
        							},
        							"base": "1800.00",
        							"percent": "21.0%",
        							"amount": "378.00"
        						}
        					],
        					"amount": "378.00"
        				}
        			],
        			"sum": "378.00"
        		},
        		"tax": "378.00",
        		"total_with_tax": "2178.00",
        		"payable": "2178.00"
        	}
        }
        ```
      </Accordion>

      <Accordion title="Replacement invoice (factura de canje)">
        ```json Factura de canje theme={"system"}
        {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$regime": "ES",
            "$addons": [
                "es-verifactu-v1"
            ],
            "type": "standard",
            "tax": {
                "tags": [
                    "replacement"
                ]
            },
            "series": "FC",
            "issue_date": "2026-02-26",
            "currency": "EUR",
            "preceding": [
                {
                    "type": "standard",
                    "issue_date": "2026-02-20",
                    "series": "FS",
                    "code": "001"
                }
            ],
            "supplier": {
                "name": "Easor Software Solutions S.L.",
                "tax_id": {
                    "country": "ES",
                    "code": "B24830515"
                },
                "addresses": [
                    {
                        "num": "532",
                        "street": "Avenida Diagonal",
                        "locality": "Barcelona",
                        "region": "Barcelona",
                        "code": "08006",
                        "country": "ES"
                    }
                ]
            },
            "customer": {
                "name": "Cliente Ejemplo S.L.",
                "tax_id": {
                    "country": "ES",
                    "code": "B63272603"
                }
            },
            "lines": [
                {
                    "quantity": "1",
                    "item": {
                        "name": "Servicio de consultoría",
                        "price": "500.00"
                    },
                    "taxes": [
                        {
                            "cat": "VAT",
                            "rate": "general"
                        }
                    ]
                }
            ]
        }
        ```
      </Accordion>

      <Accordion title="B2C Hotel + IEET (Catalonia tourist tax)">
        The Catalan tourist tax (IEET, *Impost sobre les Estades en Establiments Turístics*) is a regional tax administered by the Agència Tributària de Catalunya — not the AEAT — so it is **not** classified as a tax in the VERI\*FACTU record. Hotels declare it directly to the Generalitat through the quarterly Modelo 950.

        Model the IEET as a document-level [`charge`](https://docs.gobl.org/draft-0/bill/invoice#charge) with `key: "tax"`. This keeps it outside the VAT base (Art. 35 of Llei 5/2017 requires it to be shown separately from the consideration) and lets it flow into the invoice's `ImporteTotal` for VERI\*FACTU without being reported as a tax category.

        <Note>
          Do not model the IEET as a `VAT` tax line — it is a fixed amount per night, not a percentage, and should not be reported to the AEAT. The `reason` field on the charge is what appears on the guest's invoice, so include the establishment type, location, nights, and rate for a clear breakdown.
        </Note>

        <CodeGroup>
          ```json B2C Hotel + IEET (Catalonia tourist tax) theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-verifactu-v1"
            ],
            "$tags": [
              "simplified"
            ],
            "series": "SAMPLE",
            "issue_date": "2026-05-06",
            "supplier": {
              "name": "Hotel Barcelona Example SL",
              "tax_id": {
                "country": "ES",
                "code": "B85905495"
              },
              "addresses": [
                {
                  "locality": "Barcelona",
                  "code": "08001",
                  "country": "ES"
                }
              ]
            },
            "customer": {
              "name": "John Smith",
              "addresses": [
                {
                  "locality": "London",
                  "country": "GB"
                }
              ]
            },
            "lines": [
              {
                "quantity": "3",
                "item": {
                  "name": "Double room — 3 nights",
                  "price": "180.00",
                  "unit": "day"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "rate": "reduced"
                  }
                ]
              }
            ],
            "charges": [
              {
                "key": "tax",
                "reason": "IEET — Hotel 4★, Barcelona city — 3 nights × 1 guest × €3.40",
                "amount": "10.20"
              }
            ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-05-06",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F2"
          		}
          	},
          	"supplier": {
          		"name": "Hotel Barcelona Example SL",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"locality": "Barcelona",
          				"code": "08001",
          				"country": "ES"
          			}
          		]
          	},
          	"customer": {
          		"name": "John Smith",
          		"addresses": [
          			{
          				"locality": "London",
          				"country": "GB"
          			}
          		]
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "3",
          			"item": {
          				"name": "Double room — 3 nights",
          				"price": "180.00",
          				"unit": "day"
          			},
          			"sum": "540.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "reduced",
          					"percent": "10.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "540.00"
          		}
          	],
          	"charges": [
          		{
          			"i": 1,
          			"key": "tax",
          			"reason": "IEET — Hotel 4★, Barcelona city — 3 nights × 1 guest × €3.40",
          			"amount": "10.20"
          		}
          	],
          	"totals": {
          		"sum": "540.00",
          		"charge": "10.20",
          		"total": "550.20",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "540.00",
          							"percent": "10.0%",
          							"amount": "54.00"
          						}
          					],
          					"amount": "54.00"
          				}
          			],
          			"sum": "54.00"
          		},
          		"tax": "54.00",
          		"total_with_tax": "604.20",
          		"payable": "604.20"
          	}
          }
          ```
        </CodeGroup>
      </Accordion>
    </AccordionGroup>

    After uploading you'll see the document in the **Invoices** section with status `Empty`.

    <Frame caption="Empty invoice">
      <img width="600" src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/guides/es-verifactu-invoice-1.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=7044997f01571c11b7e64b4ca1cebd4e" alt="Empty invoice" data-path="assets/guides/es-verifactu-invoice-1.png" />
    </Frame>
  </Step>

  <Step title="Send the Invoice to the VERI*FACTU invoice workflow">
    Send the invoice to the VERI\*FACTU workflow using the [Create a job](/api-ref/transform/jobs/create-a-job-post) endpoint. Use:

    * `workflow_id`: use the Workflow ID of the *VERI\*FACTU invoice* workflow we created during setup
    * `silo_entry_id`: use the Silo Entry ID of the invoice you've just uploaded.

    The invoice's status will change to `Sent` when the workflow completes successfully.

    <Frame caption="Sent invoice">
      <img width="600" src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/guides/es-verifactu-invoice-2.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=f414ed720d7b3e855dec812034dcb3e7" alt="Sent invoice" data-path="assets/guides/es-verifactu-invoice-2.png" />
    </Frame>

    You can verify that the PDF was generated by clicking on the invoice and selecting the PDF from the "Files" tab.

    <Frame caption="Example VERI*FACTU invoice with QR">
      <img width="420" src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/guides/es-verifactu-example-pdf.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=d95d5867852d61430db65cc1e67d2673" alt="Example VERI*FACTU invoice with QR" data-path="assets/guides/es-verifactu-example-pdf.png" />
    </Frame>
  </Step>
</Steps>

## 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. Examples where you would need to issue a corrective invoice (*Rectificativa por Sustitución*) are incorrect supplier or client data, which can't be corrected through credit or debit notes.

<Steps>
  <Step title="Upload a Credit Note">
    A credit note in Invopop is an invoice of the type credit note. The process is very similar to uploading an invoice, use the [Create an entry](/api-ref/silo/entries/create-an-entry-put) endpoint to upload a credit note. Include an [invoice](https://docs.gobl.org/draft-0/bill/invoice) object in the [data](/api-ref/silo/entries/create-an-entry-put#body-data), with these required fields:

    * `regime`: `ES`
    * Add the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon
    * `supplier`: use the same supplier details as in the original invoice
    * `type`: `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 invoice
      * `issue_date`: the date of the original invoice
      * `series`: the series of the original invoice
      * `code`: the code of the original invoice

    You can copy the example credit note below as a reference.

    ```json Built version theme={"system"}
    {
    	"$schema": "https://gobl.org/draft-0/bill/invoice",
    	"$regime": "ES",
    	"$addons": [
    		"es-verifactu-v1"
    	],
    	"uuid": "01971bb1-1499-7001-81ea-26f51cf396e1",
    	"type": "credit-note",
    	"series": "CN",
    	"issue_date": "2025-05-29",
    	"currency": "EUR",
    	"preceding": [
    		{
    			"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
    			"type": "standard",
    			"issue_date": "2024-11-13",
    			"series": "SAMPLE",
    			"code": "004"
    		}
    	],
    	"tax": {
    		"ext": {
    			"es-verifactu-correction-type": "I",
    			"es-verifactu-doc-type": "R1"
    		}
    	},
    	"supplier": {
    		"name": "Invopop S.L.",
    		"tax_id": {
    			"country": "ES",
    			"code": "B85905495"
    		},
    		"addresses": [
    			{
    				"num": "42",
    				"street": "Calle Pradillo",
    				"locality": "Madrid",
    				"region": "Madrid",
    				"code": "28002",
    				"country": "ES"
    			}
    		]
    	},
    	"customer": {
    		"name": "Sample Consumer",
    		"tax_id": {
    			"country": "ES",
    			"code": "B63272603"
    		}
    	},
    	"lines": [
    		{
    			"i": 1,
    			"quantity": "20",
    			"item": {
    				"name": "Development services",
    				"price": "90.00",
    				"unit": "h"
    			},
    			"sum": "1800.00",
    			"taxes": [
    				{
    					"cat": "VAT",
    					"key": "standard",
    					"rate": "general",
    					"percent": "21.0%",
    					"ext": {
    						"es-verifactu-op-class": "S1",
    						"es-verifactu-regime": "01"
    					}
    				}
    			],
    			"total": "1800.00"
    		}
    	],
    	"totals": {
    		"sum": "1800.00",
    		"total": "1800.00",
    		"taxes": {
    			"categories": [
    				{
    					"code": "VAT",
    					"rates": [
    						{
    							"key": "standard",
    							"ext": {
    								"es-verifactu-op-class": "S1",
    								"es-verifactu-regime": "01"
    							},
    							"base": "1800.00",
    							"percent": "21.0%",
    							"amount": "378.00"
    						}
    					],
    					"amount": "378.00"
    				}
    			],
    			"sum": "378.00"
    		},
    		"tax": "378.00",
    		"total_with_tax": "2178.00",
    		"payable": "2178.00"
    	}
    }
    ```

    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.

    <Frame caption="Link to the credit note">
      <img width="100%" src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/guides/es-verifactu-invoice-cn.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=54d82812f4d4d0e323427de00e6f14c9" alt="Invoice related to a credit note" data-path="assets/guides/es-verifactu-invoice-cn.png" />
    </Frame>
  </Step>

  <Step title="Send the Credit Note to the VERI*FACTU invoice workflow">
    Send the credit note to the VERI\*FACTU workflow using the [Create a job](/api-ref/transform/jobs/create-a-job-post) endpoint. Use:

    * `workflow_id`: use the Workflow ID of the \_VERI\*FACTU invoice \_workflow we created during setup
    * `silo_entry_id`: use the The Silo Entry ID of the credit note you've just uploaded.

    The credit note's status will change to `Sent` when the workflow completes successfully.
  </Step>
</Steps>

## Issue a Corrective Invoice (Rectificativa por Sustitución)

<Steps>
  <Step title="Upload a Corrective Invoice">
    A corrective invoice in Invopop is an invoice of the type `corrective`. The process is very similar to uploading an invoice, use the [Create an entry](/api-ref/silo/entries/create-an-entry-put) endpoint to upload a corrective invoice. Include an [invoice](https://docs.gobl.org/draft-0/bill/invoice) object in the [data](/api-ref/silo/entries/create-an-entry-put#body-data), with these required fields:

    * `regime`: `ES`
    * Add the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon
    * `supplier_id`: use the same supplier details as in the original invoice
    * `type`: `corrective`
    * `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 invoice
      * `issue_date`: the date of the original invoice
      * `series`: the series of the original invoice
      * `code`: 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 the example corrective invoice below as a reference.

    ```json Built version theme={"system"}
    {
    	"$schema": "https://gobl.org/draft-0/bill/invoice",
    	"$regime": "ES",
    	"$addons": [
    		"es-verifactu-v1"
    	],
    	"type": "corrective",
    	"series": "CO",
    	"issue_date": "2025-05-29",
    	"currency": "EUR",
    	"preceding": [
    		{
    			"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
    			"type": "standard",
    			"issue_date": "2024-11-13",
    			"series": "SAMPLE",
    			"code": "004",
    			"tax": {
    				"categories": [
    					{
    						"code": "VAT",
    						"rates": [
    							{
    								"key": "standard",
    								"ext": {
    									"es-verifactu-op-class": "S1",
    									"es-verifactu-regime": "01"
    								},
    								"base": "1800.00",
    								"percent": "21.0%",
    								"amount": "378.00"
    							}
    						],
    						"amount": "378.00"
    					}
    				],
    				"sum": "378.00"
    			}
    		}
    	],
    	"tax": {
    		"ext": {
    			"es-verifactu-correction-type": "S",
    			"es-verifactu-doc-type": "R1"
    		}
    	},
    	"supplier": {
    		"name": "Invopop S.L.",
    		"tax_id": {
    			"country": "ES",
    			"code": "B85905495"
    		},
    		"addresses": [
    			{
    				"num": "42",
    				"street": "Calle Pradillo",
    				"locality": "Madrid",
    				"region": "Madrid",
    				"code": "28002",
    				"country": "ES"
    			}
    		]
    	},
    	"customer": {
    		"name": "Sample Consumer",
    		"tax_id": {
    			"country": "ES",
    			"code": "B63272603"
    		}
    	},
    	"lines": [
    		{
    			"i": 1,
    			"quantity": "20",
    			"item": {
    				"name": "Development services",
    				"price": "90.00",
    				"unit": "h"
    			},
    			"sum": "1800.00",
    			"taxes": [
    				{
    					"cat": "VAT",
    					"key": "standard",
    					"rate": "general",
    					"percent": "21.0%",
    					"ext": {
    						"es-verifactu-op-class": "S1",
    						"es-verifactu-regime": "01"
    					}
    				}
    			],
    			"total": "1800.00"
    		}
    	],
    	"totals": {
    		"sum": "1800.00",
    		"total": "1800.00",
    		"taxes": {
    			"categories": [
    				{
    					"code": "VAT",
    					"rates": [
    						{
    							"key": "standard",
    							"ext": {
    								"es-verifactu-op-class": "S1",
    								"es-verifactu-regime": "01"
    							},
    							"base": "1800.00",
    							"percent": "21.0%",
    							"amount": "378.00"
    						}
    					],
    					"amount": "378.00"
    				}
    			],
    			"sum": "378.00"
    		},
    		"tax": "378.00",
    		"total_with_tax": "2178.00",
    		"payable": "2178.00"
    	}
    }
    ```

    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.

    <Frame caption="Link to the corrective invoice">
      <img width="600" src="https://mintcdn.com/invopop/fWniCD0icTwRKXxR/assets/guides/es-verifactu-invoice-corrective.png?fit=max&auto=format&n=fWniCD0icTwRKXxR&q=85&s=07372eed9bc4218e73b34cc3da335be8" alt="Invoice related to a corrective invoice" data-path="assets/guides/es-verifactu-invoice-corrective.png" />
    </Frame>
  </Step>

  <Step title="Send the Corrective Invoice to the VERI*FACTU invoice workflow">
    Send the corrective invoice to the VERI\*FACTU workflow using the [Create a job](/api-ref/transform/jobs/create-a-job-post) endpoint. Use:

    * `workflow_id`: use the Workflow ID of the *VERI\*FACTU invoice* workflow we created during setup
    * `silo_entry_id`: use the The Silo Entry ID of the corrective invoice you've just uploaded.

    The corrective invoice's status will change to `Sent` when the workflow completes successfully.
  </Step>
</Steps>

## Issue a Replacement Invoice (Factura de Canje)

A replacement invoice (*Factura de Canje*) is used to replace a simplified invoice with a full invoice. This is common when a customer who originally received a simplified invoice (e.g., a receipt) later requests a full invoice with their tax identification details.

<Steps>
  <Step title="Upload a Replacement Invoice">
    A replacement invoice is a standard invoice with the `replacement` tag. Use the [Create an entry](/api-ref/silo/entries/create-an-entry-put) endpoint to upload the replacement invoice. Include an [invoice](https://docs.gobl.org/draft-0/bill/invoice) object in the [data](/api-ref/silo/entries/create-an-entry-put#body-data), with these required fields:

    * `regime`: `ES`
    * Add the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon
    * `type`: `standard`
    * `tax.tags`: include `replacement`
    * `supplier`: use the same supplier details as in the original invoice
    * `preceding`: references the original simplified invoice, within it, you must include:
      * `type`: type of the original invoice
      * `issue_date`: the date of the original invoice
      * `series`: the series of the original invoice
      * `code`: the code of the original invoice

    You can copy the example replacement invoice below as a reference.

    ```json Factura de canje theme={"system"}
    {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "ES",
        "$addons": [
            "es-verifactu-v1"
        ],
        "type": "standard",
        "tax": {
            "tags": [
                "replacement"
            ]
        },
        "series": "FC",
        "issue_date": "2026-02-26",
        "currency": "EUR",
        "preceding": [
            {
                "type": "standard",
                "issue_date": "2026-02-20",
                "series": "FS",
                "code": "001"
            }
        ],
        "supplier": {
            "name": "Easor Software Solutions S.L.",
            "tax_id": {
                "country": "ES",
                "code": "B24830515"
            },
            "addresses": [
                {
                    "num": "532",
                    "street": "Avenida Diagonal",
                    "locality": "Barcelona",
                    "region": "Barcelona",
                    "code": "08006",
                    "country": "ES"
                }
            ]
        },
        "customer": {
            "name": "Cliente Ejemplo S.L.",
            "tax_id": {
                "country": "ES",
                "code": "B63272603"
            }
        },
        "lines": [
            {
                "quantity": "1",
                "item": {
                    "name": "Servicio de consultoría",
                    "price": "500.00"
                },
                "taxes": [
                    {
                        "cat": "VAT",
                        "rate": "general"
                    }
                ]
            }
        ]
    }
    ```

    After successful upload, you'll see the replacement invoice in the **Invoices** section with status `Empty`.
  </Step>

  <Step title="Send the Replacement Invoice to the VERI*FACTU invoice workflow">
    Send the replacement invoice to the VERI\*FACTU workflow using the [Create a job](/api-ref/transform/jobs/create-a-job-post) endpoint. Use:

    * `workflow_id`: use the Workflow ID of the *VERI\*FACTU invoice* workflow we created during setup
    * `silo_entry_id`: use the Silo Entry ID of the replacement invoice you've just uploaded.

    The replacement invoice's status will change to `Sent` when the workflow completes successfully.
  </Step>
</Steps>

## 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.

<Steps>
  <Step title="Add a cancel invoice workflow (only once)">
    To cancel an invoice, you need a workflow with the *Cancel invoice* step. You can start with the template below.

    <Tabs>
      <Tab title="Template">
        <Card title="VERI*FACTU cancel invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-verifactu-cancel" cta="Add to my workspace">
          This workflow will cancel a VERI\*FACTU document.
        </Card>
      </Tab>

      <Tab title="Code">
        Copy and paste into a new [Empty Party workflow](https://console.invopop.com/redirect/workflows/new?template=empty-party) code view.

        ```json Example VERI*FACTU cancel workflow theme={"system"}
        {
            "name": "VERI*FACTU cancel invoice",
            "description": "Cancel an invoice via VERI*FACTU",
            "schema": "bill/invoice",
            "steps": [
                {
                    "id": "2f897e30-3c9c-11f0-8690-a921c0418914",
                    "name": "Cancel invoice in VERI*FACTU",
                    "provider": "verifactu.cancel"
                },
                {
                    "id": "334ffc10-3c9c-11f0-8690-a921c0418914",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `void`{.state .void}",
                    "config": {
                        "state": "void"
                    }
                }
            ],
            "rescue": [
                {
                    "id": "384cfe20-3c9c-11f0-8690-a921c0418914",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `error`{.state .error}",
                    "config": {
                        "state": "error"
                    }
                }
            ]
        }

        ```
      </Tab>

      <Tab title="Build from scratch">
        Before starting, review the [workflows guide](/guides/features/workflows) to understand the general setup process.

        In [Console](https://console.invopop.com), create a new workflow and choose [Empty Invoice workflow](https://console.invopop.com/redirect/workflows/new?template=empty-invoice) as the base. Then name the workflow with a descriptive label such as "VERI\*FACTU Cancel Invoice".

        We recommend adding the following steps:

        1. **Cancel invoice** - Cancels the VERI\*FACTU document.
        2. **Set state** - select *Void* in the step configuration. This will set the state of the invoice to `Void`.
        3. 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.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Send to cancellation workflow">
    To cancel an invoice, simply send it to the VERI\*FACTU cancel invoice workflow created earlier using the [Create a job](/api-ref/transform/jobs/create-a-job-post) endpoint.

    The invoice's status will change to `Void` when the workflow completes successfully.
  </Step>
</Steps>

## FAQ

<AccordionGroup>
  <Accordion title="Should I send credit notes with positive or negative values?">
    You should send the credit note with the same sign as the original invoice.

    In Spain, unlike other countries, credit notes must be submitted to Hacienda with inverse values. Invopop handles this conversion automatically before transforming the credit note into a "factura rectificativa" (corrective invoice).

    This means you only need to send the credit note following international standards (with same sign as the invoice). Invopop will automatically adapt it when submitting to Hacienda.

    For reference, see the [GOBL Invoice](https://docs.gobl.org/draft-0/bill/invoice) documentation with `type` set to `credit-note`.
  </Accordion>

  <Accordion title="Where do I find Spain-specific GOBL documentation?">
    See the [Spain tax regime in GOBL](https://docs.gobl.org/regimes/es) for tax categories, NIF rules, and Spanish-specific extensions. Subsystem-specific addons live alongside: [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1), [`es-tbai-v1`](https://docs.gobl.org/addons/es-tbai-v1), [`es-facturae-v3`](https://docs.gobl.org/addons/es-facturae-v3).
  </Accordion>

  <Accordion title="When should I cancel invoices in VERI*FACTU?">
    In VERI\*FACTU, 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.
  </Accordion>

  <Accordion title="What should I do if an invoice is rejected by VERI*FACTU?">
    The response from VERI\*FACTU should contain all the details you need to be able to decide what changes need to be made to the [GOBL](https://docs.gobl.org) document in order to be processed correctly. Make the changes either via the Invopop API or console directly on the same document, and simply resend to the VERI\*FACTU workflow.

    Invopop will ensure that the correct substitution document is generated by checking previous attempts and including the correct codes in the new request.
  </Accordion>

  <Accordion title="Once a VERI*FACTU invoice is issued, can I get the QR code image url?">
    We do not provide the QR code image itself. The QR code is a visual representation of a URL that you need to generate on your own if you're creating custom PDFs or need it for any other purpose.

    The full requirements are in the AEAT [VERI\*FACTU QR specification](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) PDF document in Spanish. Here you can read that:

    > The "QR" code must have a size between 30x30 and 40x40 millimeters and follow the specifications of the ISO/IEC 18004:2015 standard. For the generation of the "QR" code, the M (medium) error correction level shall be used.

    Generate your own QR code image as follows:

    <Steps>
      <Step title="Obtain the VERI*FACTU URL">
        * **API**: fetch the entry and get `data -> head -> stamps -> verifactu-qr`.
        * **Console**: in the invoice entry click on the kebab `···` menu and select **View Headers**.
      </Step>

      <Step title="Generate the QR image">
        Use the VERI\*FACTU URL in a library capable of generating ISO/IEC 18004:2015 QR images (Invopop uses [go-qr](https://github.com/piglig/go-qr))
      </Step>

      <Step title="Store or use the image">
        Store or embed the image in your PDF. You can [see how we generate QR images](https://github.com/invopop/gobl.html/blob/main/components/images/images.go) in our open source gobl.html library.
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="What is the VERI*FACTU chain?">
    VERI\*FACTU requires every request to be linked with a fingerprint or hash. During the "Generate VERI\*FACTU" and "Cancel VERI\*FACTU" actions, Invopop will automatically find the last request made for the same supplier, and incorporate the chained data into the new request.

    Its important to understand the VERI\*FACTU focuses on requests, and not individual documents; a single invoice may have multiple entries in the chain if it has been processed multiple times due to incorrect details, cancellations, or substitutions.

    Invopop guarantees the chain is never broken using database transactions and retries in the case of collisions.
  </Accordion>

  <Accordion title="What are the most common errors when submitting invoices to VERI*FACTU?">
    The most common errors are related to format issues or invalid extensions, which are already handled in Invopop through the [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon validations. These prevent most of the typical problems before they reach the submission stage.

    Among the errors that aren't yet validated on our side, the five most frequent ones are:

    * `4104: Error en la cabecera: el valor del campo NIF del bloque ObligadoEmision no está identificado.` → The issuer's name must match what's registered for that NIF (tax ID).
    * `4102: El XML no cumple el esquema. Falta informar campo obligatorio.` → Usually occurs when a required field is missing in the XML, often within the Desglose (taxes) section.
    * `1110: El NIF no está identificado en el censo de la AEAT.` → The provided NIF (tax ID) isn't found in the AEAT registry (often due to typos or testing data).
    * `3000: Registro de facturación duplicado.` → Triggered when issuing the same invoice series/code twice.
    * `2001: El NIF del bloque Destinatarios no está identificado en el censo de la AEAT.` → Similar to 1110, but applies to the NIF (tax ID) of the customer.
  </Accordion>

  <Accordion title="In my VERI*FACTU's XML, DescripcionOperacion is being populated with line item descriptions, how do I change this?">
    You can set your own description using the notes object in the invoice. The key used for the description needs to be set to general. For example:

    ```
     "notes": [
            {
                "key": "general",
                "text": "This will appear as DescripcionOperacion"
            }
        ]
    ```

    We generate a default description if the note is not provided which is what you are currently seeing. This default description will neatly cut off before it reaches a length of 500 characters as that is the limit the AEAT imposes.
  </Accordion>

  <Accordion title="What $tags are supported in GOBL with the 'es-verifactu-v1' addon?">
    | Key                 | Text                                                         |
    | ------------------- | ------------------------------------------------------------ |
    | `reverse-charge`    | Reverse Charge / Inversión del sujeto pasivo.                |
    | `simplified-scheme` | Factura expedida por contribuyente en régimen simplificado.  |
    | `self-billed`       | Facturación por el destinatario.                             |
    | `travel-agency`     | Régimen especial de las agencias de viajes.                  |
    | `second-hand-goods` | Régimen especial de los bienes usados.                       |
    | `art`               | Régimen especial de los objetos de arte.                     |
    | `antiques`          | Régimen especial de las antigüedades y objetos de colección. |
    | `cash-basis`        | Régimen especial del criterio de caja.                       |
  </Accordion>
</AccordionGroup>

More available in our [Spain FAQ](/faq/spain) section

***

<AccordionGroup>
  <Accordion title="🇪🇸 Invopop resources for Spain">
    |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Compliance | <Icon icon="https://assets.invopop.com/flags/es.svg" /> [Invoicing compliance in Spain](/compliance/spain)<br /> <Icon icon="timeline" /> [Compliance timeline](/timelines/spain)                                                                                                                                                                                                                                                                                                                   |
    | Apps       | <Icon icon="https://assets.invopop.com/apps/gov-es/icon.svg" /> [Spain](/apps/spain)<br /> <Icon icon="https://assets.invopop.com/apps/verifactu/icon.svg" /> [VERI\*FACTU Spain](/apps/verifactu-spain)<br /><Icon icon="https://assets.invopop.com/apps/ticketbai/icon.svg" /> [TicketBAI Spain](/apps/ticketbai-spain)                                                                                                                                                                           |
    | Guides     | <Icon icon="book" /> [Facturae Guide](/guides/es-facturae)<br /><Icon icon="book" /> [VERI\*FACTU Invoicing Guide](/guides/es-verifactu)<br /><Icon icon="book" /> [VERI\*FACTU Supplier Onboarding](/guides/es-verifactu-supplier)<br /><Icon icon="book" /> [SII Invoicing Guide](/guides/es-sii)<br /><Icon icon="book" /> [SII Supplier Onboarding](/guides/es-sii-supplier)<br /><Icon icon="book" /> [TicketBAI Guide](/guides/es-ticketbai)                                                  |
    | FAQ        | <Icon icon="square-question" /> [Spain FAQ](/faq/spain)                                                                                                                                                                                                                                                                                                                                                                                                                                             |
    | GOBL       | <Icon icon="https://assets.invopop.com/icons/gobl.svg" />  [Spain Tax Regime](https://docs.gobl.org/regimes/es)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [VERI\*FACTU Addon](https://docs.gobl.org/addons/es-verifactu-v1)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [Facturae Addon](https://docs.gobl.org/addons/es-facturae-v3)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [SII Addon](https://docs.gobl.org/addons/es-sii-v1) |
    | GitHub     | <Icon icon="github" /> [gobl.facturae](https://github.com/invopop/gobl.facturae)<br /><Icon icon="github" /> [gobl.verifactu](https://github.com/invopop/gobl.verifactu)<br /> <Icon icon="github" /> [gobl.ticketbai](https://github.com/invopop/gobl.ticketbai)                                                                                                                                                                                                                                   |
  </Accordion>
</AccordionGroup>

<Card title="Participate in our community" icon="forumbee" href="https://community.invopop.com" arrow="true" horizontal>
  Ask and answer questions about invoicing in Spain →
</Card>
