xrechnung-kit API reference

Party
in package

FinalYes

A party on the invoice: seller (AccountingSupplierParty) or buyer (AccountingCustomerParty). One VO covers both roles; the role-aware named constructors enforce the role-specific invariants:

  • Party::business(...) for non-government buyers and for sellers
    • Party::publicAdministration(...) for German federal recipients (BT-10 Leitweg-ID required)

Direct construction via __construct is allowed but will not enforce the role-specific invariants; consumers should prefer the named constructors.

Table of Contents

Constants

LEITWEG_ID_PATTERN  = '/^\d{2,12}-[A-Za-z0-9]{1,30}-\d{2}$/'
Leitweg-ID format per the German federal e-invoicing portal: 2..12 digits, dash, 1..30 alphanumeric, dash, 2 digits.

Properties

$address  : Address
$contact  : Contact|null
$endpointEmail  : string|null
$leitwegId  : string|null
$name  : string
$taxId  : TaxId|null

Methods

__construct()  : mixed
business()  : self
Construct a non-government party. No Leitweg-ID; either side of the invoice.
publicAdministration()  : self
Construct a German public-administration buyer. Leitweg-ID (BT-10) is required; the kit rejects construction without one because the recipient portal will reject the invoice without it.

Constants

LEITWEG_ID_PATTERN

Leitweg-ID format per the German federal e-invoicing portal: 2..12 digits, dash, 1..30 alphanumeric, dash, 2 digits.

public mixed LEITWEG_ID_PATTERN = '/^\d{2,12}-[A-Za-z0-9]{1,30}-\d{2}$/'

Properties

$endpointEmail read-only

public string|null $endpointEmail = null

$leitwegId read-only

public string|null $leitwegId = null

$name read-only

public string $name

Methods

__construct()

public __construct(string $name, Address $address[, TaxId|null $taxId = null ][, Contact|null $contact = null ][, string|null $leitwegId = null ][, string|null $endpointEmail = null ]) : mixed
Parameters
$name : string
$address : Address
$taxId : TaxId|null = null
$contact : Contact|null = null
$leitwegId : string|null = null
$endpointEmail : string|null = null

business()

Construct a non-government party. No Leitweg-ID; either side of the invoice.

public static business(string $name, Address $address[, TaxId|null $taxId = null ][, Contact|null $contact = null ][, string|null $endpointEmail = null ]) : self
Parameters
$name : string
$address : Address
$taxId : TaxId|null = null
$contact : Contact|null = null
$endpointEmail : string|null = null
Return values
self

publicAdministration()

Construct a German public-administration buyer. Leitweg-ID (BT-10) is required; the kit rejects construction without one because the recipient portal will reject the invoice without it.

public static publicAdministration(string $name, Address $address, string $leitwegId[, Contact|null $contact = null ][, string|null $endpointEmail = null ]) : self
Parameters
$name : string
$address : Address
$leitwegId : string
$contact : Contact|null = null
$endpointEmail : string|null = null
Return values
self

        
On this page

Search results