# BR-DE-9 Buyer post code must be provided

Under the German XRechnung profile and German tax legislation (§ 14 UStG), the postal address of the buyer (BG-8) must contain a postal code (BT-53). For public procurement invoices in Germany, an exact postal code is essential to differentiate between different regional offices, schools, police stations, or municipal branches of the contracting authority.

## Problem Description

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

## Context and Significance

Missing buyer post codes fail rule BR-DE-9. German public invoice clearing hubs require valid postal codes for automated invoice routing to the relevant accounting authority.

## Solution

In your customer master data, ensure the postal code field is completed on the buyer profile. In UBL 2.1 syntax, populate <cbc:PostalZone> within <cac:AccountingCustomerParty><cac:Party><cac:PostalAddress>. In UN/CEFACT CII syntax, populate <ram:PostcodeCode> within <ram:BuyerTradeParty><ram:PostalTradeAddress>. Do not embed the postal code into the street name or city name fields.

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

## Valid Examples

- Buyer postal address with BT-53 = "20095" and BT-52 = "Hamburg"
- Buyer postal address with BT-53 = "80331" and BT-52 = "München"

## Invalid Examples

- Buyer postal address specifying street and city but omitting cbc:PostalZone / ram:PostcodeCode
- Buyer postal zone element left as empty tag (<cbc:PostalZone/>)

## Code Examples

### Valid XML
```
<cac:PostalAddress>
  <cbc:StreetName>Poststraße 12</cbc:StreetName>
  <cbc:CityName>Hamburg</cbc:CityName>
  <cbc:PostalZone>20354</cbc:PostalZone>
  <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
</cac:PostalAddress>
```

### Invalid XML
```
<cac:PostalAddress>
  <cbc:StreetName>Poststraße 12</cbc:StreetName>
  <cbc:CityName>Hamburg</cbc:CityName>
  <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
</cac:PostalAddress>
```

## Affected Fields

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

## Related Rules

- [BR-10](/resources/kosit-validator-errors/br-10-buyer-postal-address-required)
- [BR-DE-8](/resources/kosit-validator-errors/br-de-8-buyer-city-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.
