# BR-DE-8 Buyer city must be provided

Under German invoice regulations (§ 14 Abs. 4 Nr. 1 UStG) and the XRechnung standard specification, the buyer postal address (BG-8) must contain the city name (BT-52). In German public procurement, public entities (such as federal ministries, state agencies, and city administrations) often operate multiple offices or departments across different municipalities. An explicit city name ensures correct administrative allocation and budget accounting in public ERP backends.

## Problem Description

> **ERROR**: German XRechnung rule (KoSIT, BR-DE) · XRechnung 3.0

## Context and Significance

Missing buyer city information causes immediate validation rejection in XRechnung validator rulepacks (BR-DE-8), preventing the invoice from passing public procurement preflight checks.

## Solution

In your customer master data (e.g. SAP customer master, DATEV debitor profile, Dynamics 365 customer account), verify that the buyer city is maintained. In UBL 2.1 syntax, populate <cbc:CityName> inside <cac:AccountingCustomerParty><cac:Party><cac:PostalAddress>. In UN/CEFACT CII syntax, populate <ram:CityName> inside <ram:BuyerTradeParty><ram:PostalTradeAddress>. Do not leave the city element blank or merge it into the street line.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=BR-DE-8)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=BR-DE-8)

## Valid Examples

- Buyer postal address with BT-52 = "Hamburg", postal code "20095", and country code "DE"
- Buyer postal address with BT-52 = "Köln", postal code "50667", and country code "DE"

## Invalid Examples

- Buyer address specifies street and postal code but leaves cbc:CityName / ram:CityName empty
- Customer record in ERP has missing city field, generating empty XML element (<cbc:CityName></cbc:CityName>)

## Code Examples

### Valid XML
```
<cac:AccountingCustomerParty>
  <cac:Party>
    <cac:PartyName><cbc:Name>Bezirksamt Mitte</cbc:Name></cac:PartyName>
    <cac:PostalAddress>
      <cbc:StreetName>Karl-Marx-Allee 31</cbc:StreetName>
      <cbc:CityName>Berlin</cbc:CityName>
      <cbc:PostalZone>10178</cbc:PostalZone>
      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
    </cac:PostalAddress>
  </cac:Party>
</cac:AccountingCustomerParty>
```

### Invalid XML
```
<cac:AccountingCustomerParty>
  <cac:Party>
    <cac:PartyName><cbc:Name>Bezirksamt Mitte</cbc:Name></cac:PartyName>
    <cac:PostalAddress>
      <cbc:StreetName>Karl-Marx-Allee 31</cbc:StreetName>
      <cbc:PostalZone>10178</cbc:PostalZone>
      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
    </cac:PostalAddress>
  </cac:Party>
</cac:AccountingCustomerParty>
```

## Affected Fields

- [BT-52 Buyer city](/resources/xrechnung/bt-52-buyer-city)
- [BG-8 Buyer postal address](/resources/xrechnung/bt-55-buyer-country-code)
- [BT-55 Buyer country code](/resources/xrechnung/bt-55-buyer-country-code)

## Related Rules

- [BR-10](/resources/kosit-validator-errors/br-10-buyer-postal-address-required)
- [BR-DE-9](/resources/kosit-validator-errors/br-de-9-buyer-post-code-required)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
