1. Go to this page and download the library: Download 4vplacek/qr-payment library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
4vplacek / qr-payment example snippets
use Vplacek\QrPayment\PaymentData;
use Vplacek\QrPayment\Serializer\SpaydSerializer;
use Vplacek\QrPayment\Serializer\PaymentLinkSerializer;
use Vplacek\QrPayment\Serializer\EpcQrSerializer;
use Vplacek\QrPayment\Qr\QrRenderer;
use Vplacek\QrPayment\Qr\QrLabelOutput;
$payment = (new PaymentData())
->setIban('CZ6508000000192000145399')
->setAmount('250.00') // string nebo int (centy) — NIKDY float
->setCurrency('CZK')
->setVariableSymbol('123456')
->setRecipientName('Petr Novák')
->setMessage('Faktura 2026/001');
echo (new SpaydSerializer())->serialize($payment);
// SPD*1.0*ACC:CZ6508000000192000145399*AM:250.00*CC:CZK*MSG:FAKTURA 2026/001*PT:IP*RN:PETR NOVAK*X-VS:123456
// PT:IP = okamžitá platba (viz níže), přidává se automaticky
file_put_contents('qr.png', QrRenderer::fromSpayd($payment)->png());
echo QrRenderer::fromSpayd($payment)->svg();
// Brandovaný SVG: rámeček + nápis „QR platba" (oficiální branding ČBA)
use Vplacek\QrPayment\Qr\BrandedSvgOutput;
use Vplacek\QrPayment\Serializer\SpaydSerializer;
$svg = BrandedSvgOutput::qrPlatba((new SpaydSerializer())->serialize($payment))->svg();
$sk = (new PaymentData())
->setIban('SK3112000000198742637541')
->setAmount('99.90')
->setCurrency('EUR')
->setVariableSymbol('1234567890')
->setRecipientName('Janko Hraško');
echo (new PaymentLinkSerializer(PaymentLinkSerializer::TYPE_P2P))->serialize($sk);
// https://payme.sk/2/p/PME?IBAN=SK...&CN=Janko+Hrasko&AM=99.90&CC=EUR&PI=%2FVS1234567890
// Brandovaný SVG s Payme logem pod QR kódem
$svg = BrandedSvgOutput::payme((new PaymentLinkSerializer())->serialize($sk))->svg();
$eu = (new PaymentData())
->setIban('DE71110220330123456789')
->setBic('BHBLDEHHXXX')
->setAmount('12.50')
->setCurrency('EUR')
->setRecipientName('Franz Mustermann')
->setMessage('Rechnung 123');
echo (new EpcQrSerializer())->serialize($eu);
// EPC/GiroCode nemá vlastní branding — holý QR
$svg = BrandedSvgOutput::plain((new EpcQrSerializer())->serialize($eu))->svg();