# BR-AE-02 Reverse charge invoice line requires seller and buyer tax identifiers

An invoice that contains an invoice line (BG-25) where the invoiced item VAT category code (BT-151) is "Reverse charge" (AE) shall contain the Seller VAT identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63), and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47).

## Problem Description

> **ERROR**: EN 16931 VAT category rule

> **Where BR-AE-02 is checked**
>
> A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. BR-AE-02: EN 16931 VAT category rule, reported in the stage “EN 16931 rules”.

## Solution

Enter a seller tax identifier (BT-31, BT-32 or BT-63) and a buyer identifier (BT-48 or BT-47) as soon as one line carries category AE. In UBL, BT-48 is cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID with TaxScheme VAT, and BT-47 is cac:PartyLegalEntity/cbc:CompanyID. For cross-border reverse charge within the EU, prefer the buyer VAT identifier in BT-48, because EU invoicing rules require it when the buyer is liable for the VAT.

- [Check XML for free](/en/xrechnung-validator?source=resource&rule=BR-AE-02)

## Context and Significance

Under reverse charge, the buyer, not the seller, accounts for the VAT, so both parties must be identifiable on the invoice. In practice, the error occurs most often when the customer VAT number is shown on the PDF but is missing from the customer master data or the XML export.

## Valid Examples

- Line with BT-151 = AE, seller BT-31 = DE123456789 and buyer BT-48 = FR32123456789

## Invalid Examples

- Line with BT-151 = AE and seller BT-31 present, but no BT-48 or BT-47 for the buyer
- Line with BT-151 = AE and no seller tax identifier (BT-31, BT-32 or BT-63)

## Code Examples

### Valid XML
```
<cac:AccountingSupplierParty>
  <cac:Party>
    <cac:PartyTaxScheme>
      <cbc:CompanyID>DE123456789</cbc:CompanyID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
  <cac:Party>
    <cac:PartyTaxScheme>
      <cbc:CompanyID>FR32123456789</cbc:CompanyID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:Party>
</cac:AccountingCustomerParty>
<cac:InvoiceLine>
  <cac:Item>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>AE</cbc:ID>
      <cbc:Percent>0</cbc:Percent>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:ClassifiedTaxCategory>
  </cac:Item>
</cac:InvoiceLine>
```

### Invalid XML
```
<cac:AccountingSupplierParty>
  <cac:Party>
    <cac:PartyTaxScheme>
      <cbc:CompanyID>DE123456789</cbc:CompanyID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
  <cac:Party>
    <cac:PartyLegalEntity>
      <cbc:RegistrationName>Client SARL</cbc:RegistrationName>
    </cac:PartyLegalEntity>
  </cac:Party>
</cac:AccountingCustomerParty>
<cac:InvoiceLine>
  <cac:Item>
    <cac:ClassifiedTaxCategory>
      <cbc:ID>AE</cbc:ID>
      <cbc:Percent>0</cbc:Percent>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:ClassifiedTaxCategory>
  </cac:Item>
</cac:InvoiceLine>
```

## Affected Fields

- [BT-31 Seller VAT identifier](/resources/xrechnung/bt-31-seller-vat-identifier)
- [BT-32 Seller tax registration identifier](/resources/xrechnung/bt-32-seller-tax-registration-identifier)
- [BT-63 Seller tax representative VAT identifier](/resources/xrechnung/bt-63-seller-tax-representative-vat-identifier)
- [BT-48 Buyer VAT identifier](/resources/xrechnung/bt-48-buyer-vat-identifier)
- [BT-47 Buyer legal registration identifier](/resources/xrechnung/bt-47-buyer-legal-registration-identifier)
- [BT-151 Invoiced item VAT category code](/resources/xrechnung/bt-151-invoice-line-vat-category-code)

## Related Rules

- [BR-AE-01](/resources/kosit-validator-errors/br-ae-01-reverse-charge-vat-breakdown-required)
- [BR-AE-03](/resources/kosit-validator-errors/br-ae-03-reverse-charge-allowance-seller-buyer-vat-id)
- [BR-AE-04](/resources/kosit-validator-errors/br-ae-04-reverse-charge-charge-seller-buyer-vat-id)

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