# BR-CO-9 VAT identifiers must carry an ISO 3166-1 alpha-2 country prefix

The Seller VAT identifier (BT-31), Seller tax representative VAT identifier (BT-63) and Buyer VAT identifier (BT-48) must each begin with an ISO 3166-1 alpha-2 country code (for example "DE", "FR", "IT").

## Problem Description

The Seller VAT identifier (BT-31), Seller tax representative VAT identifier (BT-63) and Buyer VAT identifier (BT-48) must each begin with an ISO 3166-1 alpha-2 country code (for example "DE", "FR", "IT").

> **ERROR**: XRechnung 3.0

## Context and Significance

Peppol access points and EU VIES validation rely on the country prefix to route the invoice and to verify the VAT number against the correct national registry. Missing prefixes cause Peppol delivery failures and VIES lookup errors before the buyer ever sees the invoice.

## Solution

Prefix every VAT ID with the correct two-letter country code, for example "DE123456789" instead of "123456789".

- validate
- convert

## Valid Examples

- BT-31 = "DE123456789"
- BT-48 = "FR12345678901"
- BT-63 = "IT12345678901"

## Invalid Examples

- BT-31 = "123456789" (no DE prefix)
- BT-48 = "GERMANY-123" (non ISO prefix)
- BT-63 = "EU123456789" (EU is not an ISO 3166-1 alpha-2 country code)

## Technical Details

### Affected Fields
BT-31 Seller VAT identifier, BT-48 Buyer VAT identifier, BT-63 Seller tax representative VAT identifier

## Related Rules

- [BR-CO-26](/resources/kosit-validator-errors/br-co-26-seller-must-be-identifiable)
- [BR-DE-16](/resources/kosit-validator-errors/br-de-16-business-process-type-must-be-provided)

## 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.
