Documentation Index
Fetch the complete documentation index at: https://invopop-kill-invoicexpress.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Description
- Limitations
- Actions
- Workflows
- Documents
- API Endpoints
TicketBAI Invoicing
SII Invoicing
Facturae
TicketBAI Suppliers
SII Suppliers
Tax ID Lookup
| Feature | TicketBAI | SII |
|---|---|---|
| Scope | Basque Country (รlava, Gipuzkoa, Bizkaia) | Rest of Spain (AEAT) |
| Workflow automation | Issue invoices and onboard suppliers | Report invoices and onboard suppliers |
| Compliant documents | XML generation and PDF with QR codes | Invoice reporting to AEAT via SII API (with limitations) |
| Supplier registration | Registration wizard and agreement signing | Registration wizard and agreement signing |
| White-label | Issue on behalf of clients or directly | Report on behalf of clients or directly |
| Tax ID verification | Via AEAT Lookup | Via AEAT Lookup |
SII implementation scope
Supported Registry Books
We currently support the two most commonly used VAT registry books:- Libro de Registro de Facturas Expedidas (Issued Invoices Registry)
- Libro de Registro de Facturas Recibidas (Received Invoices Registry) - with specific limitations
Unsupported Registry Books
The following VAT registry books are not supported at the moment:- Libro de Registro de Bienes de Inversiรณn (Investment Goods Registry)
- Libro de Registro de Determinadas Operaciones Intracomunitarias (Specific Intra-Community Operations Registry)
- Other registries such as cash payments (pagos en metรกlico), travel agency operations (operaciones de agencias de viajes), etc.
Received Invoices Limitations
When reporting to the Libro de Registro de Facturas Recibidas, the following key limitations apply:- Deductible VAT matching: The deductible VAT amount (cuota deducible) always equals the charged VAT amount (cuota repercutida). Invoices where the deductible VAT is lower than the charged VAT cannot be reported.
- Investment goods flag: Invoices cannot be marked as investment goods (bienes de inversiรณn) within the received invoices registry.
- Deduction period alignment: The deduction period must match the settlement period. Deduction periods that differ from the liquidation periods cannot be specified.
Regional Endpoints
Currently, only the AEAT (Agencia Estatal de Administraciรณn Tributaria) endpoint is supported for SII reporting. This covers businesses operating under the standard Spanish tax framework.Support for the Canary Islands, Navarra and the Basque Country regional endpoints is coming soon.Verify Spanish Tax ID (NIF/CIF)
Verify & Correct Tax Details
Generate Facturae XML
Send TicketBAI (Spain)
Generate TicketBAI (Spain)
Cancel TicketBAI Invoice
Register with TicketBAI
Wait for Upload TicketBAI
Wait for Approval TicketBAI
Unregister with TicketBAI
Record Issued Invoice with SII
Record Received Invoice with SII
Register with SII
Wait for Upload SII
Wait for Approval SII
Unregister with SII
TicketBAI issue invoice
TicketBAI issue invoice
{
"name": "TicketBAI issue invoice",
"description": "Send TicketBAI invoice and generate PDF with QR",
"schema": "bill/invoice",
"steps": [
{
"id": "dd319d60-8bc1-11ef-96af-b55bf69bb0b8",
"name": "Add Sequential Code",
"config": {
"name": "TicketBAI Invoice",
"start": 1,
"prefix": "F",
"padding": 6
},
"summary": "Dynamic ยท TicketBAI Invoice ยท F000001",
"provider": "sequence.enumerate"
},
{
"id": "ba77d5b0-7b3a-11ef-bffc-d9a10ebf9f89",
"name": "Set State",
"config": {
"state": "processing"
},
"summary": "Set state to `processing`{.state .processing}",
"provider": "silo.state"
},
{
"id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
"name": "Sign Envelope",
"provider": "silo.close"
},
{
"id": "fc618ea0-a757-11ef-8377-c15ac3014ffb",
"name": "Generate TicketBAI (Spain)",
"provider": "gov-es.ticketbai.generate"
},
{
"id": "0448df60-a758-11ef-8377-c15ac3014ffb",
"name": "Send TicketBAI (Spain)",
"provider": "gov-es.ticketbai.send"
},
{
"id": "c61adaa0-7b55-11ef-bffc-d9a10ebf9f89",
"name": "Generate PDF",
"config": {
"locale": "es",
"date_format": "%Y-%m-%d",
"logo_height": 40
},
"summary": "Spanish",
"provider": "pdf"
},
{
"id": "d8693d70-7b3a-11ef-bffc-d9a10ebf9f89",
"name": "Set State",
"config": {
"state": "sent"
},
"summary": "Set state to `sent`{.state .sent}",
"provider": "silo.state"
}
],
"rescue": [
{
"id": "dd889490-7b3a-11ef-bffc-d9a10ebf9f89",
"name": "Set State",
"config": {
"state": "error"
},
"summary": "Set state to `error`{.state .error}",
"provider": "silo.state"
}
]
}
TicketBAI cancel invoice
TicketBAI cancel invoice
{
"name": "TicketBAI cancel document",
"description": "Cancel a TicketBAI document and report it to the tax authority",
"schema": "bill/invoice",
"steps": [
{
"id": "2f897e30-3c9c-11f0-8690-a921c0418914",
"name": "Cancel TicketBAI (Spain)",
"provider": "gov-es.ticketbai.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"
}
}
]
}
TicketBAI register party
TicketBAI register party
{
"name": "TicketBAI supplier registration",
"description": "Enables suppliers to register for TicketBAI invoice generation",
"schema": "org/party",
"steps": [
{
"id": "554c7040-66d7-11f0-a392-dfb6c99d6698",
"name": "Register with TicketBAI",
"provider": "gov-es.ticketbai.register"
},
{
"id": "62148880-66d7-11f0-a392-dfb6c99d6698",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `processing`{.state .processing}",
"config": {
"state": "processing"
}
},
{
"id": "5b924600-66d7-11f0-a392-dfb6c99d6698",
"name": "Wait for Upload TicketBAI",
"provider": "gov-es.ticketbai.wait.upload"
},
{
"id": "6bec1080-66d7-11f0-a392-dfb6c99d6698",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `registered`{.state .registered}",
"config": {
"state": "registered"
}
},
{
"id": "670d1dc0-66d7-11f0-a392-dfb6c99d6698",
"name": "Wait for Approval TicketBAI",
"provider": "gov-es.ticketbai.wait.approval"
}
],
"rescue": [
{
"id": "76c13260-66d7-11f0-a392-dfb6c99d6698",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `error`{.state .error}",
"config": {
"state": "error"
}
}
]
}
TicketBAI unregister party
TicketBAI unregister party
{
"name": "TicketBAI unregister supplier",
"description": "Revokes invoice issuing entitlement for a TicketBAI supplier",
"schema": "org/party",
"steps": [
{
"id": "8a613610-67ba-11f0-bcaf-170efff782a9",
"name": "Unregister TicketBAI",
"provider": "gov-es.ticketbai.unregister"
},
{
"id": "96a6b0d0-67ba-11f0-bcaf-170efff782a9",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `void`{.state .void}",
"config": {
"state": "void"
}
}
],
"rescue": [
{
"id": "e8d2a6b0-67bb-11f0-bcaf-170efff782a9",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `error`{.state .error}",
"config": {
"state": "error"
}
}
]
}
Facturae generate invoice
Facturae generate invoice
SII issue invoice
SII issue invoice
{
"name": "SII issue invoice",
"description": "Report a SII record for an issued invoice to the AEAT and generate a 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"
}
}
]
}
SII record received invoice
SII record received invoice
{
"name": "SII record received invoice",
"description": "Generate SII record for a received invoice and send it to the AEAT",
"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"
}
}
]
}
SII register party
SII register party
{
"name": "SII register party",
"description": "Registers a party for SII reporting",
"schema": "org/party",
"steps": [
{
"id": "52f5d190-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Register party for SII reporting",
"provider": "gov-es.sii.register"
},
{
"id": "5bfc9c10-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `processing`{.state .processing}",
"config": {
"state": "processing"
}
},
{
"id": "627c94a0-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Wait for party upload for SII reporting",
"provider": "gov-es.sii.wait.upload"
},
{
"id": "6f84ea30-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `registered`{.state .registered}",
"config": {
"state": "registered"
}
},
{
"id": "78dabf10-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Wait for party approval for SII reporting",
"provider": "gov-es.sii.wait.approval"
}
],
"rescue": [
{
"id": "846415c0-831c-11f0-9ba3-7d4deb7b9d0e",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `rejected`{.state .rejected}",
"config": {
"state": "rejected"
}
},
{
"id": "d0e996c0-d9db-11f0-9b9a-5143ba8c831d",
"name": "Unregister party from SII reporting",
"provider": "gov-es.sii.unregister"
}
]
}
SII unregister party
SII unregister party
{
"name": "SII unregister party",
"description": "Revokes entitlement to report invoices to SII for a party",
"schema": "org/party",
"steps": [
{
"id": "8a613610-67ba-11f0-bcaf-170efff782a9",
"name": "Unregister party from SII reporting",
"provider": "gov-es.sii.unregister"
},
{
"id": "96a6b0d0-67ba-11f0-bcaf-170efff782a9",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `void`{.state .void}",
"config": {
"state": "void"
}
}
],
"rescue": [
{
"id": "e8d2a6b0-67bb-11f0-bcaf-170efff782a9",
"name": "Set State",
"provider": "silo.state",
"summary": "Set state to `error`{.state .error}",
"config": {
"state": "error"
}
}
]
}
Supplier
Supplier
{
"$schema": "https://gobl.org/draft-0/org/party",
"name": "Invopop S.L.",
"tax_id": {
"country": "ES",
"code": "B85905495"
},
"people": [
{
"name": {
"given": "Juan",
"surname": "Pรฉrez Gonzรกlez"
},
"identities": [
{
"key": "national",
"code": "123456789A"
}
],
"addresses": [
{
"num": "10",
"street": "Calle Ejemplo",
"locality": "Madrid",
"region": "Madrid",
"code": "28020",
"country": "ES"
}
]
}
],
"addresses": [
{
"num": "42",
"street": "Calle Pradillo",
"locality": "Madrid",
"region": "Madrid",
"code": "28002",
"country": "ES"
}
],
"emails": [
{
"addr": "billing@example.com"
}
]
}
B2B Invoice
B2B Invoice
- The supplier is based out of Bilbao in Bizkaia, using the sandbox data provided by TicketBAI.
- The customer is in Madrid.
- Theyโre selling software development services with standard VAT.
- The series for the invoice is โF1โ.
- the minimal version (
ticketbai-b2b.min.mdx) contains only the essential fields required to create the invoice, - weโre applying the
es-tbai-v1addon to ensure GOBLโs TicketBAI validation checks are applied, - there is no
currencynorissue_date, as these will be assigned automatically, - there is no invoice
codeas this will be assigned by the workflow, - TicketBAI requires a general note, so weโve added one at the bottom,
- when running
gobl build, the system automatically calculates totals, assigns the$regimetoES, sets thees-tbai-regionextension toBI(Bizkaia) based on the supplierโs address, applies the standard VAT rate (21%), and assigns thees-tbai-productextension toservicesbased on the item unit, - the built version (
ticketbai-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.
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$addons": ["es-tbai-v1"],
"series": "F1",
"supplier": {
"name": "HFPn5yhXZ9tdD4pHRbvwymaVPrGZQr",
"tax_id": {
"country": "ES",
"code": "A99805194"
},
"addresses": [
{
"num": "42",
"street": "San Frantzisko",
"locality": "Bilbo",
"region": "Bizkaia",
"code": "48003",
"country": "ES"
}
],
"emails": [
{
"addr": "billing@example.com"
}
]
},
"customer": {
"name": "Receive One S.L.",
"tax_id": {
"country": "ES",
"code": "B98602642"
},
"emails": [
{
"addr": "billing@example.com"
}
],
"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"
},
"taxes": [
{
"cat": "VAT",
"rate": "standard"
}
]
}
],
"notes": [
{
"key": "general",
"text": "Invoice for development services"
}
]
}
B2C Simplified Invoice
B2C Simplified Invoice
- The supplier is based out of Bilbao in Bizkaia, using the sandbox data provided by TicketBAI.
- There is no customer.
- Physical goods are being sold with a standard VAT rate.
- The series for the invoice is โFS1โ.
- the minimal version (
ticketbai-b2c.min.mdx) contains only the essential fields required to create the simplified invoice, - there is no
customerobject, - the
taxobject contains theprices_includevalue set toVAT, which will ensure all totals will be calculated assuming that prices include VAT, - the line item includes a
es-tbai-productextension with the valuegoods, - TicketBAI requires a general note, in this case weโve added a generic message,
- when running
gobl build, the system automatically calculates the tax-included totals (splitting the โฌ25.10 price into โฌ20.74 base + โฌ4.36 VAT), assigns the$regimetoES, sets thees-tbai-regionextension toBI(Bizkaia), applies the standard VAT rate (21%), and normalizes all fields, - the built version (
ticketbai-b2c.mdx) shows the normalized document with calculated totals including tax-included calculations, 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.
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$addons": ["es-tbai-v1"],
"series": "FS1",
"tax": {
"prices_include": "VAT"
},
"supplier": {
"name": "HFPn5yhXZ9tdD4pHRbvwymaVPrGZQr",
"tax_id": {
"country": "ES",
"code": "A99805194"
},
"addresses": [
{
"num": "42",
"street": "San Frantzisko",
"locality": "Bilbo",
"region": "Bizkaia",
"code": "48003",
"country": "ES"
}
],
"emails": [
{
"addr": "billing@example.com"
}
]
},
"lines": [
{
"quantity": "1",
"item": {
"name": "Advanced screwdriver set",
"price": "25.10",
"ext": {
"es-tbai-product": "goods"
}
},
"taxes": [
{
"cat": "VAT",
"rate": "standard"
}
]
}
],
"notes": [
{
"key": "general",
"text": "In person sale"
}
]
}
Facturae B2B Invoice
Facturae B2B Invoice
- the
es-facturae-v3addon is required, - the
es-facturae-doc-typeandes-facturae-invoice-classtax extensions must be set, - both supplier and customer must have full address details and valid Spanish tax IDs.
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$regime": "ES",
"$addons": [
"es-facturae-v3"
],
"uuid": "01922b1e-e288-7ab9-82f3-0c8c8c7956bc",
"type": "standard",
"code": "TEST01001F",
"issue_date": "2021-12-08",
"currency": "EUR",
"tax": {
"ext": {
"es-facturae-doc-type": "FC",
"es-facturae-invoice-class": "OO"
}
},
"supplier": {
"name": "Hypeprop Sl",
"alias": "Hypeprop",
"tax_id": {
"country": "ES",
"code": "B23103039"
},
"people": [
{
"name": {
"given": "Paloma",
"surname": "Araujo"
}
}
],
"addresses": [
{
"num": "74",
"street": "Campo Real",
"locality": "Torrejรณn De La Calzada",
"region": "Madrid",
"code": "28023",
"country": "ES"
}
],
"emails": [
{
"addr": "rxazy27xfc@iname.com"
}
],
"telephones": [
{
"label": "office",
"num": "+34910730028"
}
]
},
"customer": {
"name": "Moniward Sl",
"tax_id": {
"country": "ES",
"code": "B77436020"
},
"addresses": [
{
"num": "35",
"street": "Plaza Horno",
"locality": "Nombela",
"region": "Toledo",
"code": "45083",
"country": "ES"
}
],
"emails": [
{
"addr": "bfn25xf3p@lycos.co.uk"
}
]
},
"lines": [
{
"i": 1,
"quantity": "20",
"item": {
"name": "Operations and development - day rate",
"price": "200.00"
},
"sum": "4000.00",
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "21.0%"
}
],
"total": "4000.00"
},
{
"i": 2,
"quantity": "2",
"item": {
"name": "Additional Overtime",
"price": "101.00"
},
"sum": "202.00",
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "21.0%"
}
],
"total": "202.00"
}
],
"payment": {
"terms": {
"key": "due-date",
"due_dates": [
{
"date": "2021-12-30",
"amount": "5084.42",
"percent": "100%"
}
],
"notes": "Some kind of payment term note"
},
"instructions": {
"key": "credit-transfer",
"credit_transfer": [
{
"iban": "ES25 0188 2570 7185 4470 4761",
"name": "Bankrandom"
}
]
}
},
"totals": {
"sum": "4202.00",
"total": "4202.00",
"taxes": {
"categories": [
{
"code": "VAT",
"rates": [
{
"key": "standard",
"base": "4202.00",
"percent": "21.0%",
"amount": "882.42"
}
],
"amount": "882.42"
}
],
"sum": "882.42"
},
"tax": "882.42",
"total_with_tax": "5084.42",
"payable": "5084.42"
},
"notes": [
{
"key": "general",
"text": "Thank you for your custom!"
}
]
}
Facturae Credit Note
Facturae Credit Note
- the
typeis set tocredit-note, - a
precedingentry references the original invoice with thees-facturae-correctioncode, - the
es-facturae-invoice-classis set toOR(rectificativa).
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$regime": "ES",
"$addons": [
"es-facturae-v3"
],
"uuid": "01922b1e-e283-7860-96aa-c57af9ffe67b",
"type": "credit-note",
"code": "TEST01001R",
"issue_date": "2021-12-08",
"currency": "EUR",
"preceding": [
{
"type": "standard",
"issue_date": "2021-12-08",
"code": "TEST01001F",
"ext": {
"es-facturae-correction": "01"
}
}
],
"tax": {
"ext": {
"es-facturae-doc-type": "FC",
"es-facturae-invoice-class": "OR"
}
},
"supplier": {
"name": "Hypeprop Sl",
"alias": "Hypeprop",
"tax_id": {
"country": "ES",
"code": "B23103039"
},
"people": [
{
"name": {
"given": "Paloma",
"surname": "Araujo"
}
}
],
"addresses": [
{
"num": "74",
"street": "Campo Real",
"locality": "Torrejรณn De La Calzada",
"region": "Madrid",
"code": "28023",
"country": "ES"
}
],
"emails": [
{
"addr": "rxazy27xfc@iname.com"
}
],
"telephones": [
{
"label": "office",
"num": "+34910730028"
}
]
},
"customer": {
"name": "Moniward Sl",
"tax_id": {
"country": "ES",
"code": "B77436020"
},
"addresses": [
{
"num": "35",
"street": "Plaza Horno",
"locality": "Nombela",
"region": "Toledo",
"code": "45083",
"country": "ES"
}
],
"emails": [
{
"addr": "bfn25xf3p@lycos.co.uk"
}
]
},
"lines": [
{
"i": 1,
"quantity": "20",
"item": {
"name": "Operations and development - day rate",
"price": "200.00"
},
"sum": "4000.00",
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "21.0%"
}
],
"total": "4000.00"
},
{
"i": 2,
"quantity": "2",
"item": {
"name": "Additional Overtime",
"price": "101.00"
},
"sum": "202.00",
"taxes": [
{
"cat": "VAT",
"rate": "standard",
"percent": "21.0%"
}
],
"total": "202.00"
}
],
"totals": {
"sum": "4202.00",
"total": "4202.00",
"taxes": {
"categories": [
{
"code": "VAT",
"rates": [
{
"key": "standard",
"base": "4202.00",
"percent": "21.0%",
"amount": "882.42"
}
],
"amount": "882.42"
}
],
"sum": "882.42"
},
"tax": "882.42",
"total_with_tax": "5084.42",
"payable": "5084.42"
},
"notes": [
{
"key": "general",
"text": "Thank you for your custom!"
}
]
}
Facturae FACe Invoice (with Administrative Centers)
Facturae FACe Invoice (with Administrative Centers)
- the customer includes an identity with
scope: "tax"for the Oficina Contable (DIR3 code01), delivery.receiverincludes the รrgano Gestor identity (DIR3 code02),ordering.buyerincludes the Unidad Tramitadora identity (DIR3 code03),- each public body publishes their DIR3 codes โ look them up in the DIR3 directory.
{
"$schema": "https://gobl.org/draft-0/bill/invoice",
"$regime": "ES",
"$addons": [
"es-facturae-v3"
],
"type": "standard",
"code": "TEST01002F",
"issue_date": "2021-12-08",
"currency": "EUR",
"tax": {
"ext": {
"es-facturae-doc-type": "FC",
"es-facturae-invoice-class": "OO"
}
},
"supplier": {
"name": "Hypeprop Sl",
"alias": "Hypeprop",
"tax_id": {
"country": "ES",
"code": "B23103039"
},
"people": [
{
"name": {
"given": "Paloma",
"surname": "Araujo"
}
}
],
"addresses": [
{
"num": "74",
"street": "Campo Real",
"locality": "Torrejรณn De La Calzada",
"region": "Madrid",
"code": "28023",
"country": "ES"
}
],
"emails": [
{
"addr": "rxazy27xfc@iname.com"
}
],
"telephones": [
{
"label": "office",
"num": "+34910730028"
}
]
},
"customer": {
"name": "Ayuntamiento de Madrid",
"tax_id": {
"country": "ES",
"code": "P2807900B"
},
"identities": [
{
"scope": "tax",
"code": "L01280796"
}
],
"addresses": [
{
"num": "4",
"street": "Plaza de la Villa",
"locality": "Madrid",
"region": "Madrid",
"code": "28005",
"country": "ES"
}
],
"emails": [
{
"addr": "facturacion@madrid.es"
}
]
},
"delivery": {
"receiver": {
"name": "Concejalรญa de Hacienda",
"identities": [
{
"code": "LA0007407"
}
],
"addresses": [
{
"num": "3",
"street": "Calle Alcalรก",
"locality": "Madrid",
"region": "Madrid",
"code": "28014",
"country": "ES"
}
]
}
},
"ordering": {
"buyer": {
"name": "Departamento de Compras",
"identities": [
{
"code": "LA0007408"
}
],
"addresses": [
{
"num": "10",
"street": "Gran Vรญa",
"locality": "Madrid",
"region": "Madrid",
"code": "28013",
"country": "ES"
}
]
}
},
"lines": [
{
"quantity": "20",
"item": {
"name": "Services rendered",
"price": "200.00"
},
"taxes": [
{
"cat": "VAT",
"rate": "standard"
}
]
}
],
"payment": {
"terms": {
"key": "due-date",
"due_dates": [
{
"date": "2021-12-30",
"amount": "4840.00",
"percent": "100%"
}
]
},
"instructions": {
"key": "credit-transfer",
"credit_transfer": [
{
"iban": "ES25 0188 2570 7185 4470 4761",
"name": "Bankrandom"
}
]
}
}
}
B2C Standard Invoice
B2C Standard Invoice
- 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
simplifiedtag in your GOBL document with thees-sii-v1addon, - when running
gobl build, the system automatically calculates totals, assigns the$regimetoES, sets thees-sii-doc-typeextension toF2(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.
{
"$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"
}
]
}
B2B Standard Invoice
B2B Standard Invoice
- 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.
- 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-v1addon and ensure thecustomerfield contains valid tax identification details, - the
suppliermust be previously registered with the tax authority and thecustomerNIF or VAT ID must be valid, - when running
gobl build, the system automatically calculates totals, assigns the$regimetoES, sets thees-sii-doc-typeextension toF1(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.
{
"$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"
}
]
}
]
}
B2B Services EU Client (Reverse Charge)
B2B Services EU Client (Reverse Charge)
- 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.
- 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-chargein your invoice lines, - you also need to set the items
keytoservices, 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
suppliermust be previously registered with the tax authority and thecustomerVAT ID must be valid and registered in the EU VIES system, - when running
gobl build, the system automatically sets the operation type toS2(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.
{
"$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"
}
]
}
B2B Goods EU Client (Intra-Community)
B2B Goods EU Client (Intra-Community)
- 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.
- 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-communityin your invoice lines, - you also need to set the items
keytogoods, 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
suppliermust be previously registered with the tax authority and thecustomerVAT ID must be valid and registered in the EU VIES system, - when running
gobl build, thees-sii-v1addon automatically sets thees-sii-exemptextension toE5(Artรญculo 25 Ley de IVA) and thees-sii-regimeextension to02(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.
{
"$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"
}
]
}
B2B Services No EU Client (Outside Scope)
B2B Services No EU Client (Outside Scope)
- 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-scopein your invoice lines, - services provided to non-EU customers are generally outside the scope of Spanish VAT,
- the
suppliermust be previously registered with the tax authority; customer tax identification is optional but recommended for record-keeping purposes, - when running
gobl build, thees-sii-v1addon automatically sets thees-sii-ootextension tolocationand 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.
{
"$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"
}
]
}
B2B Goods No EU Client (Export)
B2B Goods No EU Client (Export)
- 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
exportin your invoice lines, - exported goods are exempt from Spanish VAT,
- the
suppliermust be previously registered with the tax authority; customer tax identification is optional but recommended for record-keeping purposes, - when running
gobl build, thees-sii-v1addon automatically sets thees-sii-exemptextension toE2(Artรญculo 21 Ley de IVA) and thees-sii-regimeextension to02(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.
{
"$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"
}
]
}
B2B Exempt E1 Invoice
B2B Exempt E1 Invoice
E1 invoices are used for B2B transactions that are exempt from VAT pursuant (Artรญculo 20 Ley de IVA), 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
exemptin your invoice lines, - exempt operations are not subject to VAT but must still be reported,
- the
suppliermust be previously registered with the tax authority and thecustomerNIF must be valid, - when running
gobl build, thees-sii-v1addon automatically sets thees-sii-exemptextension toE1and 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.
{
"$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"
}
]
}
B2C One-Stop-Shop Invoice
B2C One-Stop-Shop Invoice
- 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
simplifiedtag in your GOBL document with thees-sii-v1addon, - 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
suppliermust 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-typeextension set toF2) 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.
{
"$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"
}
]
}
Credit Note
Credit Note
{
"$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"
}
]
}
Corrective Invoice
Corrective Invoice
{
"$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"
}
]
}
๐ช๐ธ Invopop resources for Spain
๐ช๐ธ Invopop resources for Spain