> ## Documentation Index
> Fetch the complete documentation index at: https://invopop-fi-party-endpoints.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VERI*FACTU invoicing guide

> Issue invoices in Spain with VERI*FACTU.

export const WorkflowDiagram = ({workflow}) => {
  const stateColors = {
    processing: "yellow",
    sent: "blue",
    received: "blue",
    registered: "green",
    completed: "green",
    error: "red"
  };
  const StateChip = ({state, label}) => <Badge size="sm" color={stateColors[state] || "gray"} icon="square-small" iconType="solid">
      {label.charAt(0).toUpperCase() + label.slice(1)}
    </Badge>;
  const providerIcons = {
    "silo.state": "https://silo.invopop.com/images/status.svg",
    "silo.close": "https://silo.invopop.com/images/check-badge.svg",
    "silo.if": "https://assets.invopop.com/apps/silo/if.svg",
    "silo.folder": "https://silo.invopop.com/images/folder.svg",
    "silo.modify": "https://silo.invopop.com/images/modify.svg",
    "silo.correct": "https://silo.invopop.com/images/replace.svg",
    "silo.sleep": "https://assets.invopop.com/icons/sleep.svg",
    silo: "https://assets.invopop.com/apps/silo/icon.svg",
    "sequence.enumerate": "https://sequence.invopop.com/images/enumerate.svg",
    "transform.job.create": "https://transform.invopop.com/images/jobs.svg",
    webhook: "https://webhook.invopop.com/icon.svg",
    lookup: "https://lookup.invopop.com/icon.png",
    dropbox: "https://dropbox.invopop.com/icon.png",
    pdf: "https://pdf.invopop.com/file-pdf.svg",
    peppol: "https://assets.invopop.com/apps/peppol/icon.svg",
    ubl: "https://assets.invopop.com/apps/ubl/logo.svg",
    cii: "https://assets.invopop.com/apps/cii/logo.svg",
    "gov-dk": "https://assets.invopop.com/flags/dk.svg",
    "gov-fi": "https://assets.invopop.com/flags/fi.svg",
    "gov-fr": "https://assets.invopop.com/flags/fr.svg",
    "chorus-pro": "https://assets.invopop.com/apps/chroruspro/icon.svg",
    "gov-es": "https://assets.invopop.com/apps/gov-es/icon.svg",
    "gov-es.sii": "https://assets.invopop.com/apps/sii/icon.svg",
    "gov-es.ticketbai": "https://assets.invopop.com/apps/ticketbai/icon.svg",
    "gov-es.facturae": "https://assets.invopop.com/apps/facturae/icon.svg",
    verifactu: "https://assets.invopop.com/apps/verifactu/icon.svg",
    "gov-pl": "https://assets.invopop.com/apps/ksef/icon.svg",
    "gov-sa": "https://assets.invopop.com/apps/zatca/icon.svg",
    "gov-ar": "https://assets.invopop.com/apps/arca/icon.svg",
    "at-pt": "https://assets.invopop.com/apps/at-pt/icon.svg",
    "sat-mx": "https://assets.invopop.com/apps/sat-mexico/icon.svg",
    "sw-sapien": "https://assets.invopop.com/apps/sw-sapien/icon.svg",
    "sdi-it": "https://assets.invopop.com/apps/sdi-italy/icon.svg",
    "ticket-it": "https://assets.invopop.com/apps/agenzia-entrate/icon.svg",
    "nfe-br": "https://assets.invopop.com/apps/notas-fiscais-eletronicas-brazil/icon.svg",
    chargebee: "https://assets.invopop.com/apps/chargebee/icon.svg",
    stripe: "https://assets.invopop.com/apps/stripe/icon.svg",
    email: "https://assets.invopop.com/apps/email/icon.svg",
    cron: "https://assets.invopop.com/apps/cron/icon.svg",
    ilyda: "https://assets.invopop.com/apps/ilyda/icon.svg",
    invoicexpress: "https://assets.invopop.com/apps/invoicexpress/icon.svg",
    plemsi: "https://assets.invopop.com/flags/co.svg"
  };
  const iconFor = provider => {
    const parts = (provider || "").split(".");
    for (let i = parts.length; i > 0; i--) {
      const url = providerIcons[parts.slice(0, i).join(".")];
      if (url) return url;
    }
    return null;
  };
  const StepIcon = ({provider}) => {
    const url = iconFor(provider);
    return <span title={provider} className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-gray-950/10 bg-white dark:border-white/10 dark:bg-white/5">
        {url ? <img src={url} alt="" className="h-4 w-4" /> : null}
      </span>;
  };
  const renderSummary = summary => {
    const nodes = [];
    const re = /`([^`]+)`(\{[^}]*\})?/g;
    let last = 0;
    let m;
    let k = 0;
    while ((m = re.exec(summary)) !== null) {
      if (m.index > last) nodes.push(summary.slice(last, m.index));
      const attrs = m[2] || "";
      if (attrs.indexOf(".state") >= 0) {
        const state = (attrs.match(/\.state\s+\.([\w-]+)/) || [])[1] || m[1];
        nodes.push(<StateChip key={k++} state={state} label={m[1]} />);
      } else if (attrs) {
        nodes.push(<span key={k++} className="text-sm font-medium text-gray-700 dark:text-gray-300">
            {m[1]}
          </span>);
      } else {
        nodes.push(<code key={k++} className="text-sm rounded bg-gray-100 px-1 font-mono text-sm dark:bg-white/10">
            {m[1]}
          </code>);
      }
      last = m.index + m[0].length;
    }
    if (last < summary.length) nodes.push(summary.slice(last));
    return nodes;
  };
  const NoteRow = ({text}) => <div className="mt-4 mb-1 font-mono text-sm leading-5 text-gray-400 dark:text-gray-500">{"// " + text}</div>;
  const renderSteps = (steps, counter) => (steps || []).map(step => {
    counter.n += 1;
    const n = counter.n;
    const branches = (step.next || []).filter(b => b.steps && b.steps.length > 0);
    return <div key={step.id || "step-" + n}>
          {step.notes ? <NoteRow text={step.notes} /> : null}
          <div className="mt-2.5 flex items-center">
            <span className="absolute left-0 w-10 text-center font-mono text-sm text-gray-400 select-none dark:text-gray-500">
              {n}
            </span>
            <div className="flex min-w-0 flex-1 items-center gap-2 rounded-xl border border-gray-950/5 bg-white px-2 py-2 dark:border-white/10 dark:bg-gray-900">
              <StepIcon provider={step.provider} />
              <span className="text-sm shrink-0 font-medium text-gray-900 dark:text-gray-100">{step.name}</span>
              {step.summary ? <span className="text-sm min-w-0 truncate text-gray-500 dark:text-gray-400">{renderSummary(step.summary)}</span> : null}
            </div>
          </div>
          {branches.length > 0 ? <div className="ml-5 border-l border-gray-200 -my-1 py-1 pl-6 dark:border-white/10">
              {branches.map((branch, bi) => <div key={branch.code || branch.status || bi}>
                  <div className="mt-4">
                    <span className="rounded-md bg-gray-200/70 px-2 py-1 font-mono text-sm text-gray-600 dark:bg-white/10 dark:text-gray-300">
                      {branch.code || branch.status}
                    </span>
                  </div>
                  {renderSteps(branch.steps, counter)}
                </div>)}
            </div> : null}
        </div>;
  });
  const counter = {
    n: 0
  };
  const wf = workflow || ({});
  return <div className="not-prose relative my-5 rounded-2xl border border-gray-950/5 bg-gray-50 py-3 pr-4 pb-5 pl-12 dark:border-white/10 dark:bg-white/[0.03]">
      {renderSteps(wf.steps, counter)}
      {wf.rescue && wf.rescue.length > 0 ? <div className="mt-6 border-t border-dashed border-gray-300 dark:border-white/10">
          <NoteRow text="If any step fails" />
          {renderSteps(wf.rescue, counter)}
        </div> : null}
    </div>;
};

export const esVerifactuCancelWorkflow = {
  "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"
    }
  }]
};

export const esVerifactuInvoiceWorkflow = {
  "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"
    }
  }]
};

## 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. Remaining taxpayers must comply 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 registered at least one supplier. Make sure you read and implemented the [VERI\*FACTU supplier registration guide](/guides/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.

<Card title="VERI*FACTU invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-verifactu-invoice" horizontal>
  Add to my workspace →
</Card>

<Tabs>
  <Tab title="Workflow">
    <WorkflowDiagram workflow={esVerifactuInvoiceWorkflow} />
  </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 VERI*FACTU issue 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>
</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>

<Prompt description="Have your agent issue a VERI*FACTU invoice in your sandbox." icon="file-invoice" actions={["copy", "cursor"]}>
  Read [https://docs.invopop.com/guides/es-verifactu.md](https://docs.invopop.com/guides/es-verifactu.md), [https://docs.invopop.com/guides/es-verifactu-supplier.md](https://docs.invopop.com/guides/es-verifactu-supplier.md) and [https://docs.gobl.org/addons/es-verifactu-v1.md](https://docs.gobl.org/addons/es-verifactu-v1.md). In my sandbox workspace, using the token in INVOPOP\_TOKEN and the workflow ID I give you, create a bill/invoice entry with $regime ES, $addons containing es-verifactu-v1, the pre-enabled sandbox supplier from the guide, and the lines I describe with taxes as the VAT category plus a rate key. Do not write totals or percentages and do not invent extension codes; start from one of the example invoices in the guide. Run the workflow with wait=30, then fetch the entry and report its state, the stamps in the envelope header, the attached XML and PDF, and any faults with their AEAT error codes explained using [https://docs.invopop.com/faq/spain.md](https://docs.invopop.com/faq/spain.md).
</Prompt>

## 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 to [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)">
        <CodeGroup>
          ```json Rectificativa por sustitución 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"
                      }
                  }
              ],
              "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"
                  }
              ]
          }
          ```

          ```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"
          	}
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Replacement invoice (factura de canje)">
        <CodeGroup>
          ```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"
                          }
                      ]
                  }
              ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-verifactu-v1"
          	],
          	"$tags": [
          		"replacement"
          	],
          	"type": "standard",
          	"series": "FC",
          	"issue_date": "2026-02-26",
          	"currency": "EUR",
          	"preceding": [
          		{
          			"type": "standard",
          			"issue_date": "2026-02-20",
          			"series": "FS",
          			"code": "001"
          		}
          	],
          	"tax": {
          		"ext": {
          			"es-verifactu-doc-type": "F3"
          		}
          	},
          	"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": [
          		{
          			"i": 1,
          			"quantity": "1",
          			"item": {
          				"name": "Servicio de consultoría",
          				"price": "500.00"
          			},
          			"sum": "500.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"rate": "general",
          					"percent": "21.0%",
          					"ext": {
          						"es-verifactu-op-class": "S1",
          						"es-verifactu-regime": "01"
          					}
          				}
          			],
          			"total": "500.00"
          		}
          	],
          	"totals": {
          		"sum": "500.00",
          		"total": "500.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-verifactu-op-class": "S1",
          								"es-verifactu-regime": "01"
          							},
          							"base": "500.00",
          							"percent": "21.0%",
          							"amount": "105.00"
          						}
          					],
          					"amount": "105.00"
          				}
          			],
          			"sum": "105.00"
          		},
          		"tax": "105.00",
          		"total_with_tax": "605.00",
          		"payable": "605.00"
          	}
          }
          ```
        </CodeGroup>
      </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-fi-party-endpoints/aZep6i9SAId6pOq3/assets/guides/es-verifactu-invoice-1.png?fit=max&auto=format&n=aZep6i9SAId6pOq3&q=85&s=7cf67cb7eab990db5316405ca26f89ac" 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-fi-party-endpoints/aZep6i9SAId6pOq3/assets/guides/es-verifactu-invoice-2.png?fit=max&auto=format&n=aZep6i9SAId6pOq3&q=85&s=815c8a31b7b1d4bee879aee676b69445" 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-fi-party-endpoints/aZep6i9SAId6pOq3/assets/guides/es-verifactu-example-pdf.png?fit=max&auto=format&n=aZep6i9SAId6pOq3&q=85&s=1fd63c3fb6d7a84554658c554513f88c" 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-fi-party-endpoints/aZep6i9SAId6pOq3/assets/guides/es-verifactu-invoice-cn.png?fit=max&auto=format&n=aZep6i9SAId6pOq3&q=85&s=cce40a08944f12c83ff98fd6a7764bcc" 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 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`: 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-fi-party-endpoints/aZep6i9SAId6pOq3/assets/guides/es-verifactu-invoice-corrective.png?fit=max&auto=format&n=aZep6i9SAId6pOq3&q=85&s=714d3e1647a4aa597cc38fb0d19fecf1" 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 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.

    <Card title="VERI*FACTU cancel invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-verifactu-cancel" horizontal>
      Add to my workspace →
    </Card>

    <Tabs>
      <Tab title="Workflow">
        <WorkflowDiagram workflow={esVerifactuCancelWorkflow} />
      </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 VERI*FACTU cancel invoice 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>
    </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.

    It's important to understand that 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>

  <Accordion title="How do I invoice a line with no VAT in Spain (exempt, not subject, reverse charge or 0%)?">
    In Spanish VAT there are several legally distinct reasons why a line carries no tax, and VERI\*FACTU requires you to state which one applies. In GOBL you do this with the `key` field of the line's tax combo. The [`es-verifactu-v1`](https://docs.gobl.org/addons/es-verifactu-v1) addon derives everything else from it.

    Pick the key that matches the reason there is no VAT:

    | Situation | `key` | Default extension set by the addon | When to use it |
    | - | - | - | - |
    | Exempt under art. 20 LIVA | `exempt` | `es-verifactu-exempt: E1` | Healthcare, education, financial and insurance services, residential rental, second-hand property, games of chance subject to the gaming tax, and the other domestic exemptions in art. 20. |
    | Exempt for another legal reason | `exempt` + `es-verifactu-exempt: E6` | — | Exemptions whose legal basis is outside arts. 20–25. Rare. |
    | Export of goods | `export` | `es-verifactu-exempt: E2`, `es-verifactu-regime: 02` | Goods leaving the EU, including shipments to the Canary Islands, Ceuta and Melilla. Set `E3` for supplies assimilated to exports (ships, aircraft, diplomatic missions) or `E4` for goods in free zones and customs warehouses. |
    | Intra-community supply of goods | `intra-community` | `es-verifactu-exempt: E5` | Goods transported to another EU member state for a customer with a valid VAT number in that state. |
    | Not subject – place of supply | `outside-scope` | `es-verifactu-op-class: N2` | Services to business customers established outside Spain, services localised in the Canary Islands, Ceuta or Melilla, goods that never enter Spain. |
    | Not subject – art. 7, 14 and others | `outside-scope` + `es-verifactu-op-class: N1` | — | Transfer of a going concern, free samples and low-value promotional items, compensation and penalties, refundable deposits, pass-through amounts collected for third parties. |
    | Domestic reverse charge | `reverse-charge` | `es-verifactu-op-class: S2` | Construction and rehabilitation works between businesses, scrap and waste metals, property transfers where the exemption is waived, B2B sales of phones, consoles and laptops to resellers. The invoice must state *Inversión del sujeto pasivo*. |

    Do not include `rate` or `percent` on any of these lines. None of these keys admits a rate, so a combo such as `key: exempt` with `rate: general` fails validation (`GOBL-TAX-COMBO-03`) before the invoice is sent. The addon also rejects a combo that carries both an operation class and an exemption code, and requires an operation class on any combo with a percent.

    **Examples**

    An exempt healthcare service:

    ```json theme={"system"}
    {
      "cat": "VAT",
      "key": "exempt"
    }
    ```

    An exempt operation with a legal basis outside art. 20:

    ```json theme={"system"}
    {
      "cat": "VAT",
      "key": "exempt",
      "ext": { "es-verifactu-exempt": "E6" }
    }
    ```

    Consulting for a business customer in Germany:

    ```json theme={"system"}
    {
      "cat": "VAT",
      "key": "outside-scope"
    }
    ```

    Late-payment interest charged to a Spanish customer:

    ```json theme={"system"}
    {
      "cat": "VAT",
      "key": "outside-scope",
      "ext": { "es-verifactu-op-class": "N1" }
    }
    ```

    Construction work for a Spanish business, with the customer self-assessing:

    ```json theme={"system"}
    {
      "cat": "VAT",
      "key": "reverse-charge"
    }
    ```

    The customer's tax ID does not change the classification: a line with `rate: standard` is taxed at 21% and marked `S1` even when the customer is German. The only automatic case is a tax combo whose `country` field is not `ES`, meaning you are charging another country's VAT on the line. The addon then marks it `N2` for VERI\*FACTU and drops any exemption code, because the operation is not subject to Spanish VAT.

    **Is there a 0% rate?**

    Not one you can use today. GOBL accepts `key: zero`, which classifies the line as subject and not exempt (`S1`) at 0%, but Spain has no 0% VAT rate in force: the temporary 0% on basic foodstuffs ended on 30 September 2024, and the AEAT validates the rate against the operation date and rejects 0% on later invoices. If your system has a product configured at 0%, it is almost certainly modelling one of the cases in the table above and should be mapped to that key instead.

    **Prepaid credit, gift cards and advances**

    These are not exempt and should not use any of the keys above. Credit that can only be spent on one kind of supply at a known rate is taxed when sold, as a normal `rate: standard` line. Credit that can be spent on goods or services at different rates is outside the scope of VAT when sold and is taxed on redemption instead; no invoice for a supply is issued at the time of the top-up. Advance payments for a specific future supply are taxed when received, at the rate of that supply.

    **Who decides which key applies?**

    The classification is a tax determination for the issuer and their advisor. GOBL validates that what you send is internally consistent and will be accepted by the AEAT, but it cannot tell you whether a given product is exempt, not subject or taxed. The same reason must also appear on the printed invoice: an exempt line needs a reference to its legal basis, and a reverse-charge line needs the *Inversión del sujeto pasivo* mention.
  </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 app)](/apps/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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.