# BR-57 Deliver-to country code must be present when delivery address is used

Under EN 16931 rule BR-57, whenever an invoice specifies a distinct delivery address (BG-15 / DELIVER TO ADDRESS), the deliver-to country code (BT-80) must be explicitly provided using a valid two-letter ISO 3166-1 alpha-2 country code (such as DE, FR, NL, AT, or IT). Tax compliance and customs algorithms require the delivery country code to verify cross-border VAT treatment, intra-community supply status, and export tax exemptions.

## Problem Description

Under EN 16931 rule BR-57, whenever an invoice specifies a distinct delivery address (BG-15 / DELIVER TO ADDRESS), the deliver-to country code (BT-80) must be explicitly provided using a valid two-letter ISO 3166-1 alpha-2 country code (such as DE, FR, NL, AT, or IT). Tax compliance and customs algorithms require the delivery country code to verify cross-border VAT treatment, intra-community supply status, and export tax exemptions.

> **ERROR**: XRechnung 3.0

## Context and Significance

An incomplete delivery address without country code fails Schematron rule BR-57 and prevents automated tax determination on cross-border invoices.

## Solution

In your sales order or shipping configuration, verify that the delivery address includes the two-letter ISO country code. In UBL 2.1 syntax, populate <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country> within <cac:Delivery><cac:DeliveryLocation><cac:Address>. In UN/CEFACT CII syntax, populate <ram:CountryID>DE</ram:CountryID> within <ram:PostalTradeAddress> under <ram:ShipToTradeParty>. If delivery is made to the buyer’s standard billing address, omit BG-15 completely.

- validate
- convert

## Valid Examples

- Delivery address BG-15 with BT-80 = "DE" (Delivery within Germany)
- Delivery address BG-15 with BT-80 = "FR" (Cross-border delivery to France)

## Invalid Examples

- Delivery address (cac:Address / ram:PostalTradeAddress) includes street and city but omits Country element
- cac:Country element instantiated with empty IdentificationCode (<cbc:IdentificationCode/>)

## Code Examples

### Valid XML
```
<cac:Delivery>
  <cac:DeliveryLocation>
    <cac:Address>
      <cbc:CityName>Köln</cbc:CityName>
      <cbc:PostalZone>50667</cbc:PostalZone>
      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
    </cac:Address>
  </cac:DeliveryLocation>
</cac:Delivery>
```

### Invalid XML
```
<cac:Delivery>
  <cac:DeliveryLocation>
    <cac:Address>
      <cbc:CityName>Köln</cbc:CityName>
      <cbc:PostalZone>50667</cbc:PostalZone>
      <!-- cac:Country (BT-80) missing from delivery address -->
    </cac:Address>
  </cac:DeliveryLocation>
</cac:Delivery>
```

## Affected Fields

- [BT-80 Deliver to country code](/resources/xrechnung/bt-80-deliver-to-country-code)
- [BG-15 Deliver to address](/resources/xrechnung)

## Related Rules

- [BR-DE-10](/resources/kosit-validator-errors/br-de-10-deliver-to-city-required)
- [BR-DE-11](/resources/kosit-validator-errors/br-de-11-deliver-to-post-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.
