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

# XRechnung & ZUGFeRD Guide

> Generate compliant electronic invoices in Germany.

## Introduction

Germany requires electronic invoicing for different business scenarios, with two main standards: **XRechnung** and **ZUGFeRD**. Both are semantic data models aligned with the European Norm `EN 16931` and can be implemented using the same syntaxes.

### XRechnung

**XRechnung** is Germany's official standard for electronic invoices in public procurement (called *E-Rechnungen*), though it is also used for B2B transactions. It's part of the implementation of the EU directive `2014/55/EU`, which requires all contracting authorities in the EU to accept electronic invoices in a structured XML format.

XRechnung can be implemented using two different syntaxes:

* **UN/CEFACT CII** (Cross Industry Invoice)
* **OASIS UBL** (Universal Business Language)

Both syntaxes contain the same information but have different field names.

### ZUGFeRD

**ZUGFeRD** is a German standard for electronic invoicing designed to bridge the gap between traditional invoices and digital formats. ZUGFeRD combines a standard PDF/A-3 invoice with an embedded XML file containing the structured data. This hybrid approach makes it especially popular in B2B transactions, as it allows both people and accounting software to work with the same document.

ZUGFeRD is fully aligned with the European Norm `EN 16931` and is worth noting that ZUGFeRD and [Factur-X](/guides/fr-pa#invoice-formats) are a joint project between Germany and France, and their content is identical.

<Tip>
  When referring to syntaxes, it is important to note that XRechnung, ZUGFeRD, and Factur-X are all *semantic data models*. What this means is that they define the data that must be present in the invoice, but not the actual format of the data or the explicit name of the fields.

  To implement the semantic models, there are two syntaxes approved by the EU: UN/CEFACT Cross Industry Invoice ([CII](https://unece.org/trade/documents/2023/10/executive-guide-einvoicing-cross-industry-invoice)) and OpenOASIS Universal Business Language ([UBL](https://docs.OASIS-open.org/ubl/UBL-2.1.html)).
</Tip>

## Prerequisites

To convert invoices to XRechnung or ZUGFeRD format, ensure you have:

* A valid API key and a basic understanding of the [workflow engine](/guides/features/workflows) and [API](api-ref/introduction).
* An invoice with:
  * Supplier details (company name and required identities). Check the [German](https://docs.gobl.org/regimes/de) regime for specifics.
  * Line items with name, price, and applicable taxes.

## Setup

To issue XRechnung or ZUGFeRD invoices, follow these instructions in the [Invopop Console](https://console.invopop.com):

### XRechnung Setup

<Steps>
  <Step title="Connect the OASIS UBL app">
    1. Navigate to **Configuration** → **Apps**.
    2. Locate **OASIS UBL** in the app discovery list.
    3. Click **Connect** to activate.

    No additional configuration is needed.
  </Step>

  <Step title="Configure invoice workflow">
    <Tabs>
      <Tab title="Template">
        <Card iconType="duotone" title="XRechnung invoice workflow" icon="code-branch" href="https://console.invopop.com/redirect/workflows/new?template=de-xrechnung" cta="Add to my workspace">
          This workflow will generate an XRechnung UBL document.
        </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 X-Rechnung workflow theme={"system"}
        {
            "name": "X-Rechnung issue invoice",
            "description": "Issue a B2G invoice in XRechnung format",
            "schema": "bill/invoice",
            "steps": [
                {
                    "id": "bd7eb640-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `processing`{.state .processing}",
                    "config": {
                        "state": "processing"
                    }
                },
                {
                    "id": "58fb4ce0-6626-11f0-b9ab-1bbe1fa4398c",
                    "name": "Sign envelope",
                    "provider": "silo.close"
                },
                {
                    "id": "66c0eb20-8efb-11f0-825d-d9d5f5eb9a66",
                    "name": "Generate UBL document",
                    "provider": "ubl.generate",
                    "summary": "XRechnung UBL v2",
                    "config": {
                        "doc_type": "xrechnung-invoice-v2",
                        "private": false,
                        "validate_ubl": true
                    }
                },
                {
                    "id": "56bda1e0-8ef7-11f0-aa0e-dd7c69b95f3c",
                    "name": "Generate PDF",
                    "provider": "pdf",
                    "summary": "English · A4",
                    "config": {
                        "date_format": "%Y-%m-%d",
                        "layout": "A4",
                        "locale": "en",
                        "logo_height": 40,
                        "scripting": false
                    }
                },
                {
                    "id": "c6192a60-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `sent`{.state .sent}",
                    "config": {
                        "state": "sent"
                    }
                }
            ],
            "rescue": [
                {
                    "id": "c94982c0-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `error`{.state .error}",
                    "config": {
                        "state": "error"
                    }
                }
            ]
        }
        ```
      </Tab>

      <Tab title="Build from scratch">
        First, review our [workflows guide](/guides/features/workflows) to understand the basics.

        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 essential steps:

        1. **Set state** - Select `Processing`
        2. **Sign envelope**: The envelope must be signed before processing.
        3. **Generate UBL document**: In "Invoice Output Document Type" select `XRechnung UBL Invoice v2.0`. It's also possible to use the **Generate CII document** step selecting `XRechnung V3` as both UBL and CII are valid formats for XRechnung.
        4. **Set state** - Select `Sent`.

        Finally, in the "Error Handling" area, add **Set state** and select `Error`.
      </Tab>
    </Tabs>
  </Step>
</Steps>

### ZUGFeRD Setup

<Steps>
  <Step title="Connect the UN/CEFACT CII app">
    1. Navigate to **Configuration** → **Apps**.
    2. Locate **UN/CEFACT CII** in the app discovery list.
    3. Click **Connect** to activate.

    No additional configuration is needed.
  </Step>

  <Step title="Configure invoice workflow">
    <Tabs>
      <Tab title="Template">
        <Card iconType="duotone" title="ZUGFeRD invoice workflow" icon="code-branch" href="https://console.invopop.com/redirect/workflows/new?template=de-zugferd" cta="Add to my workspace">
          This workflow will generate a ZUGFeRD XML document and embed it into a PDF.
        </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 Workflow for generating a PDF with a ZUGFeRD XML attachment  theme={"system"}
        {
            "name": "ZUGFeRD issue invoice",
            "description": "Issue a B2B invoice as PDF with embedded ZUGFeRD XML",
            "schema": "bill/invoice",
            "steps": [
                {
                    "id": "bd7eb640-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `processing`{.state .processing}",
                    "config": {
                        "state": "processing"
                    }
                },
                {
                    "id": "58fb4ce0-6626-11f0-b9ab-1bbe1fa4398c",
                    "name": "Sign envelope",
                    "provider": "silo.close"
                },
                {
                    "id": "3548d720-6623-11f0-b3db-e7255a5da07c",
                    "name": "Generate CII document",
                    "provider": "cii.generate",
                    "summary": "ZUGFeRD v2",
                    "config": {
                        "attach_invoice_pdf": false,
                        "doc_type": "zugferd-v2",
                        "validate_cii": true
                    }
                },
                {
                    "id": "56bda1e0-8ef7-11f0-aa0e-dd7c69b95f3c",
                    "name": "Generate PDF",
                    "provider": "pdf",
                    "summary": "German · A4",
                    "config": {
                        "logo_height": 40,
                        "locale": "de",
                        "date_format": "%Y-%m-%d",
                        "layout": "A4",
                        "scripting": false
                    }
                },
                {
                    "id": "8e665990-81a3-11f0-82cb-9160968ac068",
                    "name": "Embed FacturX/ZUGFeRD",
                    "provider": "cii.pdf.embed"
                },
                {
                    "id": "c6192a60-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `sent`{.state .sent}",
                    "config": {
                        "state": "sent"
                    }
                }
            ],
            "rescue": [
                {
                    "id": "c94982c0-abd0-11ef-a013-91c68ca9f44b",
                    "name": "Set state",
                    "provider": "silo.state",
                    "summary": "Set state to `error`{.state .error}",
                    "config": {
                        "state": "error"
                    },
                    "next": []
                }
            ]
        }
        ```
      </Tab>

      <Tab title="Build from scratch">
        First, review our [workflows guide](/guides/features/workflows) to understand the basics.

        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 essential steps:

        1. **Set state** - Select `Processing`
        2. **Sign envelope**: The envelope must be signed before processing.
        3. **Generate CII document**: In "Invoice Output Document Type" select `ZUGFeRD v2`.
        4. **Generate PDF**: this step creates the PDF with the embedded XML.
        5. **Set state** - Select `Sent`.

        Finally, in the "Error Handling" area, add **Set state** and select `Error`.
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Running

Invopop uses the [GOBL](https://gobl.org) library to process conversions. GOBL's implementation validates [national business rules](https://www.xoev.de/sixcms/media.php/13/XRechnung-EnglishSummary-v220-final.pdf) in addition to the rules defined in `EN 16931-1`.

Some example invoices are provided below, along with example workflows to send the invoices to. We also recommend using the [GOBL Builder](https://build.gobl.org) to create your own invoices.

### XRechnung examples

Be sure to set the `regime` field to `DE` in your invoices and include the [XRechnung](https://docs.gobl.org/addons/de-xrechnung-v3) addon. This will add extra validations to ensure the document is compliant with the standard.

<AccordionGroup>
  <Accordion title="XRechnung B2B Invoice">
    Standard XRechnung invoice for business-to-business transactions using the UBL format.

    <CodeGroup>
      ```json XRechnung B2B Invoice theme={"system"}
      {
          "$schema": "https://gobl.org/draft-0/bill/invoice",
          "$regime": "DE",
          "$addons": [
              "eu-en16931-v2017",
              "de-xrechnung-v3"
          ],
          "type": "standard",
          "series": "SAMPLE",
          "code": "001",
          "issue_date": "2022-02-01",
          "currency": "EUR",
          "supplier": {
              "name": "Rheinland Technologies GmbH",
              "tax_id": {
                  "country": "DE",
                  "code": "879558966"
              },
              "inboxes": [
                  {
                      "key": "peppol",
                      "scheme": "9930",
                      "code": "DE879558966"
                  }
              ],
              "addresses": [
                  {
                      "num": "27",
                      "street": "Friedrichstraße",
                      "locality": "Berlin",
                      "region": "BE",
                      "code": "10117",
                      "country": "DE"
                  }
              ],
              "people": [
                  {
                      "name": {
                          "given": "John",
                          "surname": "Doe"
                      }
                  }  
              ],
              "telephones": [
                  {
                      "num": "+49100200300"
                  }
              ],
              "emails": [
                  {
                      "addr": "billing@example.com"
                  }
              ]
          },
          "customer": {
              "name": "Bavaria Solutions GmbH",
              "tax_id": {
                  "country": "DE",
                  "code": "993930191"
              },
              "inboxes": [
                  {
                      "key": "peppol",
                      "scheme": "9930",
                      "code": "DE993930191"
                  }
              ],
              "addresses": [
                  {
                      "num": "15",
                      "street": "Marienplatz",
                      "locality": "München",
                      "region": "BY",
                      "code": "80331",
                      "country": "DE"
                  }
              ],
              "emails": [
                  {
                      "addr": "test@example.com"
                  }
              ]
          },
          "lines": [
              {
                  "quantity": "20",
                  "item": {
                      "name": "Development services",
                      "price": "90.00",
                      "unit": "h"
                  },
                  "sum": "1800.00",
                  "discounts": [
                      {
                          "reason": "Special discount",
                          "percent": "10%",
                          "amount": "180.00"
                      }
                  ],
                  "taxes": [
                      {
                          "cat": "VAT",
                          "rate": "general"
                      }
                  ],
                  "total": "1620.00"
              }
          ],
          "ordering": {
              "code": "N"
          },
          "payment": {
              "terms": {
                  "notes": "Will be paid by 2026-06-02"
              },
              "instructions": {
                  "key": "credit-transfer+sepa",
                  "credit_transfer": [
                      {
                          "iban": "DE89370400440532013000",
                          "name": "Random Bank Co."
                      }
                  ]
              }
          }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "DE",
      	"$addons": [
      		"eu-en16931-v2017",
      		"de-xrechnung-v3"
      	],
      	"type": "standard",
      	"series": "SAMPLE",
      	"code": "001",
      	"issue_date": "2022-02-01",
      	"currency": "EUR",
      	"tax": {
      		"ext": {
      			"untdid-document-type": "380"
      		}
      	},
      	"supplier": {
      		"name": "Rheinland Technologies GmbH",
      		"tax_id": {
      			"country": "DE",
      			"code": "879558966"
      		},
      		"people": [
      			{
      				"name": {
      					"given": "John",
      					"surname": "Doe"
      				}
      			}
      		],
      		"endpoints": [
      			{
      				"uri": "iso6523-actorid-upis::9930:DE879558966"
      			}
      		],
      		"inboxes": [
      			{
      				"key": "peppol",
      				"scheme": "9930",
      				"code": "DE879558966"
      			}
      		],
      		"addresses": [
      			{
      				"num": "27",
      				"street": "Friedrichstraße",
      				"locality": "Berlin",
      				"region": "BE",
      				"code": "10117",
      				"country": "DE"
      			}
      		],
      		"emails": [
      			{
      				"addr": "billing@example.com"
      			}
      		],
      		"telephones": [
      			{
      				"num": "+49100200300"
      			}
      		]
      	},
      	"customer": {
      		"name": "Bavaria Solutions GmbH",
      		"tax_id": {
      			"country": "DE",
      			"code": "993930191"
      		},
      		"endpoints": [
      			{
      				"uri": "iso6523-actorid-upis::9930:DE993930191"
      			}
      		],
      		"inboxes": [
      			{
      				"key": "peppol",
      				"scheme": "9930",
      				"code": "DE993930191"
      			}
      		],
      		"addresses": [
      			{
      				"num": "15",
      				"street": "Marienplatz",
      				"locality": "München",
      				"region": "BY",
      				"code": "80331",
      				"country": "DE"
      			}
      		],
      		"emails": [
      			{
      				"addr": "test@example.com"
      			}
      		]
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "20",
      			"item": {
      				"name": "Development services",
      				"price": "90.00",
      				"unit": "h"
      			},
      			"sum": "1800.00",
      			"discounts": [
      				{
      					"reason": "Special discount",
      					"percent": "10%",
      					"amount": "180.00"
      				}
      			],
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "19%",
      					"ext": {
      						"untdid-tax-category": "S"
      					}
      				}
      			],
      			"total": "1620.00"
      		}
      	],
      	"ordering": {
      		"code": "N"
      	},
      	"payment": {
      		"terms": {
      			"notes": "Will be paid by 2026-06-02"
      		},
      		"instructions": {
      			"key": "credit-transfer+sepa",
      			"credit_transfer": [
      				{
      					"iban": "DE89370400440532013000",
      					"name": "Random Bank Co."
      				}
      			],
      			"ext": {
      				"untdid-payment-means": "58"
      			}
      		}
      	},
      	"totals": {
      		"sum": "1620.00",
      		"total": "1620.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"ext": {
      								"untdid-tax-category": "S"
      							},
      							"base": "1620.00",
      							"percent": "19%",
      							"amount": "307.80"
      						}
      					],
      					"amount": "307.80"
      				}
      			],
      			"sum": "307.80"
      		},
      		"tax": "307.80",
      		"total_with_tax": "1927.80",
      		"payable": "1927.80"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<Info>
  In your invoice data, make sure to include the [XRechnung addon](https://docs.gobl.org/addons/de-xrechnung-v3) and set the regime as `DE`.
</Info>

### ZUGFeRD examples

Be sure to set the `regime` field to `DE` in your invoices and include the [ZUGFeRD](https://docs.gobl.org/addons/de-xrechnung-v3) addon. This will add extra validations to ensure the document is compliant with the standard.

<AccordionGroup>
  <Accordion title="ZUGFeRD B2C Invoice">
    Standard ZUGFeRD invoice for business-to-consumer transactions with embedded XML in PDF format.

    <CodeGroup>
      ```json ZUGFeRD B2C Invoice theme={"system"}
      {
          "$schema": "https://gobl.org/draft-0/bill/invoice",
          "$regime": "DE",
          "$addons": [
              "eu-en16931-v2017",
              "de-zugferd-v2"
          ],
          "$tags": [
              "simplified"
          ],
          "uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
          "type": "standard",
          "series": "SAMPLE",
          "code": "001",
          "issue_date": "2022-02-01",
          "currency": "EUR",
          "supplier": {
              "name": "Provide One GmbH",
              "tax_id": {
                  "country": "DE",
                  "code": "879558966"
              },
              "addresses": [
                  {
                      "num": "16",
                      "street": "Dietmar-Hopp-Allee",
                      "locality": "Walldorf",
                      "code": "69190",
                      "country": "DE"
                  }
              ],
              "emails": [
                  {
                      "addr": "billing@example.com"
                  }
              ]
          },
          "lines": [
              {
                  "quantity": "20",
                  "item": {
                      "name": "Development services",
                      "price": "90.00",
                      "unit": "h"
                  },
                  "sum": "1800.00",
                  "discounts": [
                      {
                          "reason": "Special discount",
                          "percent": "10%",
                          "amount": "180.00"
                      }
                  ],
                  "taxes": [
                      {
                          "cat": "VAT",
                          "rate": "general"
                      }
                  ],
                  "total": "1620.00"
              }
          ],
          "payment": {
              "advances": [
                  {
                      "description": "Paid in full",
                      "percent": "100%",
                      "amount": "1927.80"
                  }
              ],
              "instructions": {
                  "key": "card"
              }
          }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "DE",
      	"$addons": [
      		"eu-en16931-v2017",
      		"de-zugferd-v2"
      	],
      	"$tags": [
      		"simplified"
      	],
      	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
      	"type": "standard",
      	"series": "SAMPLE",
      	"code": "001",
      	"issue_date": "2022-02-01",
      	"currency": "EUR",
      	"tax": {
      		"ext": {
      			"untdid-document-type": "380"
      		}
      	},
      	"supplier": {
      		"name": "Provide One GmbH",
      		"tax_id": {
      			"country": "DE",
      			"code": "879558966"
      		},
      		"addresses": [
      			{
      				"num": "16",
      				"street": "Dietmar-Hopp-Allee",
      				"locality": "Walldorf",
      				"code": "69190",
      				"country": "DE"
      			}
      		],
      		"emails": [
      			{
      				"addr": "billing@example.com"
      			}
      		]
      	},
      	"lines": [
      		{
      			"i": 1,
      			"quantity": "20",
      			"item": {
      				"name": "Development services",
      				"price": "90.00",
      				"unit": "h"
      			},
      			"sum": "1800.00",
      			"discounts": [
      				{
      					"reason": "Special discount",
      					"percent": "10%",
      					"amount": "180.00"
      				}
      			],
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "19%",
      					"ext": {
      						"untdid-tax-category": "S"
      					}
      				}
      			],
      			"total": "1620.00"
      		}
      	],
      	"payment": {
      		"advances": [
      			{
      				"description": "Paid in full",
      				"percent": "100%",
      				"amount": "1927.80"
      			}
      		],
      		"instructions": {
      			"key": "card",
      			"ext": {
      				"untdid-payment-means": "48"
      			}
      		}
      	},
      	"totals": {
      		"sum": "1620.00",
      		"total": "1620.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"ext": {
      								"untdid-tax-category": "S"
      							},
      							"base": "1620.00",
      							"percent": "19%",
      							"amount": "307.80"
      						}
      					],
      					"amount": "307.80"
      				}
      			],
      			"sum": "307.80"
      		},
      		"tax": "307.80",
      		"total_with_tax": "1927.80",
      		"payable": "1927.80",
      		"advance": "1927.80",
      		"due": "0.00"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="ZUGFeRD B2B Invoice with Additional Fields">
    Comprehensive ZUGFeRD invoice demonstrating additional optional fields such as ordering information, payment terms, delivery details, and discounts.

    <CodeGroup>
      ```json ZUGFeRD B2B Invoice with additional fields theme={"system"}
      {
          "$schema": "https://gobl.org/draft-0/bill/invoice",
          "$regime": "DE",
          "$addons": [
              "eu-en16931-v2017",
              "de-zugferd-v2"
          ],
          "type": "standard",
          "series": "SAMPLE",
          "code": "001",
          "issue_date": "2024-02-13",
          "currency": "EUR",
          "tax": {
              "ext": {
                  "untdid-document-type": "380"
              }
          },
          "supplier": {
              "name": "Provide One GmbH",
              "tax_id": {
                  "country": "DE",
                  "code": "111111125"
              },
              "people": [
                  {
                      "name": {
                          "given": "John",
                          "surname": "Doe"
                      }
                  }
              ],
              "addresses": [
                  {
                      "num": "16",
                      "street": "Dietmar-Hopp-Allee",
                      "locality": "Walldorf",
                      "code": "69190",
                      "country": "DE"
                  }
              ],
              "emails": [
                  {
                      "addr": "billing@example.com"
                  }
              ],
              "telephones": [
                  {
                      "num": "+49100200300"
                  }
              ]
          },
          "customer": {
              "name": "Sample Consumer",
              "tax_id": {
                  "country": "DE",
                  "code": "282741168"
              },
              "addresses": [
                  {
                      "num": "25",
                      "street": "Werner-Heisenberg-Allee",
                      "locality": "München",
                      "code": "80939",
                      "country": "DE"
                  }
              ],
              "emails": [
                  {
                      "addr": "email@sample.com"
                  }
              ]
          },
          "lines": [
              {
                  "quantity": "20",
                  "item": {
                      "name": "Development services",
                      "price": "90.00",
                      "unit": "h"
                  },
                  "taxes": [
                      {
                          "cat": "VAT",
                          "key": "standard",
                          "rate": "general",
                          "percent": "19%",
                          "ext": {
                              "untdid-tax-category": "S"
                          }
                      }
                  ]
              }
          ],
          "discounts": [
              {
                  "reason": "Promotion discount",
                  "amount": "10.00",
                  "taxes": [
                      {
                          "cat": "VAT",
                          "key": "standard",
                          "rate": "general",
                          "percent": "19%",
                          "ext": {
                              "untdid-tax-category": "S"
                          }
                      }
                  ],
                  "ext": {
                      "untdid-allowance": "88"
                  }
              }
          ],
          "charges": [
              {
                  "reason": "Freight",
                  "amount": "11.00",
                  "taxes": [
                      {
                          "cat": "VAT",
                          "key": "standard",
                          "rate": "general",
                          "percent": "19%",
                          "ext": {
                              "untdid-tax-category": "S"
                          }
                      }
                  ]
              }
          ],
          "ordering": {
              "code": "PO4711",
              "period": {
                  "start": "2013-03-10",
                  "end": "2013-04-10"
              },
              "contracts": [
                  {
                      "code": "2013-05"
                  }
              ],
              "receiving": [
                  {
                      "code": "3544"
                  }
              ],
              "despatch": [
                  {
                      "code": "5433"
                  }
              ]
          },
          "payment": {
              "payee": {
                  "name": "Ebeneser Scrooge AS",
                  "identities": [
                      {
                          "label": "CompanyID",
                          "code": "989823401"
                      },
                      {
                          "label": "0088",
                          "code": "2298740918237"
                      }
                  ]
              },
              "terms": {
                  "due_dates": [
                      {
                          "date": "2013-07-20",
                          "percent": "100%"
                      }
                  ],
                  "notes": "2 % discount if paid within 2 days\n            Penalty percentage 10% from due date"
              },
              "instructions": {
                  "key": "credit-transfer",
                  "ref": "0003434323213231",
                  "credit_transfer": [
                      {
                          "iban": "NO9386011117947",
                          "bic": "DNBANOKK"
                      }
                  ],
                  "card": {
                      "last4": "1234",
                      "holder": "John Doe"
                  },
                  "direct_debit": {
                      "ref": "1234567890",
                      "creditor": "987654321",
                      "account": "DE89370400440532013000"
                  },
                  "ext": {
                      "untdid-payment-means": "30"
                  }
              }
          },
          "delivery": {
              "receiver": {
                  "addresses": [
                      {
                          "street": "Deliverystreet 2",
                          "street_extra": "Side door",
                          "locality": "DeliveryCity",
                          "region": "RegionD",
                          "code": "523427",
                          "country": "NO"
                      }
                  ]
              },
              "identities": [
                  {
                      "label": "0088",
                      "code": "6754238987643"
                  }
              ],
              "date": "2024-02-10"
          }
      }
      ```

      ```json Built version theme={"system"}
      {
      	"$schema": "https://gobl.org/draft-0/bill/invoice",
      	"$regime": "DE",
      	"$addons": [
      		"eu-en16931-v2017",
      		"de-zugferd-v2"
      	],
      	"type": "standard",
      	"series": "SAMPLE",
      	"code": "001",
      	"issue_date": "2024-02-13",
      	"currency": "EUR",
      	"tax": {
      		"ext": {
      			"untdid-document-type": "380"
      		}
      	},
      	"supplier": {
      		"name": "Provide One GmbH",
      		"tax_id": {
      			"country": "DE",
      			"code": "111111125"
      		},
      		"people": [
      			{
      				"name": {
      					"given": "John",
      					"surname": "Doe"
      				}
      			}
      		],
      		"addresses": [
      			{
      				"num": "16",
      				"street": "Dietmar-Hopp-Allee",
      				"locality": "Walldorf",
      				"code": "69190",
      				"country": "DE"
      			}
      		],
      		"emails": [
      			{
      				"addr": "billing@example.com"
      			}
      		],
      		"telephones": [
      			{
      				"num": "+49100200300"
      			}
      		]
      	},
      	"customer": {
      		"name": "Sample Consumer",
      		"tax_id": {
      			"country": "DE",
      			"code": "282741168"
      		},
      		"addresses": [
      			{
      				"num": "25",
      				"street": "Werner-Heisenberg-Allee",
      				"locality": "München",
      				"code": "80939",
      				"country": "DE"
      			}
      		],
      		"emails": [
      			{
      				"addr": "email@sample.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": "19%",
      					"ext": {
      						"untdid-tax-category": "S"
      					}
      				}
      			],
      			"total": "1800.00"
      		}
      	],
      	"discounts": [
      		{
      			"i": 1,
      			"reason": "Promotion discount",
      			"amount": "10.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "19%",
      					"ext": {
      						"untdid-tax-category": "S"
      					}
      				}
      			],
      			"ext": {
      				"untdid-allowance": "88"
      			}
      		}
      	],
      	"charges": [
      		{
      			"i": 1,
      			"reason": "Freight",
      			"amount": "11.00",
      			"taxes": [
      				{
      					"cat": "VAT",
      					"key": "standard",
      					"rate": "general",
      					"percent": "19%",
      					"ext": {
      						"untdid-tax-category": "S"
      					}
      				}
      			]
      		}
      	],
      	"ordering": {
      		"code": "PO4711",
      		"period": {
      			"start": "2013-03-10",
      			"end": "2013-04-10"
      		},
      		"contracts": [
      			{
      				"code": "2013-05"
      			}
      		],
      		"receiving": [
      			{
      				"code": "3544"
      			}
      		],
      		"despatch": [
      			{
      				"code": "5433"
      			}
      		]
      	},
      	"payment": {
      		"payee": {
      			"name": "Ebeneser Scrooge AS",
      			"identities": [
      				{
      					"label": "CompanyID",
      					"code": "989823401"
      				},
      				{
      					"label": "0088",
      					"code": "2298740918237"
      				}
      			]
      		},
      		"terms": {
      			"due_dates": [
      				{
      					"date": "2013-07-20",
      					"amount": "2143.19",
      					"percent": "100%"
      				}
      			],
      			"notes": "2 % discount if paid within 2 days\n            Penalty percentage 10% from due date"
      		},
      		"instructions": {
      			"key": "credit-transfer",
      			"ref": "0003434323213231",
      			"credit_transfer": [
      				{
      					"iban": "NO9386011117947",
      					"bic": "DNBANOKK"
      				}
      			],
      			"card": {
      				"last4": "1234",
      				"holder": "John Doe"
      			},
      			"direct_debit": {
      				"ref": "1234567890",
      				"creditor": "987654321",
      				"account": "DE89370400440532013000"
      			},
      			"ext": {
      				"untdid-payment-means": "30"
      			}
      		}
      	},
      	"delivery": {
      		"receiver": {
      			"addresses": [
      				{
      					"street": "Deliverystreet 2",
      					"street_extra": "Side door",
      					"locality": "DeliveryCity",
      					"region": "RegionD",
      					"code": "523427",
      					"country": "NO"
      				}
      			]
      		},
      		"identities": [
      			{
      				"label": "0088",
      				"code": "6754238987643"
      			}
      		],
      		"date": "2024-02-10"
      	},
      	"totals": {
      		"sum": "1800.00",
      		"discount": "10.00",
      		"charge": "11.00",
      		"total": "1801.00",
      		"taxes": {
      			"categories": [
      				{
      					"code": "VAT",
      					"rates": [
      						{
      							"key": "standard",
      							"ext": {
      								"untdid-tax-category": "S"
      							},
      							"base": "1801.00",
      							"percent": "19%",
      							"amount": "342.19"
      						}
      					],
      					"amount": "342.19"
      				}
      			],
      			"sum": "342.19"
      		},
      		"tax": "342.19",
      		"total_with_tax": "2143.19",
      		"payable": "2143.19"
      	}
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

<Info>
  In your invoice data, make sure to include the [ZUGFeRD addon](https://docs.gobl.org/addons/de-xrechnung-v3) and set the regime as `DE`.
</Info>

***

<AccordionGroup>
  <Accordion title="🇩🇪 Invopop resources for Germany">
    |            |                                                                                                                                                                                                                                                                                                                                                                                             |
    | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Compliance | <Icon icon="https://assets.invopop.com/flags/de.svg" /> [Invoicing compliance in Germany](/compliance/germany)<br /> <Icon icon="timeline" /> [Compliance timeline](/timelines/germany)                                                                                                                                                                                                     |
    | Apps       | <Icon icon="https://assets.invopop.com/apps/ubl/logo.svg" /> [OASIS UBL](/apps/oasis-ubl)<br /><Icon icon="https://assets.invopop.com/apps/xinvoice/icon.svg" /> [ZUGFeRD](/apps/oasis-ubl)                                                                                                                                                                                                 |
    | Guides     | <Icon icon="book" /> [XRechnung Guide](/guides/de-xrechnung)<br /><Icon icon="book" /> [ZUGFeRD Guide](/guides/de-zugferd)<br /><Icon icon="book" /> [Chargebee Guide](/guides/chargebee#germany)                                                                                                                                                                                           |
    | FAQ        | <Icon icon="square-question" /> [Germany FAQ](/faq/germany)                                                                                                                                                                                                                                                                                                                                 |
    | GOBL       | <Icon icon="https://assets.invopop.com/icons/gobl.svg" />  [Germany Tax Regime](https://docs.gobl.org/regimes/de)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [German XRechnung Addon](https://docs.gobl.org/addons/de-xrechnung-v3)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [German ZUGFeRD Addon](https://docs.gobl.org/addons/de-zugferd-v2) |
    | GitHub     | <Icon icon="github" /> [gobl.xinvoice](https://github.com/invopop/gobl.xinvoice)                                                                                                                                                                                                                                                                                                            |
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="How do I configure my workspace for German invoicing?">
    Pick a format based on the recipient: XRechnung (UBL or CII) for B2G via Peppol, ZUGFeRD/Factur-X for B2B where a human-readable PDF is also wanted. Both are EN 16931-compliant — Invopop generates either from the same GOBL invoice.
  </Accordion>

  <Accordion title="What's the workflow for issuing Peppol invoices in Germany?">
    Generate a GOBL invoice with the `de-xrechnung-v3` addon, then run the Peppol Send workflow. Invopop emits XRechnung (UBL or CII per recipient preference), looks up the recipient's Access Point, and delivers via Peppol.
  </Accordion>

  <Accordion title="Which XRechnung syntax should I choose, UBL or CII?">
    Both syntaxes are equally valid and contain the same information, so in the majority of cases the choice has no consequences.

    If you plan on sending invoices through the PEPPOL network, we recommend using UBL as it is the supported format. If you plan on also issuing invoices in ZUGFeRD or Factur-X, it might be more convenient to use CII, as it is the syntax also supported by ZUGFeRD and Factur-X.
  </Accordion>

  <Accordion title="How can I view an XML attached to a PDF?">
    For ZUGFeRD PDFs, the XML file is embedded within the PDF itself. To extract and view it, you can use the `Attachments` section in Adobe Acrobat Reader.

    Alternatively, you can use specialized tools like the [SysTools PDF Extractor](https://www.systoolsgroup.com/pdf/extractor/) to extract the XML file.
  </Accordion>

  <Accordion title="Where do I find Germany-specific GOBL documentation?">
    See the [Germany tax regime in GOBL](https://docs.gobl.org/regimes/de) for tax categories and identifiers. The XRechnung mapping lives in [`de-xrechnung-v3`](https://docs.gobl.org/addons/de-xrechnung-v3); ZUGFeRD/Factur-X share the EN 16931 CII profile.
  </Accordion>

  <Accordion title="What should we do if the customer doesn't belong to the Peppol network?">
    In countries where Peppol is the standard but not mandatory, you may still need to issue an e-invoice when the recipient isn't on the network. Both parties can agree on an alternative transfer method, but the invoice must still be EN16931 compliant.

    Recommended approach:

    * Set up a separate workflow that generates the XML without the send-Peppol-document step
    * Or reuse your existing workflow without the customer Peppol ID — the send step is automatically skipped
    * Fetch the generated XML and deliver it through the agreed channel, typically email
  </Accordion>

  <Accordion title="How do I handle B2C invoices in Peppol?">
    B2C invoices typically lack the structured customer information required for Peppol delivery, and most consumers don't have inboxes. Use a conditional workflow:

    1. Add an **If/Else** step that checks for a customer inbox using `count(customer.inboxes, true) > 0`.
    2. On the `false` branch, generate a PDF and email it to the customer, then stop the flow.

    This routes B2B invoices through Peppol while keeping a smooth path for consumers.
  </Accordion>

  <Accordion title="How do I handle 'Receiver Not Found' errors?">
    If a job fails with `KO` and `receiver not found in the peppol network`, treat it like an invalid email address — the recipient simply isn't reachable on Peppol. Add the **Lookup Participant ID** step (ideally in a separate validation workflow run against customer data) so you catch missing IDs before generating the invoice.
  </Accordion>

  <Accordion title="Should I set the `$regime` field when using Peppol?">
    No. The regime is automatically derived from the supplier's settings, which is the recommended approach for Peppol — leave it unset on the document.
  </Accordion>

  <Accordion title="Where do I find Peppol GOBL documentation?">
    See the [`oasis-ubl-v2`](https://docs.gobl.org/addons/oasis-ubl-v2) addon and the [Peppol app reference](/apps/peppol) for required fields, supported document types, and Participant ID schemes.
  </Accordion>
</AccordionGroup>

More available in our [Germany FAQ](/faq/germany) section

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