HomeError code lexicon › BR-51
BR-51 Field BT-87 EN 16931 core rules (BR)

Fix BR-51: Full card number

[BR-51] In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown

BR-51 in your own invoice? Upload the file and find every error in seconds.

What does BR-51 mean?

An invoice must never state the full card primary account number (BT-87). The security standards for card payments allow at most the first six and the last four digits. You must mask every digit in between. That protects the buyer's card data.

Common causes of BR-51

How to fix BR-51

  1. Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-87 along this XPath:/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID
  2. Apply the fix. Mask the middle digits in ram:ApplicableTradeSettlementFinancialCard/ram:ID so that only the first six and the last four remain, for example 411111______1111.
  3. Validate again. Save the file and validate it again to check that BR-51 is no longer reported.
Concrete fix

Mask the middle digits in ram:ApplicableTradeSettlementFinancialCard/ram:ID so that only the first six and the last four remain, for example 411111______1111.

XPath/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID

Before / after: the XML example

This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).

Wrong
<ram:ApplicableTradeSettlementFinancialCard>
  <ram:ID>4111111111111111</ram:ID>
  <ram:CardholderName>Max Mustermann</ram:CardholderName>
</ram:ApplicableTradeSettlementFinancialCard>
Correct
<ram:ApplicableTradeSettlementFinancialCard>
  <ram:ID>411111______1111</ram:ID>
  <ram:CardholderName>Max Mustermann</ram:CardholderName>
</ram:ApplicableTradeSettlementFinancialCard>

Frequent questions about BR-51

How many digits may I show?
At most the first six and the last four. Fewer is allowed, more is not. Replace the middle digits with placeholders.
Do I have to give the card number at all?
No. The field is optional. If you set it, then only in masked form.

Related error codes

Check BR-51 automatically

Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.

Find every error automatically instead of searching by hand

Upload your ZUGFeRD, Factur-X or XRechnung file – you get every violation back with rule ID, field, fix and XPath.

Validate online for free
Check invoice