# BT-87 Payment card primary account number

Masked primary account number of the payment card when card payment details are referenced.

## Quick answer

Masked primary account number of the payment card when card payment details are referenced.

> **Delivery and payment**: Delivery dates, payment means, and the operational context around settlement.

## In plain language

Masked primary account number of the payment card when card payment details are referenced.

Masked primary account number of the payment card when card payment details are referenced.

Only use this in rare card-payment scenarios and never expose the full card number.

## What you usually enter here

Masked card number only

Typical valid values include: 123456******1234

Optional according to EN 16931-1, but BR-51 forbids exposing the full card number. Only masked values are acceptable.

## What goes wrong often

Avoid values like: 4111111111111111

Relevant rule codes: BR-51

## Examples in context

Only use this in rare card-payment scenarios and never expose the full card number.

Optional according to EN 16931-1, but BR-51 forbids exposing the full card number. Only masked values are acceptable.

## Valid Examples

- 123456******1234

## Invalid Examples

- 4111111111111111

## Related Fields

Only use this in rare card-payment scenarios and never expose the full card number.

- [BT-88 Payment card holder name](/resources/xrechnung/bt-88-payment-card-holder-name)
- [BT-81 Payment means type code](/resources/xrechnung/bt-81-payment-means-type-code)

## XML mapping and field facts

Open the technical reference if you need XML paths, validator rule codes, legal wording, or schema-specific mapping details.

### Field ID:
BT-87

### Data Type:
text

### Cardinality:
0..1

### Requirement:
Optional

### Max Length:
35 characters

### Since Version:
Optional

## XML Implementation

### UBL 2.1 Syntax
```
/Invoice/cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID
```

### CII (UN/CEFACT) Syntax
```
/CrossIndustryInvoice/SupplyChainTradeTransaction/ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID
```

## Validation Rules

### BR-51
BR-51

## Why the standard cares about this field

### Business Context
Only use this in rare card-payment scenarios and never expose the full card number.

### Legal Requirement
Optional according to EN 16931-1, but BR-51 forbids exposing the full card number. Only masked values are acceptable.

## Official sources and tools

- [KoSIT Validator](https://erechnungsvalidator.service-bw.de/)
- [Invoice Converter](/pdf-to-xrechnung)
- [XRechnung Standard](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
