# 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

> **ERROR**: EN 16931 core business rule (CEN)

## Context and Significance

This is an EN 16931 core rule. The seller country drives VAT treatment and cross-border handling, so the seller address must always contain a country code. A country written only in an address line does not count, and the code must be a valid ISO 3166-1 alpha-2 value (BR-CL-14). In CII, BT-40 is ram:PostalTradeAddress/ram:CountryID.

## Solution

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

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

## 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://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://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/)
- [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.
