# BR-09 Seller country code is required

The Seller postal address (BG-5) shall contain a Seller country code (BT-40) identifying the seller’s country.

## Problem Description

The Seller postal address (BG-5) shall contain a Seller country code (BT-40) identifying the seller’s country.

> **ERROR**: XRechnung 3.0

## Context and Significance

This is a core EN16931 rule; the country determines VAT treatment and cross-border handling, so the seller address must always name a country.

## Solution

Add cac:PostalAddress/cac:Country/cbc:IdentificationCode with an ISO 3166-1 alpha-2 code such as DE.

- validate
- convert

## Valid Examples

- BT-40 = DE — ISO 3166-1 alpha-2 country code present

## Invalid Examples

- cac:Country/cbc:IdentificationCode is missing inside the seller postal address

## Code Examples

### Valid XML
```
<cac:PostalAddress>
  <cbc:CityName>Berlin</cbc:CityName>
  <cac:Country>
    <cbc:IdentificationCode>DE</cbc:IdentificationCode>
  </cac:Country>
</cac:PostalAddress>
```

### Invalid XML
```
<cac:PostalAddress>
  <cbc:CityName>Berlin</cbc:CityName>
  <cbc:PostalZone>10115</cbc:PostalZone>
</cac:PostalAddress>
```

## Affected Fields

- [BT-40 Seller country code](/resources/xrechnung/bt-40-seller-country-code)

## Related Rules

- [BR-08](/resources/kosit-validator-errors/br-08-seller-postal-address-required)
- [BR-11](/resources/kosit-validator-errors/br-11-buyer-country-code-required)

## Validation Tools

- [Official KoSIT Validator](https://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
