Skip to main content

Introduction

Facturae is Spainโ€™s official XML invoice format for Business-to-Government (B2G) transactions. The current version is Facturae 3.2.2, and invoices are submitted to public administrations through the FACe platform. Facturae is required when invoicing any Spanish public administration body (central government, regional governments, local councils, etc.). Unlike other Spanish tax reporting systems (VERI*FACTU, SII), Facturae does not require supplier registration โ€” you simply generate the XML and submit it.

Prerequisites

To generate Facturae invoices, ensure you have:
  • An invoice with:
    • Supplier details (company name, tax ID, full address). Check the Spanish regime for specifics.
    • Line items with name, price, and applicable taxes.

Facturae Setup

To generate Facturae invoices, follow these instructions in the Invopop Console:
1

Connect the Spain app

  1. Navigate to Configuration โ†’ Apps.
  2. Locate Spain in the app discovery list.
  3. Click Connect to activate.
No additional configuration is needed.
2

Configure invoice workflow

Facturae Generate Invoice

This workflow will generate a Facturae XML document.

Administrative Centers (DIR3 Codes)

When invoicing Spanish public administrations via FACe, you must include three administrative centers identified by their DIR3 codes. Each public body publishes these codes in the DIR3 directory.
The three required roles and their corresponding GOBL fields are:
Facturae RoleCodeGOBL Field
Oficina Contable (Accounting Office)01customer.identities[] with scope: "tax"
ร“rgano Gestor (Managing Body)02delivery.receiver.identities[0]
Unidad Tramitadora (Processing Unit)03ordering.buyer.identities[0]
See the FACe example below for a complete invoice with all three administrative centers.

Running

Use the following example GOBL documents to generate Facturae invoices.
A standard Facturae invoice from a Spanish supplier to a Spanish business customer.Notice:
  • the es-facturae-v3 addon is required,
  • the es-facturae-doc-type and es-facturae-invoice-class tax extensions must be set,
  • both supplier and customer must have full address details and valid Spanish tax IDs.
Facturae B2G Invoice
A corrective invoice (credit note) referencing a previous Facturae invoice.Notice:
  • the type is set to credit-note,
  • a preceding entry references the original invoice with the es-facturae-correction code,
  • the es-facturae-invoice-class is set to OR (rectificativa).
Facturae Credit Note
An invoice addressed to a public administration via the FACe platform, including the three required DIR3 administrative centers.Notice:
  • the customer includes an identity with scope: "tax" for the Oficina Contable (DIR3 code 01),
  • delivery.receiver includes the ร“rgano Gestor identity (DIR3 code 02),
  • ordering.buyer includes the Unidad Tramitadora identity (DIR3 code 03),
  • each public body publishes their DIR3 codes โ€” look them up in the DIR3 directory.
Facturae FACe Invoice (B2G with Admin Centers)
In your invoice data, make sure to include the es-facturae-v3 addon and set the regime to ES.
Once you have saved in Invopop, select Run workflow and select โ€œFacturae Generate Invoiceโ€ from the sidebar.

Spain FAQ

Find answers to frequently asked questions about invoicing in Spain โ†’

Participate in our community

Ask and answer questions about invoicing in Spain โ†’