Skip to content

BR-CL-14: Country code of an address not according to ISO 3166-1

Official message

[BR-CL-14] Country codes in an invoice MUST be coded using ISO code list 3166-1

EN 16931 (CII) · Error · Message language: English · Version: xrechnung-3.0.2-validator-configuration-2026-08-31

[BR-CL-14] Country codes in an invoice MUST be coded using ISO code list 3166-1

EN 16931 (UBL) · Error · Message language: English · Version: xrechnung-3.0.2-validator-configuration-2026-08-31
Severity
Error The invoice is invalid and may be rejected by the recipient.
Applies to
EN 16931 (CII), EN 16931 (UBL)

What does this mean?

Country codes in an invoice must be coded as two-letter code according to ISO 3166-1 (alpha-2), e.g. DE, AT or FR. This rule checks the country codes of the addresses, such as seller (BT-40), buyer (BT-55), tax representative (BT-69) and deliver-to address (BT-80). The value given is not in that list.
CII: every ram:CountryID is checked. UBL: every cac:Country/cbc:IdentificationCode is checked.

Typical causes

A country name ("Germany") or a three-letter code (DEU) instead of the two-letter code.
Lower case (de) or spaces.
A code not contained in ISO 3166-1, e.g. UK instead of GB for the United Kingdom.

How to fix the error

State the two-letter country code according to ISO 3166-1 alpha-2 in upper case.
CII: ram:PostalTradeAddress/ram:CountryID, UBL: cac:PostalAddress/cac:Country/cbc:IdentificationCode.
Generate and validate the invoice again.

In E-Rechnungsfreund

In the invoice form, section "Verkäufer (BG-4)" (seller) or "Käufer (BG-7)" (buyer), select a country from the list in the field "Land (BT-40/55)" (country). In the "Experte" view the same applies to "Steuervertreter (BG-11)" (tax representative) and "Lieferadresse / abw. Empfänger (BG-13)" (deliver-to address).

Example

Wrong

<ram:PostalTradeAddress>
  <ram:PostcodeCode>10115</ram:PostcodeCode>
  <ram:CityName>Berlin</ram:CityName>
  <ram:CountryID>DEU</ram:CountryID>
</ram:PostalTradeAddress>

Correct

<ram:PostalTradeAddress>
  <ram:PostcodeCode>10115</ram:PostcodeCode>
  <ram:CityName>Berlin</ram:CityName>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
For developers: test expression per syntax

EN 16931 (CII) (CII)

Context: ram:CountryID

((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AN AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BL BJ BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' '))))

EN 16931 (UBL) (UBL)

Context: cac:Country/cbc:IdentificationCode

((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', normalize-space(.), ' '))))

Related validation rules

  • BR-CL-01: Invoice type code (BT-3) not from UNTDID 1001
  • BR-CL-03: Currency attribute currencyID not according to ISO 4217
  • BR-CL-04: Invoice currency code (BT-5) not according to ISO 4217
  • BR-CL-05: VAT accounting currency code (BT-6) not according to ISO 4217
  • BR-CL-06: Value added tax point date code (BT-8) not permitted
  • BR-CL-07: Object identifier scheme (BT-18-1, BT-128-1) not from UNTDID 1153

Last updated:
Explanation of the validation rule, not legal or tax advice.