Generate QR codes for SEPA payments
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

sepa-qr-php Build status

Generates SEPA QR codes based on the European Payments Council's standard. These QR codes are scannable by many mobile banking apps. Because app support is at a decent level, it is a good idea to print such a code on an invoice.

Extends the QrCode library preserving all its functionality in case lower level QR code manipulation is needed.


composer require smhg/sepa-qr


use SepaQr\SepaQr;

$sepaQr = new SepaQr();

  ->setName('Name of the beneficiary')
  ->setAmount(100) // The amount in Euro
  ->setRemittanceText('Invoice 123456789')

// Output to browser:
header('Content-Type: ' . $sepaQr->getContentType());
echo $sepaQr->writeString();

// Or, generate a temporary file:
$tmpFileName = tempnam('/tmp', 'prefix');
$tmpFile = fopen($tmpFileName, 'w');
fwrite($tmpFile, $sepaQr->writeString());
// ... add file to your PDF


setServiceTag($serviceTag = 'BCD')

Set the service tag. Currently (?) only one value is allowed: BCD.

setVersion($version = 2)

Set the SEPA QR standard version. In version 1 a BIC is mandatory. In version 2 a BIC is only mandatory outside EEA countries.

setCharacterSet($characterSet = SepaQr::UTF_8)

Set the character set. Available constants are UTF_8, ISO8859_5, ISO8859_1, ISO8859_7, ISO8859_2, ISO8859_10, ISO8859_4 or ISO8859_15.

setIdentification($identification = 'SCT')

Set the identification code. Currently (?) only one value is allowed: SCT.


Set the AT-23 BIC of the beneficiary bank.


Set the AT-21 name of the beneficiary


Set the AT-20 account number of the beneficiary. Only IBAN is allowed.


Set the AT-04 amount of the credit transfer. Currently (?) only amounts in Euro are allowed.


Set the AT-44 purpose of the credit transfer.


Set the AT-05 remittance information (structured). Creditor reference (ISO 11649) RF creditor reference may be used.


Set the AT-05 remittance information (unstructured).


Set the beneficiary to originator information.