Skip to content

API reference / Quittio \ Country \ CH \ QrBill

CreditorReference

final class in quittio/country-ch

Quittio\Country\CH\QrBill\CreditorReference · Source

The Creditor Reference of ISO 11649: "RF", two check digits (modulo 97-10) and up to 21 letters and digits. It goes with an ordinary IBAN in the Swiss QR bill.

Methods#

MethodDescription
::format()The reference in blocks of four for printing.
::fromCharactersOf()The Creditor Reference of the letters and digits of $value, e.g. of an invoice number; null without any or with more than 21.
::isValid()Whether $reference (spaces allowed, any case) is a Creditor Reference with correct check digits.

format()#

public static function format(string $reference): string

static

The reference in blocks of four for printing.

ParameterTypeDescription
$referencestring
Returns
string

fromCharactersOf()#

public static function fromCharactersOf(string $value): ?string

static

The Creditor Reference of the letters and digits of $value, e.g. of an invoice number; null without any or with more than 21.

ParameterTypeDescription
$valuestring
Returns
?string

isValid()#

public static function isValid(string $reference): bool

static

Whether $reference (spaces allowed, any case) is a Creditor Reference with correct check digits.

ParameterTypeDescription
$referencestring
Returns
bool

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.