PHPackages                             j-guyon/php-sepa-xml-generator - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. j-guyon/php-sepa-xml-generator

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

j-guyon/php-sepa-xml-generator
==============================

Creates an XML file for a Single Euro Payments Area (SEPA) Direct Debit Payment.

v2.0.0(2y ago)029MITPHPPHP &gt;=5.6

Since Jan 18Pushed 2y agoCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PHP SEPA XML Generator
======================

[](#php-sepa-xml-generator)

**This is a fork from  and  witch fix some structure issues with in the `pain.001.001.02` format and add some XSD validation in tests.**

Now in this release you are able todo SEPA CreditTransfer and DirDebit

Support: pain.008.001.02, pain.001.001.02

Guide ISO20022 SDD V1\_0 20122009

SEPA Direct Debit Core Scheme (SDD Core)
========================================

[](#sepa-direct-debit-core-scheme-sdd-core)

Single Euro Payments Area (SEPA)

The Single Euro Payments Area (SEPA) is a payment-integration initiative of the European Union for simplification of bank transfers denominated in euro. As of March 2012, SEPA consists of the 28 EU member states, the four members of the EFTA (Iceland, Liechtenstein, Norway and Switzerland) and Monaco.

Example of using
================

[](#example-of-using)

SEPA Direct Debit
=================

[](#sepa-direct-debit)

```
		//When you start to generate a SEPA Xml File, need to choose PAIN
		$directDebitTransaction = \SEPA\XMLGenerator::PAIN_008_001_02; // For Direct Debit transactions is By Defaut
		$creditTransfer = \SEPA\XMLGenerator::PAIN_001_001_02; //For Credit Transfer

		SEPA\Factory\XMLGeneratorFactory::createXmlGeneratorObject($directDebitTransaction)->addXmlMessage(
        	SEPA\Factory\XMLGeneratorFactory::createXMLMessage()
        		->setMessageGroupHeader(
        			SEPA\Factory\XMLGeneratorFactory::createXMLGroupHeader()
        				->setMessageIdentification(1)
        				->setInitiatingPartyName('Amazing SRL ???? ыаывпавпва '))
        		->addMessagePaymentInfo(
        			SEPA\Factory\XMLGeneratorFactory::createXMLPaymentInfo()
        				->setPaymentInformationIdentification(6222)
        				->setSequenceType('FRST')
        				->setCreditorAccountIBAN('MD24 AG00 0225 1000 1310 4168')
        				->setCreditorAccountBIC('AABAFI42')->setCreditorName('Amazing SRL')
        				->setCreditorSchemeIdentification('FR07ZZZ519993')
        				->setRequestedCollectionDate('2013-08-06')
                ->setCreditorCountry('ES') // Country code. Optional
                ->setCreditorAddressLine1('Sample street, 1') // Optional
                ->setCreditorAddressLine2('Sample state, Sample zip') // Optional
                ->setCategoryPurposeCode('CASH') // Optional. Only one of CategoryPurposeCode or CategoryPurposePropietary
                ->setCategoryPurposePropietary('Sample category purpose') // Optional. Only one of CategoryPurposeCode or CategoryPurposePropietary

						->setAggregatePerMandate(true) //Default Transaction aggregation option = true
        				->addDirectDebitTransaction( //First transaction
        					SEPA\Factory\XmlGeneratorFactory::createXMLDirectDebitTransaction()
        						->setInstructionIdentification(3)
        						->setEndToEndIdentification(3)
        						->setInstructedAmount(100.5)
        						->setDebtorName('Roy SRL')
        						->setDebitIBAN('FR14 2004 1010 0505 0001 3M02 606')
        						->setDebitBIC('AABAFI22') //Optional
        						->setMandateIdentification('SDD000000016PFX0713') //unique Identifier
        						->setDateOfSignature('2013-08-03')
        //						->setCurrency('EUR')
        						->setDirectDebitInvoice(122)
                    ->setElectronicSignature('Sample electronic signature') // Optional
                    ->setDebtorCountry('ES') // Country code. Optional
                    ->setDebtorAddressLine1('Sample street, 1') // Optional
                    ->setDebtorAddressLine2('Sample state, Sample zip') // Optional
                    ->setDebtorOrganizationIdentification('Sample ID') // Optional
                    ->setDebtorPrivateIdentification('Sample ID') // Optional
        				)->addDirectDebitTransaction( //Second transaction are the same client transaction
        					SEPA\Factory\XmlGeneratorFactory::createXMLDirectDebitTransaction()
        						->setInstructionIdentification(4)
        						->setEndToEndIdentification(4)
        						->setInstructedAmount(100.5)
        						->setDebtorName('Roy SRL')
        						->setDebitIBAN('FR14 2004 1010 0505 0001 3M02 606')
        						->setDebitBIC('AABAFI22') //Optional
        						->setMandateIdentification('SDD000000016PFX0713') //unique Identifier
        						->setDateOfSignature('2013-08-03')
        //						->setCurrency('EUR')
        						->setDirectDebitInvoice(122))
        				->addDirectDebitTransaction( //An other client Transaction
        					SEPA\Factory\XmlGeneratorFactory::createXMLDirectDebitTransaction()
        						->setInstructionIdentification(6)
        						->setEndToEndIdentification(6)
        						->setInstructedAmount(100.5)
        						->setDebtorName('ND SRL')
        						->setDebitIBAN('FR14 2004 1010 0505 0001 3M02 606')
        						->setDebitBIC('AABAFI22') //Optional
        						->setMandateIdentification('SDD000000016PFX0714') //unique Identifier
        						->setDateOfSignature('2013-08-03')
        //						->setCurrency('EUR')
        						->setDirectDebitInvoice(122))
        		)

        )->view()->save(realpath(__DIR__) . '/xml_files/sepa_test.xml');
```

SEPA Credit Transfer
====================

[](#sepa-credit-transfer)

```
	$xmlFile = SEPA\Factory\XMLGeneratorFactory::createXmlGeneratorObject(\SEPA\XMLGenerator::PAIN_001_001_02)->addXmlMessage(
			SEPA\Factory\XMLGeneratorFactory::createXMLMessage()->setMessageGroupHeader(
				SEPA\Factory\XMLGeneratorFactory::createXMLGroupHeader()
					->setMessageIdentification(1)
					->setInitiatingPartyName('Amazing SRL ???? ыаывпавпва'))
				->addMessagePaymentInfo(
					SEPA\Factory\XMLGeneratorFactory::createXMLPaymentInfo()
						->setAggregatePerMandate(false)
						->setPaymentInformationIdentification(6222)
						->setSequenceType('FRST')
						->setDebitorAccountIBAN('MD24 AG00 0225 1000 1310 4168')
						->setDebitorAccountBIC('AABAFI42')
						->setDebitorName('Amazing SRL')
						->setRequestedCollectionDate('2013-08-06')
						->addCreditTransferTransaction(
							SEPA\Factory\XmlGeneratorFactory::createXMLCreditTransferTransaction()
								->setInstructionIdentification(3)
								->setCreditInvoice(1223)
								->setInstructedAmount(100.5)
								->setBIC('AABAFI42')
								->setCreditorName('1222')
								->setIBAN('MD24 AG000225100013104168')
						)
						->addCreditTransferTransaction(
							SEPA\Factory\XmlGeneratorFactory::createXMLCreditTransferTransaction()
								->setInstructionIdentification(4)
								->setCreditInvoice(1223)
								->setInstructedAmount(50.5)
								->setBIC('AABAFI42')
								->setCreditorName('1222')
								->setIBAN('MD24 AG000225100013104168')
						)
						->addCreditTransferTransaction(
							SEPA\Factory\XmlGeneratorFactory::createXMLCreditTransferTransaction()
								->setInstructionIdentification(4)
								->setCreditInvoice(1223)
								->setInstructedAmount(25.5)
								->setBIC('AABAFI42')
								->setCreditorName('1222')
								->setIBAN('MD24 AG000225100013104168')
						)
			)
		)->save($fileExist = realpath(__DIR__) . '/xml_files/sepa_test.xml');

		$this->assertTrue(file_exists($fileExist));
```

XML File Result for SEPA Direct Debit
=====================================

[](#xml-file-result-for-sepa-direct-debit)

```

              123
              2013-08-03T10:30:02
              2
              110.80

                Amazing SRL STts yayvpavpva

              1
              DD
              false
              2
              110.80

                  SEPA

                  CORE

                FRST

              2013-08-03

                Amazing SRL

                  MD24AG000225100013104168

                  AABAFI42

              SLEV

                      FR07ZZZ519993

                        SEPA

                  1
                  2

                100.40

                    SDD000000016PFX0713
                    2013-08-03

                    AABAFI22

                  Roy SRL

                    FR1420041010050500013M02606

                  122

                  3
                  3

                10.40

                    SDD000000016PFX0714
                    2013-08-03

                    AABAFI42

                  Toy SRL

                    FR1420041010050500013M02606

                  1223

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 69.9% 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

Unknown

Total

1

Last Release

851d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/12b063f7ee1e16dc73278cba148d68958bb287e59a0000b0c231024fe1eebb6e?d=identicon)[j-guyon](/maintainers/j-guyon)

---

Top Contributors

[![dmitrirussu](https://avatars.githubusercontent.com/u/4028904?v=4)](https://github.com/dmitrirussu "dmitrirussu (114 commits)")[![dragermrb](https://avatars.githubusercontent.com/u/11479696?v=4)](https://github.com/dragermrb "dragermrb (23 commits)")[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (11 commits)")[![ruben-podadera](https://avatars.githubusercontent.com/u/4748531?v=4)](https://github.com/ruben-podadera "ruben-podadera (7 commits)")[![raimon-segura](https://avatars.githubusercontent.com/u/5822498?v=4)](https://github.com/raimon-segura "raimon-segura (3 commits)")[![gmaiztegi](https://avatars.githubusercontent.com/u/753673?v=4)](https://github.com/gmaiztegi "gmaiztegi (1 commits)")[![hcliff](https://avatars.githubusercontent.com/u/481457?v=4)](https://github.com/hcliff "hcliff (1 commits)")[![PhoneixS](https://avatars.githubusercontent.com/u/1279539?v=4)](https://github.com/PhoneixS "PhoneixS (1 commits)")[![perrier](https://avatars.githubusercontent.com/u/2690964?v=4)](https://github.com/perrier "perrier (1 commits)")[![kervala](https://avatars.githubusercontent.com/u/983521?v=4)](https://github.com/kervala "kervala (1 commits)")

---

Tags

xmlsepaBankingdirdebitsepa-xmlsepa-dirdebitSDD

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/j-guyon-php-sepa-xml-generator/health.svg)

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

###  Alternatives

[dmitrirussu/php-sepa-xml-generator

Creates an XML file for a Single Euro Payments Area (SEPA) Direct Debit Payment.

5644.0k](/packages/dmitrirussu-php-sepa-xml-generator)[digitick/sepa-xml

Creates Single Euro Payments Area (SEPA) XML files for the Direct Debit and Credit Transfer operations.

2836.0M12](/packages/digitick-sepa-xml)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[abcaeffchen/sephpa

Generates SEPA files for credit transfers (pain.001.001.03, pain.001.002.03, pain.001.003.03, pain.001.001.09) and direct debit (pain.008.001.02, pain.008.002.02, pain.008.003.02, pain.008.001.08)

711.7M](/packages/abcaeffchen-sephpa)[perryfaro/sepa

Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.

1148.7k](/packages/perryfaro-sepa)

PHPackages © 2026

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