PHPackages                             smhg/sepa-qr-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. smhg/sepa-qr-data

ActiveLibrary[Payment Processing](/categories/payments)

smhg/sepa-qr-data
=================

Generate QR code data for SEPA payments

v3.0.0(11mo ago)61717.2k—7.6%145MITPHPPHP &gt;=8.1CI passing

Since Apr 16Pushed 11mo ago6 watchersCompare

[ Source](https://github.com/smhg/sepa-qr-data-php)[ Packagist](https://packagist.org/packages/smhg/sepa-qr-data)[ RSS](/packages/smhg-sepa-qr-data/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (5)

sepa-qr-data [![CI](https://github.com/smhg/sepa-qr-data-php/workflows/CI/badge.svg)](https://github.com/smhg/sepa-qr-data-php/actions)
=======================================================================================================================================

[](#sepa-qr-data-)

Generates SEPA payment data for use in a QR code as defined in the [European Payments Council's standard](http://www.europeanpaymentscouncil.eu/index.cfm/knowledge-bank/epc-documents/quick-response-code-guidelines-to-enable-data-capture-for-the-initiation-of-a-sepa-credit-transfer/epc069-12-quick-response-code-guidelines-to-enable-data-capture-for-the-initiation-of-a-sepa-credit-transfer1/).

A QR code using this data can, for instance, be displayed on an invoice and be scanned by a mobile banking app.

> **Migrating from smhg/sepa-qr?** Follow the [steps below](https://github.com/smhg/sepa-qr-data-php#migration-from-smhgsepa-qr).

Installation
------------

[](#installation)

```
composer require smhg/sepa-qr-data
```

Usage
-----

[](#usage)

```
use SepaQr\SepaQrData;
```

```
$paymentData = (new SepaQrData())
  ->setName('Name of the beneficiary')
  ->setIban('BE123456789123456789')
  ->setAmount(100); // The amount in Euro
```

After this, you can choose your preferred QR code library and use this data as the input. Below are 2 examples.

### With [endroid/qr-code](https://github.com/endroid/qr-code)

[](#with-endroidqr-code)

#### Installation

[](#installation-1)

```
composer require endroid/qr-code
```

#### Usage

[](#usage-1)

```
use Endroid\QrCode\Builder\Builder;
use Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelMedium;
```

```
Builder::create()
    ->data($paymentData)
    ->errorCorrectionLevel(new ErrorCorrectionLevelMedium()) // required by EPC standard
    ->build()
    ->saveToFile('payment.png');
```

**Note:** endroid/qr-code lists [more ways](https://github.com/endroid/qr-code#usage-working-with-results) to render.

### With [chillerlan/php-qrcode](https://github.com/chillerlan/php-qrcode)

[](#with-chillerlanphp-qrcode)

#### Installation

[](#installation-2)

```
composer require chillerlan/php-qrcode
```

#### Usage

[](#usage-2)

```
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
```

```
$qrOptions = new QROptions([
    'eccLevel' => QRCode::ECC_M // required by EPC standard
]);

(new QRCode($qrOptions))->render($paymentData, 'payment.png');
```

**Note:** chillerlan/php-qrcode lists [more ways](https://github.com/chillerlan/php-qrcode/wiki/Advanced-usage) to render.

API
---

[](#api)

#### setName($name)

[](#setnamename)

**Required.** Set the name of the beneficiary.

#### setIban($iban)

[](#setibaniban)

**Required.** Set the account number of the beneficiary. Only IBAN is allowed.

#### setAmount($amount)

[](#setamountamount)

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

#### setBic($bic)

[](#setbicbic)

Set the BIC of the beneficiary bank.

#### setRemittanceReference($remittanceReference)

[](#setremittancereferenceremittancereference)

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

#### setRemittanceText($remittanceText)

[](#setremittancetextremittancetext)

Set the remittance information (unstructured).

#### setPurpose($purpose)

[](#setpurposepurpose)

Set the purpose of the credit transfer.

#### setInformation($information)

[](#setinformationinformation)

Set the beneficiary to originator information.

#### setServiceTag($serviceTag = 'BCD')

[](#setservicetagservicetag--bcd)

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

#### setVersion($version = 2)

[](#setversionversion--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 = SepaQrData::UTF\_8)

[](#setcharactersetcharacterset--sepaqrdatautf_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`. Remember to also use/set this character set in the surrounding parts of your application (including endroid/qr-code).

#### setIdentification($identification = 'SCT')

[](#setidentificationidentification--sct)

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

Migration from smhg/sepa-qr
---------------------------

[](#migration-from-smhgsepa-qr)

This project is a continuation of [smhg/sepa-qr](https://github.com/smhg/sepa-qr-php), decoupling QR code rendering. Different QR rendering libraries offer different features and support different PHP versions. This project now generates the appropriate QR code data, which can be supplied to the QR code rendering library of your choice.

Follow these steps to migrate:

**1. Remove smhg/sepa-qr**

```
composer remove smhg/sepa-qr
```

**2. Install smhg/sepa-qr-data and endroid/qr-code**

```
composer require smhg/sepa-qr-data endroid/qr-code
```

**3. Replace/add use declarations**

```
-use \SepaQr\SepaQr;
+use \SepaQr\SepaQrData;
+use \Endroid\QrCode\Builder\Builder;
+use \Endroid\QrCode\ErrorCorrectionLevel\ErrorCorrectionLevelMedium;
```

**4. Adapt QR code generation accordingly**

```
$paymentData = new SepaQrData();
// $paymentData->set...

Builder::create()
    ->errorCorrectionLevel(new ErrorCorrectionLevelMedium())
    ->data($paymentData)
    ->build()
    ->saveToFile('payment.png');
```

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance50

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~301 days

Recently: every ~374 days

Total

6

Last Release

352d ago

Major Versions

v1.2.0 → v2.0.02023-06-30

v2.0.1 → v3.0.02025-05-31

PHP version history (2 changes)v1.0.0PHP ^7.1||^8

v2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f5aff3cb1755a1fbf76ff89754e1ad996338a7ebfa1c24301f319a28938f517?d=identicon)[smhg](/maintainers/smhg)

---

Top Contributors

[![smhg](https://avatars.githubusercontent.com/u/2411348?v=4)](https://github.com/smhg "smhg (51 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (2 commits)")[![AegisVP](https://avatars.githubusercontent.com/u/62596809?v=4)](https://github.com/AegisVP "AegisVP (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/smhg-sepa-qr-data/health.svg)

```
[![Health](https://phpackages.com/badges/smhg-sepa-qr-data/health.svg)](https://phpackages.com/packages/smhg-sepa-qr-data)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)[omnipay/braintree

Braintree gateway for Omnipay payment processing library

35558.0k3](/packages/omnipay-braintree)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
