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

# SII Invoicing guide

> Issue invoices in Spain with SII.

## Introduction

SII (Suministro Inmediato de Información) is a fiscal initiative by the Spanish Tax Agency (AEAT) that requires large businesses to report invoices through certified software. The system records issued and received invoices.

<Note>
  SII is mandatory for companies that meet certain requirements. Companies reporting with VERI\*FACTU or TicketBAI are exempt from reporting with SII.

  Invopop provides a foundational implementation for SII with limitations, please check the current [implementation scope](/apps/spain#limitations) for more information.
</Note>

## Prerequisites

To issue your first SII invoice, you must have registered at least one supplier. Make sure you read and implemented the [SII supplier onboarding guide](/guides/es-sii-supplier) before continuing with this guide.

## Setup

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

<Tabs>
  <Tab title="Template">
    <Card title="SII issued invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-sii-record-issued" cta="Add to my workspace">
      This workflow will record an issued invoice in the SII system.
    </Card>
  </Tab>

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

    ```json Example SII issue invoice workflow theme={"system"}
    {
      "name": "SII issue invoice",
      "description": "Record an issued invoice with SII and generate PDF",
      "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 · SII · 000001",
          "config": {
            "name": "SII",
            "padding": 6,
            "start": 1
          }
        },
        {
          "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
          "name": "Sign envelope",
          "provider": "silo.close"
        },
        {
          "id": "61661540-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Record issued invoice in SII",
          "provider": "gov-es.sii.record.issued"
        },
        {
          "id": "65312700-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Generate PDF",
          "provider": "pdf",
          "summary": "Spanish · A4",
          "config": {
            "date_format": "%Y-%m-%d",
            "layout": "A4",
            "locale": "es",
            "logo_height": 60
          }
        },
        {
          "id": "6abb4de0-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `sent`{.state .sent}",
          "config": {
            "state": "sent"
          }
        }
      ],
      "rescue": [
        {
          "id": "798b1d00-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `error`{.state .error}",
          "config": {
            "state": "error"
          }
        }
      ]
    }
    ```
  </Tab>

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

    1. **Set state** - Select `Processing`. This initial state marks the document as being processed.
    2. **Add sequential code** - Use a `Dynamic` series with a name like "SII".
    3. **Sign envelope** - Signs the document.
    4. **Record issued invoice in SII** - Records the issued invoice in SII.
    5. **Generate PDF** - Creates the PDF invoice with the required QR code.
    6. **Set state** - Select `Sent`. This final state marks the document as being sent.

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

You can also add a new workflow to your workspace to record received invoices, if you plan to report those to SII:

<Tabs>
  <Tab title="Template">
    <Card title="SII received invoice workflow" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=es-sii-record-received" cta="Add to my workspace">
      This workflow will record a received invoice in the SII system.
    </Card>
  </Tab>

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

    ```json Example SII record received invoice workflow theme={"system"}
    {
      "name": "SII record received invoice",
      "description": "Record a received invoice with SII",
      "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 · SII · 000001",
          "config": {
            "name": "SII",
            "padding": 6,
            "start": 1
          }
        },
        {
          "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
          "name": "Sign envelope",
          "provider": "silo.close"
        },
        {
          "id": "61661540-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Record received invoice in SII",
          "provider": "gov-es.sii.record.received"
        },
        {
          "id": "6abb4de0-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `sent`{.state .sent}",
          "config": {
            "state": "sent"
          }
        }
      ],
      "rescue": [
        {
          "id": "798b1d00-bc8f-11ef-8ca1-573cbe7db4cd",
          "name": "Set state",
          "provider": "silo.state",
          "summary": "Set state to `error`{.state .error}",
          "config": {
            "state": "error"
          }
        }
      ]
    }
    ```
  </Tab>

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

    1. **Set state** - Select `Processing`. This initial state marks the document as being processed.
    2. **Add sequential code** - Use a `Dynamic` series with a name like "SII".
    3. **Sign envelope** - Signs the document.
    4. **Record received invoice in SII** - Records the received invoice in SII.
    5. **Generate PDF** - Creates the PDF invoice with the required QR code.
    6. **Set state** - Select `Sent`. This final state marks the document as being sent.

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

Keep each `Workflow ID` at hand, you'll use them later.

<Info>
  SII allows for document modifications after submission. If a document is rejected or contains errors, update the GOBL details and resubmit to the same workflow.
</Info>

## Issue an Invoice

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

    * Add the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-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 Standard 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.

        Notice:

        * the minimal version (`sii-b2c.min.mdx`) contains only the essential fields required to create the simplified invoice,
        * to create a simplified SII invoice, include the `simplified` tag in your GOBL document with the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon,
        * when running `gobl build`, the system automatically calculates totals, assigns the `$regime` to `ES`, sets the [`es-sii-doc-type`](https://docs.gobl.org/addons/es-sii-v1#invoice-type) extension to `F2` (Simplified invoice), applies the standard VAT rate (21%), and normalizes all fields,
        * the built version (`sii-b2c.mdx`) shows the normalized document with calculated totals, line item sums, tax breakdowns, and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2C Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "$tags": [
              "simplified"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "rate": "general"
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"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-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-sii-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.

        Notice:

        * the minimal version (`sii-b2b.min.mdx`) contains only the essential fields required to create the standard B2B invoice,
        * to create a regular SII invoice, include the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon and ensure the `customer` field contains valid tax identification details,
        * the `supplier` must be previously registered with the tax authority and the `customer` NIF or VAT ID must be valid,
        * when running `gobl build`, the system automatically calculates totals, assigns the `$regime` to `ES`, sets the [`es-sii-doc-type`](https://docs.gobl.org/addons/es-sii-v1#invoice-type) extension to `F1` (Standard invoice), applies the standard VAT rate (21%), and normalizes all fields,
        * the built version (`sii-b2b.mdx`) shows the normalized document with calculated totals, line item sums, tax breakdowns, and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2B Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "ES",
                "code": "B63272603"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "rate": "general"
                  }
                ]
              }
            ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"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-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-sii-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="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.

        Notice:

        * the minimal version (`sii-b2b-services-eu.min.mdx`) contains only the essential fields required to create the reverse charge invoice,
        * to create a reverse charge SII invoice, use the tax key `reverse-charge` in your invoice lines,
        * you also need to set the items `key` to `services`, which will generate a breakdown by operation type required for this type of invoices,
        * 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 with the tax authority and the `customer` VAT ID must be valid and registered in the EU VIES system,
        * when running `gobl build`, the system automatically sets the operation type to `S2` (Subject and Not Exempt - With reverse charge) when reporting the document to SII, applies the reverse charge tax treatment, and normalizes all fields,
        * the built version (`sii-b2b-services-eu.mdx`) shows the normalized document with the reverse charge configuration, operation type breakdown, and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2B Invoice Services (EU) theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "DE",
                "code": "111111125"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "key": "services",
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "key": "reverse-charge"
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "DE",
          			"code": "111111125"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"key": "services",
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "reverse-charge",
          					"ext": {
          						"es-sii-product": "services",
          						"es-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "reverse-charge",
          							"ext": {
          								"es-sii-product": "services",
          								"es-sii-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.

        Notice:

        * the minimal version (`sii-b2b-goods-eu.min.mdx`) contains only the essential fields required to create the intra-community supply invoice,
        * to create an intra-community supply SII invoice, use the tax key `intra-community` in your invoice lines,
        * you also need to set the items `key` to `goods`, which will report to SII a breakdown by operation type required for this type of invoices,
        * 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 with the tax authority and the `customer` VAT ID must be valid and registered in the EU VIES system,
        * when running `gobl build`, the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon automatically sets the [`es-sii-exempt`](https://docs.gobl.org/addons/es-sii-v1#exemption-reason) extension to `E5` ([Artículo 25 Ley de IVA](https://www.boe.es/eli/es/l/1992/12/28/37/con#a25)) and the [`es-sii-regime`](https://docs.gobl.org/addons/es-sii-v1#special-regime-or-relevance-key) extension to `02` (Export),
        * the built version (`sii-b2b-goods-eu.mdx`) shows the normalized document with the intra-community configuration, exemption codes, operation type breakdown, and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2B Invoice Goods (EU) theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "DE",
                "code": "111111125"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "key": "goods",
                  "name": "Goods",
                  "price": "90.00"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "key": "intra-community",
                    "ext": {
                      "es-sii-regime": "02"
                    }
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "DE",
          			"code": "111111125"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"key": "goods",
          				"name": "Goods",
          				"price": "90.00"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "intra-community",
          					"ext": {
          						"es-sii-exempt": "E5",
          						"es-sii-product": "goods",
          						"es-sii-regime": "02"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "intra-community",
          							"ext": {
          								"es-sii-exempt": "E5",
          								"es-sii-product": "goods",
          								"es-sii-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 intra-community"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

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

        Notice:

        * the minimal version (`sii-b2b-services-no-eu.min.mdx`) contains only the essential fields required to create the outside scope invoice,
        * to create an outside scope SII invoice, use the tax key `outside-scope` in your invoice lines,
        * 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,
        * when running `gobl build`, the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon automatically sets the [`es-sii-oot`](https://docs.gobl.org/addons/es-sii-v1#type-of-operation-outside-scope) extension to `location` and normalizes all fields,
        * the built version (`sii-b2b-services-no-eu.mdx`) shows the normalized document with the outside scope configuration and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json Built example theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "SG",
                "code": "201312345A"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "key": "services",
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "key": "outside-scope"
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "SG",
          			"code": "201312345A"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"key": "services",
          				"name": "Development services",
          				"price": "90.00",
          				"unit": "h"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "outside-scope",
          					"ext": {
          						"es-sii-outside-scope": "location",
          						"es-sii-product": "services",
          						"es-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "outside-scope",
          							"ext": {
          								"es-sii-outside-scope": "location",
          								"es-sii-product": "services",
          								"es-sii-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 No EU Client (Export)">
        Export invoices are used for B2B goods delivered to customers outside the EU.

        Notice:

        * the minimal version (`sii-b2b-goods-no-eu.min.mdx`) contains only the essential fields required to create the export invoice,
        * to create an export SII invoice, use the tax key `export` in your invoice lines,
        * 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,
        * when running `gobl build`, the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon automatically sets the [`es-sii-exempt`](https://docs.gobl.org/addons/es-sii-v1#exemption-reason) extension to `E2` ([Artículo 21 Ley de IVA](https://www.boe.es/eli/es/l/1992/12/28/37/con#a21)) and the [`es-sii-regime`](https://docs.gobl.org/addons/es-sii-v1#special-regime-or-relevance-key) extension to `02` (Export),
        * the built version (`sii-b2b-goods-no-eu.mdx`) shows the normalized document with the export configuration, exemption codes, and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2B Invoice Goods (No EU) theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "SG",
                "code": "201312345A"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "key": "goods",
                  "name": "Goods",
                  "price": "90.00"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "key": "export"
                  }
                ]
              }
            ],
            "notes": [
              {
                "key": "general",
                "text": "This is a sample invoice with an export"
              }
            ]
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "ES",
          	"$addons": [
          		"es-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"customer": {
          		"name": "Sample Consumer",
          		"tax_id": {
          			"country": "SG",
          			"code": "201312345A"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "20",
          			"item": {
          				"key": "goods",
          				"name": "Goods",
          				"price": "90.00"
          			},
          			"sum": "1800.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "export",
          					"ext": {
          						"es-sii-exempt": "E2",
          						"es-sii-product": "goods",
          						"es-sii-regime": "02"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "export",
          							"ext": {
          								"es-sii-exempt": "E2",
          								"es-sii-product": "goods",
          								"es-sii-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 an export"
          		}
          	]
          }
          ```
        </CodeGroup>
      </Accordion>

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

        Notice:

        * the minimal version (`sii-exempt-E1.min.mdx`) contains only the essential fields required to create the exempt E1 invoice,
        * to create an exempt E1 SII invoice, use the tax key `exempt` in your invoice lines,
        * 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,
        * when running `gobl build`, the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon automatically sets the [`es-sii-exempt`](https://docs.gobl.org/addons/es-sii-v1#exemption-reason) extension to `E1` and normalizes all fields,
        * the built version (`sii-exempt-E1.mdx`) shows the normalized document with the exempt E1 configuration and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2B Exempt E1 Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                "country": "ES",
                "code": "B63272603"
              }
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "key": "exempt"
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"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-sii-exempt": "E1",
          						"es-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "exempt",
          							"ext": {
          								"es-sii-exempt": "E1",
          								"es-sii-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.

        Notice:

        * the minimal version (`sii-b2c-oss.min.mdx`) contains only the essential fields required to create the OSS invoice,
        * to create an OSS SII invoice, include the `simplified` tag in your GOBL document with the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon,
        * 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 with the tax authority and enrolled in the OSS scheme,
        * when running `gobl build`, the invoice will be treated as a simplified invoice ([`es-sii-doc-type`](https://docs.gobl.org/addons/es-sii-v1#invoice-type) extension set to `F2`) and VAT is accounted for through the OSS scheme in the destination country,
        * the built version (`sii-b2c-oss.mdx`) shows the normalized document with the OSS configuration and automatically generated fields, and,
        * there are no totals or calculations in the minimal version; all these will be made automatically when uploading.

        <CodeGroup>
          ```json SII B2C One Stop Shop Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-v1"
            ],
            "$tags": [
              "simplified"
            ],
            "series": "SAMPLE",
            "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"
                }
              ],
              "emails": [
                {
                  "addr": "billing@example.com"
                }
              ]
            },
            "lines": [
              {
                "quantity": "20",
                "item": {
                  "name": "Development services",
                  "price": "90.00",
                  "unit": "h"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "rate": "general"
                  }
                ]
              }
            ],
            "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-sii-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-04-20",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-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"
          			}
          		],
          		"emails": [
          			{
          				"addr": "billing@example.com"
          			}
          		]
          	},
          	"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-sii-regime": "01"
          					}
          				}
          			],
          			"total": "1800.00"
          		}
          	],
          	"totals": {
          		"sum": "1800.00",
          		"total": "1800.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"ext": {
          								"es-sii-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="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** reported as a tax to SII. Hotels declare it directly to the Generalitat through the quarterly Modelo 950.

        Notice:

        * model the IEET as a document-level [`charge`](https://docs.gobl.org/draft-0/bill/invoice#charge) with `key: "tax"`, which keeps it out of the VAT base while still appearing as a separate line on the guest's invoice as required by Art. 35 of Llei 5/2017,
        * do not model the IEET as a `VAT` tax line — it is a fixed amount per night, not a percentage, and the AEAT does not collect it,
        * the `reason` field on the charge is what the guest sees on the invoice; include the establishment type, location, nights, and rate so the breakdown is unambiguous,
        * accommodation is invoiced with reduced VAT (10%) on the room base; the IEET charge is added on top of `total_with_tax` to produce `payable`,
        * the quarterly Modelo 950 to the Generalitat is independent of individual invoices, but structuring the IEET as a typed charge lets hotels query their GOBL invoices for the data they need to file it.

        <CodeGroup>
          ```json B2C Hotel + IEET (Catalonia tourist tax) theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "$addons": [
              "es-sii-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"
                }
              ]
            },
            "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-sii-v1"
          	],
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SAMPLE",
          	"issue_date": "2026-05-06",
          	"currency": "EUR",
          	"tax": {
          		"ext": {
          			"es-sii-doc-type": "F2"
          		}
          	},
          	"supplier": {
          		"name": "Hotel Barcelona Example SL",
          		"tax_id": {
          			"country": "ES",
          			"code": "B85905495"
          		},
          		"addresses": [
          			{
          				"locality": "Barcelona",
          				"code": "08001",
          				"country": "ES"
          			}
          		]
          	},
          	"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-sii-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-sii-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/kmjN6VjbHoCg_sxn/assets/guides/es-sii-invoice-1.png?fit=max&auto=format&n=kmjN6VjbHoCg_sxn&q=85&s=4ce6a9d7c1bfe24d29fcf3bc70f42d4e" alt="Empty invoice" data-path="assets/guides/es-sii-invoice-1.png" />
    </Frame>
  </Step>

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

    * `workflow_id`: use the Workflow ID of the *SII issue invoice* workflow created on 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/kmjN6VjbHoCg_sxn/assets/guides/es-sii-invoice-2.png?fit=max&auto=format&n=kmjN6VjbHoCg_sxn&q=85&s=bec15d9767098e62404b37af104dcaba" alt="Sent invoice" data-path="assets/guides/es-sii-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.
  </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](https://docs.gobl.org/draft-0/bill/invoice#type-values) 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:

    * Add the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-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 SII Credit Note theme={"system"}
    {
      "$schema": "https://gobl.org/draft-0/bill/invoice",
      "$addons": [
        "es-sii-v1"
      ],
      "type": "credit-note",
      "series": "CN",
      "preceding": [
        {
          "type": "standard",
          "issue_date": "2025-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"
          }
        ],
        "emails": [
          {
            "addr": "billing@example.com"
          }
        ]
      },
      "customer": {
        "name": "Sample Consumer",
        "tax_id": {
          "country": "ES",
          "code": "B63272603"
        }
      },
      "lines": [
        {
          "quantity": "20",
          "item": {
            "name": "Development services",
            "price": "90.00",
            "unit": "h"
          },
          "taxes": [
            {
              "cat": "VAT",
              "rate": "general"
            }
          ]
        }
      ],
      "notes": [
        {
          "key": "general",
          "text": "This is a sample invoice with a standard tax"
        }
      ]
    }
    ```

    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="Related: credit note">
      <img width="600" src="https://mintcdn.com/invopop/kmjN6VjbHoCg_sxn/assets/guides/es-sii-invoice-cn.png?fit=max&auto=format&n=kmjN6VjbHoCg_sxn&q=85&s=2c9eb41e10a046d259720416cff31354" alt="Empty invoice" data-path="assets/guides/es-sii-invoice-cn.png" />
    </Frame>
  </Step>

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

    * `workflow_id`: use the Workflow ID of the *SII issued invoice* workflow we created during setup
    * `silo_entry_id`: use the The Silo Entry ID of the credit note you've just uploaded.

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

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

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

    * `regime`: `ES`
    * Add the [`es-sii-v1`](https://docs.gobl.org/addons/es-sii-v1) addon
    * `supplier_id`: use the same supplier details as in the original invoice
    * `type`: `corrective`
    * `preceding`: references the original invoice, within it, you must include:
      * `uuid`: the UUID of the original invoice (optional but recommended)
      * `type`: type of the original invoice
      * `issue_date`: the date of the original invoice
      * `series`: the series of the original invoice
      * `code`: the code of the original invoice
      * `tax`: the tax section of the original invoice, you can copy it from the original invoice

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

    ```json SII Corrective Invoice theme={"system"}
    {
      "$schema": "https://gobl.org/draft-0/bill/invoice",
      "$addons": [
        "es-sii-v1"
      ],
      "type": "corrective",
      "series": "CO",
      "preceding": [
        {
          "type": "standard",
          "issue_date": "2024-11-13",
          "series": "SAMPLE",
          "code": "004",
          "tax": {
            "categories": [
              {
                "code": "VAT",
                "rates": [
                  {
                    "key": "standard",
                    "ext": {
                      "es-sii-regime": "01"
                    },
                    "base": "1800.00",
                    "percent": "21.0%"
                  }
                ]
              }
            ]
          }
        }
      ],
      "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"
          }
        ],
        "emails": [
          {
            "addr": "billing@example.com"
          }
        ]
      },
      "customer": {
        "name": "Sample Consumer",
        "tax_id": {
          "country": "ES",
          "code": "B63272603"
        }
      },
      "lines": [
        {
          "quantity": "20",
          "item": {
            "name": "Development services",
            "price": "90.00",
            "unit": "h"
          },
          "taxes": [
            {
              "cat": "VAT",
              "rate": "general"
            }
          ]
        }
      ],
      "notes": [
        {
          "key": "general",
          "text": "This is a sample invoice with a standard tax"
        }
      ]
    }
    ```

    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="Related: corrective invoice">
      <img width="600" src="https://mintcdn.com/invopop/kmjN6VjbHoCg_sxn/assets/guides/es-sii-invoice-cn.png?fit=max&auto=format&n=kmjN6VjbHoCg_sxn&q=85&s=2c9eb41e10a046d259720416cff31354" alt="Empty invoice" data-path="assets/guides/es-sii-invoice-cn.png" />
    </Frame>
  </Step>

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

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

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

## Record a Received Invoice

<Steps>
  <Step title="Upload a Received Invoice">
    Use the [Create an entry](/api-ref/silo/entries/create-an-entry-put) endpoint to upload the received 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:

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

    You can copy the example invoice below as a reference. Note that any invoice type from the previous sections (issued invoices) could also be used, as well as credit notes, by simply swapping the `supplier` and `customer` fields.

    <AccordionGroup>
      <Accordion title="B2B Standard Received Invoice">
        This is a standard B2B invoice received from a supplier where:

        * The supplier is the business that has issued the invoice to you.
        * The customer is your business (previously registered).

        ```json SII B2B Received Invoice theme={"system"}
        {
          "$schema": "https://gobl.org/draft-0/bill/invoice",
          "$addons": [
            "es-sii-v1"
          ],
          "series": "SAMPLE",
          "supplier": {
            "name": "Sample Supplier",
            "tax_id": {
              "country": "ES",
              "code": "B63272603"
            }
          },
          "customer": {
            "name": "Invopop S.L.",
            "tax_id": {
              "country": "ES",
              "code": "B85905495"
            },
            "addresses": [
              {
                "num": "42",
                "street": "Calle Pradillo",
                "locality": "Madrid",
                "region": "Madrid",
                "code": "28002",
                "country": "ES"
              }
            ],
            "emails": [
              {
                "addr": "billing@example.com"
              }
            ]
          },
          "lines": [
            {
              "quantity": "20",
              "item": {
                "name": "Development services",
                "price": "90.00",
                "unit": "h"
              },
              "taxes": [
                {
                  "cat": "VAT",
                  "rate": "general"
                }
              ]
            }
          ]
        }
        ```
      </Accordion>
    </AccordionGroup>

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

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

    * `workflow_id`: use the Workflow ID of the *SII received invoice* workflow created on 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.

    You can verify that the PDF was generated by clicking on the invoice and selecting the PDF from the "Files" tab.
  </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="What is the deadline for submitting invoices to SII?">
    Issued invoices must be reported within 4 calendar days from the date of issuance — and always before the 16th day of the month following the one in which the VAT liability arises. Saturdays, Sundays, and national holidays are excluded from the count. Received invoices follow the same 4-day rule but starting from the date the invoice is recorded in the books.
  </Accordion>

  <Accordion title="How do I correct an invoice already submitted to SII?">
    SII corrections are submitted as modification records (`A1`) referencing the original entry, rather than by deleting and re-sending. In practice, after fixing the underlying [GOBL](https://docs.gobl.org) document, run the SII workflow again — Invopop detects that a previous submission exists for the same invoice and emits the modification record automatically.
  </Accordion>
</AccordionGroup>

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

***

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

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