---
title: "CountryPack – API-Referenz · Quittio"
description: "Everything that differs between countries."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Countries/CountryPack"
locale: de
meta:
  "og:description": "Everything that differs between countries."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "CountryPack – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Countries](https://quittio.dev/docs/api/Quittio/Core/Countries)

# CountryPack

interface in quittio/core

`Quittio\Core\Countries\CountryPack` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Countries/CountryPack.php#L22)

Everything that differs between countries.

A country pack may only add or tighten rules; it never relaxes EN 16931 rules.

## Methods \#

| Method | Description |
| --- | --- |
| `->addressFormatter()` | Formats postal addresses by the conventions of the country, e.g. for the address window. |
| `->buyerCountryRules()` | Rules applied when the pack's country is the buyer's country of a cross-border invoice. |
| `->code()` | ISO 3166-1 alpha-2 code, e.g. "DE". |
| `->correctionPolicy()` | Cancellation and correction strategies and titles; see CorrectionPolicy for who uses what. |
| `->defaults()` | Defaults of the country: locale, paper, letter layout, payment QR code and default VAT presets, plus informational values (currency, time zone, profile); see CountryDefaults. |
| `->dunningLaw()` | Statutory late payment rules. Informational metadata for applications, e.g. to compute fees and default interest for DocumentBuilder::fee() and interest(); the core does not apply them. |
| `->exporters()` | Export formats the pack declares (e.g. DATEV). Informational metadata for applications; Quittio runs no exporter. |
| `->formatRules()` | Format choice for domestic invoices. |
| `->legalTexts()` | Legal and informational texts of the country by key and locale. Informational metadata for applications and the pack's own presets and rules; the core adds none of them to an invoice by itself. |
| `->letterLayouts()` | Letter layouts by name (e.g. din5008a, din5008b); CountryDefaults::$letterLayout selects the default. |
| `->mandatoryOutput()` | Values that the PDF of $invoice must show by law; the mandatory field guard checks that the template printed them. |
| `->numberingRules()` | Numbering requirements; the Managed layer applies pattern and resets (see NumberingRules). |
| `->paymentQr()` | Payment QR code generator of the country, used for the type "auto" unless CountryDefaults::$paymentQr is "none" (an application's generator registered with Quittio::setPaymentQrGenerator() comes first); null = the EPC GiroCode for "girocode". |
| `->profiles()` | National profiles, e.g. XRechnung. |
| `->readers()` | Readers for national formats. Quittio::read() and validateFile() try them after the CII and UBL readers, for every registered pack; return new instances on every call (readers keep the state of one document). |
| `->retention()` | Retention period of issued invoices; the Managed layer stores the end of it. |
| `->rules()` | Additional validation rules (L3) applied when the pack is the leading pack. |
| `->taxPresets()` | Tax presets of the country by key (e.g. "de.small\_business"). Informational metadata for applications, e.g. to offer them in a form or to resolve a stored LineVat::$presetKey; the core does not apply it: lines take a preset with LineBuilder::vat(). |
| `->translationPath()` | Directory with translation files ({locale}/{group}.php) of the pack, if any. |

### `addressFormatter()`#

```
public function addressFormatter(): AddressFormatter
```

Formats postal addresses by the conventions of the country, e.g. for the address window.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/View/AddressFormatter">AddressFormatter</a></code></dd>
</dl>

### `buyerCountryRules()`#

```
public function buyerCountryRules(): list<Rule>
```

Rules applied when the pack's country is the buyer's country of a cross-border invoice.

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Validation/Rule">Rule</a>&gt;</code></dd>
</dl>

### `code()`#

```
public function code(): string
```

ISO 3166-1 alpha-2 code, e.g. "DE".

<dl><dt>Returns</dt>
<dd><code>string</code></dd>
</dl>

### `correctionPolicy()`#

```
public function correctionPolicy(): CorrectionPolicy
```

Cancellation and correction strategies and titles; see CorrectionPolicy for who uses what.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/CorrectionPolicy">CorrectionPolicy</a></code></dd>
</dl>

### `defaults()`#

```
public function defaults(): CountryDefaults
```

Defaults of the country: locale, paper, letter layout, payment QR code and default VAT presets, plus informational values (currency, time zone, profile); see CountryDefaults.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/CountryDefaults">CountryDefaults</a></code></dd>
</dl>

### `dunningLaw()`#

```
public function dunningLaw(): DunningLaw
```

Statutory late payment rules. Informational metadata for applications, e.g. to compute fees and default interest for DocumentBuilder::fee() and interest(); the core does not apply them.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/DunningLaw">DunningLaw</a></code></dd>
</dl>

### `exporters()`#

```
public function exporters(): list<Exporter>
```

Export formats the pack declares (e.g. DATEV). Informational metadata for applications; Quittio runs no exporter.

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Countries/Exporter">Exporter</a>&gt;</code></dd>
</dl>

### `formatRules()`#

```
public function formatRules(): list<FormatRule>
```

Format choice for domestic invoices.

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Formats/FormatRule">FormatRule</a>&gt;</code></dd>
</dl>

### `legalTexts()`#

```
public function legalTexts(): LegalTextCatalog
```

Legal and informational texts of the country by key and locale. Informational metadata for applications and the pack's own presets and rules; the core adds none of them to an invoice by itself.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/LegalTextCatalog">LegalTextCatalog</a></code></dd>
</dl>

### `letterLayouts()`#

```
public function letterLayouts(): array<string, LetterLayout>
```

Letter layouts by name (e.g. din5008a, din5008b); CountryDefaults::$letterLayout selects the default.

<dl><dt>Returns</dt>
<dd><code>array&lt;string, <a href="https://quittio.dev/docs/api/Quittio/Core/View/LetterLayout">LetterLayout</a>&gt;</code></dd>
</dl>

### `mandatoryOutput()`#

```
public function mandatoryOutput(InvoiceData $invoice): MandatoryFieldList
```

Values that the PDF of $invoice must show by law; the mandatory field guard checks that the template printed them.

| Parameter | Type | Description |
| --- | --- | --- |
| `$invoice` | `[InvoiceData](https://quittio.dev/docs/api/Quittio/Core/Data/InvoiceData)` | |

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/MandatoryFieldList">MandatoryFieldList</a></code></dd>
</dl>

### `numberingRules()`#

```
public function numberingRules(): NumberingRules
```

Numbering requirements; the Managed layer applies pattern and resets (see NumberingRules).

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/NumberingRules">NumberingRules</a></code></dd>
</dl>

### `paymentQr()`#

```
public function paymentQr(): ?PaymentQrGenerator
```

Payment QR code generator of the country, used for the type "auto" unless CountryDefaults::$paymentQr is "none" (an application's generator registered with Quittio::setPaymentQrGenerator() comes first); null = the EPC GiroCode for "girocode".

<dl><dt>Returns</dt>
<dd><code>?<a href="https://quittio.dev/docs/api/Quittio/Core/Pdf/Qr/PaymentQrGenerator">PaymentQrGenerator</a></code></dd>
</dl>

### `profiles()`#

```
public function profiles(): list<Profile>
```

National profiles, e.g. XRechnung.

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Profiles/Profile">Profile</a>&gt;</code></dd>
</dl>

### `readers()`#

```
public function readers(): list<FormatReader>
```

Readers for national formats. Quittio::read() and validateFile() try them after the CII and UBL readers, for every registered pack; return new instances on every call (readers keep the state of one document).

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Reading/FormatReader">FormatReader</a>&gt;</code></dd>
</dl>

### `retention()`#

```
public function retention(): RetentionRule
```

Retention period of issued invoices; the Managed layer stores the end of it.

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Countries/RetentionRule">RetentionRule</a></code></dd>
</dl>

### `rules()`#

```
public function rules(): list<Rule>
```

Additional validation rules (L3) applied when the pack is the leading pack.

<dl><dt>Returns</dt>
<dd><code>list&lt;<a href="https://quittio.dev/docs/api/Quittio/Core/Validation/Rule">Rule</a>&gt;</code></dd>
</dl>

### `taxPresets()`#

```
public function taxPresets(): TaxPresetCollection
```

Tax presets of the country by key (e.g. "de.small\_business"). Informational metadata for applications, e.g. to offer them in a form or to resolve a stored LineVat::$presetKey; the core does not apply it: lines take a preset with LineBuilder::vat().

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Tax/TaxPresetCollection">TaxPresetCollection</a></code></dd>
</dl>

### `translationPath()`#

```
public function translationPath(): ?string
```

Directory with translation files ({locale}/{group}.php) of the pack, if any.

<dl><dt>Returns</dt>
<dd><code>?string</code></dd>
</dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Core/Countries/CountryPack#webpage","@type":"WebPage","description":"Everything that differs between countries.","name":"CountryPack – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Countries/CountryPack","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Countries/CountryPack"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```