# BR-49 Payment instruction must specify a payment means type code

A Payment instruction (BG-16) shall specify the Payment means type code (BT-81).

## Problem Description

> **ERROR**: EN 16931 core business rule (CEN)

## Context and Significance

This is an EN 16931 core rule. The payment means code (BT-81) tells the buyer how to pay, and other rules depend on it; for example, BR-61 requires an account for codes 30 and 58. The UBL schema already requires cbc:PaymentMeansCode, so BR-49 is mainly reported for CII invoices whose payment means group holds only an IBAN, typically when the payment method is not set in the customer record.

## Solution

Add cac:PaymentMeans/cbc:PaymentMeansCode (CII: ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode) from UNCL4461, for example 58 for SEPA credit transfer, 30 for credit transfer, 59 for SEPA direct debit or 48 for bank card.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=BR-49)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=BR-49)

## Valid Examples

- BT-81 = 58 (SEPA credit transfer)

## Invalid Examples

- CII ram:SpecifiedTradeSettlementPaymentMeans with only ram:PayeePartyCreditorFinancialAccount/ram:IBANID and no ram:TypeCode; in UBL a cac:PaymentMeans without cbc:PaymentMeansCode is already an XML schema error

## Code Examples

### Valid XML
```
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>58</ram:TypeCode>
  <ram:PayeePartyCreditorFinancialAccount>
    <ram:IBANID>DE89370400440532013000</ram:IBANID>
  </ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
```

### Invalid XML
```
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:PayeePartyCreditorFinancialAccount>
    <ram:IBANID>DE89370400440532013000</ram:IBANID>
  </ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
```

## Affected Fields

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

## Related Rules

- [BR-50](/resources/kosit-validator-errors/br-50-credit-transfer-account-identifier-required)
- [BR-61](/resources/kosit-validator-errors/br-61-credit-transfer-account-required)

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