Zum Inhalt springen

API reference / Quittio \ Country \ CH \ QrBill

SwissQrBillGenerator

final class in quittio/country-ch · implements ProvidesPaymentSlip

Quittio\Country\CH\QrBill\SwissQrBillGenerator · Source

The Swiss QR bill: the Swiss QR Code (Swiss Payments Code "SPC", version 0200) and its payment part with receipt, after the Swiss Implementation Guidelines QR-bill 2.3 of SIX.

  • Account: the first credit transfer account (BT-84) with an IBAN of Switzerland or Liechtenstein; a QR-IBAN (institution identification 30000 to 31999) needs a QR reference.
  • Reference: the remittance information (BT-83) if it is a QR reference (with a QR-IBAN) or a Creditor Reference (with an IBAN); with a QR-IBAN otherwise the QR reference of the digits of the invoice number. Without one the code has no reference (NON) and the remittance information or the invoice number as unstructured message.
  • Creditor: the account holder (or the seller) with the seller's address; debtor: the buyer. Addresses are structured (type "S"): a building number at the end of the street is written as building number.
  • Amount: the amount due (BT-115), in CHF or EUR.

Constants#

ConstantValueDescription
KEY'swiss-qr-bill'

Methods#

MethodDescription
::isQrIban()Whether the IBAN is a QR-IBAN (institution identification 30000 to 31999).
->key()
->payload()
->slip()The payment part and receipt of the code $payload, read from the code itself, so that they show its amount and reference also for a payment reminder.
->supports()

isQrIban()#

public static function isQrIban(string $iban): bool

static

Whether the IBAN is a QR-IBAN (institution identification 30000 to 31999).

ParameterTypeDescription
$ibanstring
Returns
bool

key()#

public function key(): string
Returns
string

payload()#

public function payload(InvoiceData $invoice, array<string, mixed> $options = []): ?string
ParameterTypeDescription
$invoiceInvoiceData
$optionsarray<string, mixed> = []"value": the amount instead of the amount due; "remittance": the remittance information instead of BT-83
Returns
?string

slip()#

public function slip(InvoiceData $invoice, string $payload, string $locale): ?PaymentSlip

The payment part and receipt of the code $payload, read from the code itself, so that they show its amount and reference also for a payment reminder.

ParameterTypeDescription
$invoiceInvoiceData
$payloadstring
$localestring
Returns
?PaymentSlip

supports()#

public function supports(InvoiceData $invoice): bool
ParameterTypeDescription
$invoiceInvoiceData
Returns
bool

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.