# BT-12 Contract reference

Reference to the contract that governs the invoiced delivery or service.

## Quick answer

Reference to the contract that governs the invoiced delivery or service.

> **Invoice basics**: Core document identifiers, dates, process identifiers, and high-level invoice context.

## In plain language

Reference to the contract that governs the invoiced delivery or service.

Reference to the contract that governs the invoiced delivery or service.

The contract reference helps buyers match the invoice to the legal agreement behind the order.

## What you usually enter here

Internal or external contract identifier

Typical valid values include: CON-2026-14

Optional according to EN 16931-1.

## What goes wrong often

Avoid values like: , AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

## Examples in context

The contract reference helps buyers match the invoice to the legal agreement behind the order.

Optional according to EN 16931-1.

## Valid Examples

- CON-2026-14

## Invalid Examples

- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

## Related Fields

The contract reference helps buyers match the invoice to the legal agreement behind the order.

- [BT-13 Purchase Order Reference](/resources/xrechnung/bt-13-purchase-order-reference)
- [BT-17 Tender or lot reference](/resources/xrechnung/bt-17-tender-or-lot-reference)

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

### Data Type:
text

### Cardinality:
0..1

### Requirement:
Optional

### Max Length:
50 characters

### Since Version:
Optional

## XML Implementation

### UBL 2.1 Syntax
```
/Invoice/cac:ContractDocumentReference/cbc:ID
```

### CII (UN/CEFACT) Syntax
```
/CrossIndustryInvoice/SupplyChainTradeTransaction/ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID
```

## Why the standard cares about this field

### Business Context
The contract reference helps buyers match the invoice to the legal agreement behind the order.

### Legal Requirement
Optional according to EN 16931-1.

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