# Germany
> German documents: Rechnung to Lieferschein by kind, USt-IdNr. and Steuernummer, VAT categories, the § 14 UStG check, XRechnung and ZUGFeRD.
>
> Before: [The document](https://ocost.io/docs/en/document.md)

What Ocost reads on a German document and where it writes it in [`ocost.document.v1`](https://ocost.io/docs/en/document.md).

## Documents

| Printed as | `kind` | `kind_detail` |
| --- | --- | --- |
| Rechnung | `invoice` | `invoice` |
| Abschlagsrechnung, Teilrechnung | `invoice` | `partial_invoice` |
| Schlussrechnung | `invoice` | `final_invoice` |
| Anzahlungsrechnung | `invoice` | `advance_payment_invoice` |
| Gutschrift im Gutschriftverfahren | `invoice` | `credit_invoice` |
| Gutschrift, Storno | `credit_note` | `credit_note` |
| Rechnungskorrektur | `invoice_correction` | `invoice_correction` |
| Proforma-Rechnung | `pro_forma` | `pro_forma_invoice` |
| Quittung, Kassenbon | `receipt` | `receipt` |
| Lieferschein | `delivery_note` | `delivery_note` |
| Bestellung, Auftrag | `order` | `order` |
| Auftragsbestätigung | `order_confirmation` | `order_confirmation` |
| Angebot | `quote` | `offer` |
| Vertrag, Mietvertrag | `contract` | `contract`, `lease_contract` |
| Mahnung, Zahlungserinnerung | `payment_reminder` | `payment_reminder` |
| Nebenkostenabrechnung | `other` | `cost_statement` |

A Gutschrift can mean two things. One that takes back an invoice is a `credit_note`. One the customer writes instead of the supplier's invoice is a `credit_invoice`, and `attention` holds `self_billed`.

## Identifiers

| Printed as | Field | Check |
| --- | --- | --- |
| USt-IdNr. (`DE` and nine digits) | `vat_id`, `identifiers` as `EU_VAT` | Check `vat_id`: its format. Ocost doesn't ask VIES. |
| Steuernummer | `tax_registration_id`, `identifiers` as `DE_STNR` | None |
| Handelsregister: HRB or HRA with its court | `legal_registration_id`, `identifiers` as `COMMERCIAL_REGISTER` | None. Kept only when it names a register and a number. |
| Leitweg-ID | `buyer_reference` | Read from an XRechnung only |
| IBAN | `payment.iban` | Check `iban`: its check digits |

## VAT

Ocost reads the rates a document prints, usually 19 % and 7 %. Each rate is one `vat_breakdown` group. The check `vat` holds when a group's VAT is its net times its rate.

| Category | On a German document |
| --- | --- |
| `S` | 19 % or 7 % |
| `Z` | 0 % |
| `E` | Steuerfrei (§ 4 UStG), with the reason printed |
| `AE` | § 13b UStG: "Steuerschuldnerschaft des Leistungsempfängers" |
| `K` | Innergemeinschaftliche Lieferung |
| `G` | Export outside the EU |
| `O` | Nicht steuerbar |

## The invoice check

`tax_check` holds what an incoming invoice lacks for the input VAT deduction. Ocost fills it when your business and the supplier are in Germany. Ocost takes the supplier's country from its address, else from its VAT ID. It covers invoices to pay and receipts up to 250 €. For anything else it is `null`.

| `case` | What Ocost asks for |
| --- | --- |
| `standard` | § 14 Abs. 4 UStG: both parties' names and addresses, your business as recipient, the supplier's tax number or VAT ID, date, number, goods or services, service date and net. Then the rate and the VAT. |
| `small` | § 33 UStDV, up to 250 € gross: the supplier's name and address, date, goods or services, and the rate |
| `reverse_charge` | The standard items up to the net, and the note that you owe the VAT |
| `intra_eu` | The standard items up to the net, the note, and both VAT IDs |
| `exempt` | The standard items up to the net, and the reason it is exempt |

Each item in `missing` names its `law`. `at_stake` is `true` when it costs the deduction. `vat_charged` flags German VAT you owe yourself under § 13b. It isn't deductible, and paying it pays it twice. Ocost holds such an invoice for a person.

## E-invoices

Ocost reads XRechnung in UBL and CII, and ZUGFeRD or Factur-X, without a model. It takes the XML alone or from inside the PDF. `read_with` is `e_invoice`, and every value is `checked`.

## Dates, amounts and language

German documents print `03.11.2026` and `1.270,92 €`. Ocost writes `2026-11-03`, `1270.92` and `EUR`. `sources` keeps the quote as printed. Skonto terms go to `early_payment_discounts`. Names and lines stay in the document's words.

## Your company

Ocost tells incoming from outgoing by your details in [Settings › Company](https://app.ocost.io/settings/company). A German company needs its address and its VAT ID or Steuernummer. A GmbH, UG, AG, KG, OHG or e.K. adds its register court and number.

Ocost fills an empty field from your documents and the group's, where an exact identifier names you. It never overwrites a value.

Mail to `belege@<name>.ocost.io` reaches Ocost: your name without its legal form, umlauts written out, such as `mueller-bau`.

## Example

An excerpt of an incoming invoice:

```json
{
  "kind": "invoice",
  "kind_detail": "invoice",
  "type_code": "380",
  "number": "RE-2026-0412",
  "currency": "EUR",
  "seller": {
    "name": "Beispiel Werkstatt GmbH",
    "identifiers": [
      { "scheme": "EU_VAT", "value": "DE123456788", "valid": null },
      { "scheme": "DE_STNR", "value": "21/815/08150", "valid": null },
      { "scheme": "COMMERCIAL_REGISTER", "value": "Amtsgericht Köln HRB 12345", "valid": null }
    ],
    "vat_id": "DE123456788",
    "tax_registration_id": "21/815/08150",
    "legal_registration_id": "Amtsgericht Köln HRB 12345"
  },
  "totals": { "net": 500, "tax": 95, "gross": 595, "payable": null, "prices_include_vat": false },
  "vat_breakdown": [
    { "category": "S", "rate": 19, "taxable_amount": 500, "tax_amount": 95, "exemption_reason": null }
  ],
  "early_payment_discounts": [
    { "days": 10, "percent": 2, "base_amount": null, "due_date": "2026-11-13" }
  ],
  "tax_check": { "case": "standard", "missing": [] },
  "read_with": "reader"
}
```

## See also

- [The document](https://ocost.io/docs/en/document.md): The ocost.document.v1 schema in EN 16931 terms (maps to UBL and CII): an example, kind and direction, sources, checks, versions, and every field and value.
- [Units and codes](https://ocost.io/docs/en/units.md): The document’s code lists: UNECE units with the words printed for them, ISO currencies and countries, VAT categories, payment means, document types, identifiers, ECLASS.
- [Company groups](https://ocost.io/docs/en/groups.md): Company groups: which companies a key reaches, the Ocost-Business header, routing by the document’s identifiers, needs_company, and files across the group.
- On ocost.io: [E-invoicing](https://ocost.io/en/product/e-invoicing), [DATEV export](https://ocost.io/en/product/datev-export)
