PHPackages                             pschroee/php-sepa - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pschroee/php-sepa

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pschroee/php-sepa
=================

PHP class to create German SEPA files (XML) for credit transfer and direct debit.

v1.3(2y ago)226BSD-2-ClausePHP

Since Feb 1Pushed 2y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (5)Used By (0)

php-sepa
========

[](#php-sepa)

PHP class to create German SEPA files (XML) for credit transfer and direct debit.

The versions of the standard followed are:

- *pain.001.001.03\_GBIC\_3.xsd* for credit transfers
- *pain.008.001.02\_GBIC\_3.xsd* for direct debits

Always verify the generated files at your bank before using them in production!

License: BSD 2-Clause License

Example of using SEPA Credit Transfer
-------------------------------------

[](#example-of-using-sepa-credit-transfer)

```
$validatorFactory = new \pschroee\PhpSepa\Sepa\Validator\Factory();

$sepa = new \pschroee\PhpSepa\Sepa\CreditTransfer($validatorFactory);
$sepa->setInitiator('Max Mustermann'); // Einreicher
//$sepa->setId($msgId); // Nachrichtenreferenz

$payment = new \pschroee\PhpSepa\Sepa\Payment($validatorFactory);
$payment->setPriority('HIGH'); // Prioritaet NORM oder HIGH
$payment->setAccount('Max Mustermann', 'DE02370501980001802057', 'COLSDE33'); // Auftraggaber
//$payment->setAccountCurrency($currency); // Kontowaehrung
//$payment->disableBatchBooking(); // deaktiviere Sammelbuchung
//$payment->setDate($date); // Faelligkeitsdatum

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')   // Transaktions-ID (End-to-End)
    ->setName('Karl Kümmel')                // Name des Zahlungspflichtigen
    ->setIban('DE02300209000106531065')     // IBAN des Zahlungspflichtigen
    ->setBic('CMCIDEDD')                    // BIC des Zahlungspflichtigen
    ->setAmount(123.45)                     // abzubuchender Betrag
    ->setPurpose('SALA')                    // (optional) Zahlungstyp
    ->setReference('Rechnung R2017742 vom 17.06.2017'); // Verwendungszweck (eine Zeile, max. 140 Zeichen))
$payment->addTransaction($transaction);

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')
    ->setName('Doris Dose')
    ->setIban('DE02500105170137075030')
    ->setAmount(234.56)
    ->setPurpose('SALA')
    ->setReference('Kinderfahrrad');
$payment->addTransaction($transaction);

$sepa->addPayment($payment);

$xml = new \pschroee\PhpSepa\Sepa\Xml($sepa);
$xml->download('sepa.xml');
```

Example of using SEPA Direct Debit
----------------------------------

[](#example-of-using-sepa-direct-debit)

```
$validatorFactory = new \pschroee\PhpSepa\Sepa\Validator\Factory();

$sepa = new \pschroee\PhpSepa\Sepa\DirectDebit($validatorFactory);
$sepa->setInitiator('Max Mustermann'); // Einreicher
//$sepa->setId($msgId); // Nachrichtenreferenz

$payment = new \pschroee\PhpSepa\Sepa\Payment($validatorFactory);
//$payment->setScope('CORE'); // Lastschriftart (CORE oder B2B)
$payment->setAccount('Max Mustermann', 'DE02370501980001802057', 'COLSDE33'); // Auftraggaber
//$payment->setAccountCurrency($currency); // Kontowaehrung
$payment->setCreditorId('DE98ZZZ09999999999'); // Glaeubigeridentifikationsnummer
//$payment->disableBatchBooking(); // deaktiviere Sammelbuchung
//$payment->setDate($date); // Gewuenschter Ausfuehrungstermin

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')   // Transaktions-ID (End-to-End)
    ->setName('Karl Kümmel')                // Name des Zahlungspflichtigen
    ->setIban('DE02300209000106531065')     // IBAN des Zahlungspflichtigen
    ->setBic('CMCIDEDD')                    // BIC des Zahlungspflichtigen
    ->setAmount(123.45)                     // abzubuchender Betrag
    ->setPurpose('SALA')                    // (optional) Zahlungstyp
    ->setMandateId('M20170704-200')         // Mandatsreferenz
    ->setMandateDate('2017-07-04')          // Mandatsdatum
    ->setReference('Rechnung R2017742 vom 17.06.2017'); // Verwendungszweck (eine Zeile, max. 140 Zeichen))
$payment->addTransaction($transaction);

$sepa->addPayment($payment);

$xml = new \pschroee\PhpSepa\Sepa\Xml($sepa);
$xml->download('sepa.xml');
```

External Resources
------------------

[](#external-resources)

- [German specification for remote data transfer between customer and bank according to the DFÜ agreement "Specification of Data Formats"](https://www.ebics.de/de/datenformate)
- [ECB SEPA gateway page](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html)
- [ISO20022 Message Catalog](https://www.iso20022.org/full_catalogue.page)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~0 days

Total

4

Last Release

837d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dd48708a8fb1037f1e98379d5b19244f5ce61854ad2ae1ff295b28e905988d6?d=identicon)[pschroee](/maintainers/pschroee)

---

Top Contributors

[![pschroee](https://avatars.githubusercontent.com/u/64961193?v=4)](https://github.com/pschroee "pschroee (7 commits)")[![ufozone](https://avatars.githubusercontent.com/u/29913712?v=4)](https://github.com/ufozone "ufozone (3 commits)")

### Embed Badge

![Health badge](/badges/pschroee-php-sepa/health.svg)

```
[![Health](https://phpackages.com/badges/pschroee-php-sepa/health.svg)](https://phpackages.com/packages/pschroee-php-sepa)
```

PHPackages © 2026

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