PHPackages                             swiss-payment-slip/swiss-payment-slip - 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. swiss-payment-slip/swiss-payment-slip

ActiveLibrary[Payment Processing](/categories/payments)

swiss-payment-slip/swiss-payment-slip
=====================================

A library for creating Swiss payment slips (ESR)

0.13.1(6y ago)20291.4k↓20.7%141MITPHPPHP &gt;=5.4.0CI failing

Since Mar 7Pushed 4y ago7 watchersCompare

[ Source](https://github.com/ravage84/SwissPaymentSlip)[ Packagist](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip)[ Docs](https://github.com/ravage84/SwissPaymentSlip)[ RSS](/packages/swiss-payment-slip-swiss-payment-slip/feed)WikiDiscussions master Synced 1mo ago

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

SwissPaymentSlip - Swiss Payment Slips
======================================

[](#swisspaymentslip---swiss-payment-slips)

[![Travis Build Status](https://camo.githubusercontent.com/10c19d1c8b5774fa122540f6ce237038250dfd2c24e07e5f4642a9fe918c3fc1/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f53776973735061796d656e74536c69702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ravage84/SwissPaymentSlip)[![Scrutinizer CI Build Status](https://camo.githubusercontent.com/ed41dd77be805ffd08b1fd247c87ad4d33429805fe3516dad2cd81b15286cbcb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69702f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlip/build-status/master)[![Scrutinizer CI Code Coverage](https://camo.githubusercontent.com/d95aad07219992157d8f3d786bef76d02cb299befb6163591f7fa7f3bfa88972/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlip/?branch=master)[![Scrutinizer CI Code Quality](https://camo.githubusercontent.com/f2ecd2770d3b0572fddf0cc655365b4c3ec1de448b645e07c0c71a202efceffd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlip/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/29337cc1bed289d35b802c2ec35e8a7e3d923ce42e06d410894caa226cdda3ab/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702f642f746f74616c2e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip)[![Latest Stable Version](https://camo.githubusercontent.com/b21b3d874200cecdf3e59e0a75047e76b7ac499fae286c5fcb8513a7814d836d/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702f762f737461626c652e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip)

Do you need to create Swiss payment slips (called ES or ESR) as PDF files in a project of yours? Then you found almost the right place, go to [SwissPaymentSlipFpdf](https://github.com/ravage84/SwissPaymentSlipFpdf)or [SwissPaymentSlipTcpdf](https://github.com/ravage84/SwissPaymentSlipTcpdf).

If you need to include some basic logic for Swiss payment slips in your PHP code base then you are probably right though...

The partial and unfinished support for the red payment slip was dropped in version 0.13.0 due to lack of demand.

How to use
----------

[](#how-to-use)

Just install the the package (see [Installation](https://github.com/ravage84/SwissPaymentSlip#installation)) and check out the contained examples in the [examples folder](https://github.com/ravage84/SwissPaymentSlip/tree/master/examples).

If you need help for extending and/or customizing the library to your needs, just ask for help.

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

[](#installation)

### Requirements

[](#requirements)

- PHP 5.6.x+

### Composer

[](#composer)

To add this library to your project through [Composer](http://getcomposer.org), [install Composer](http://getcomposer.org/doc/00-intro.md#system-requirements) on your system first, then [initialize a composer.json file](https://getcomposer.org/doc/03-cli.md#init)and then execute the following from within your project's folder:

```
$ php composer.phar require "swiss-payment-slip/swiss-payment-slip"

```

Background Story
----------------

[](#background-story)

In february 2013 I was looking for a solution to create swiss payment slips for a project I had to do at my work place. After a short Google search I came across Manuel Reinhard's [blog post](http://sprain.ch/blog/downloads/class-esr-besr-einzahlungsschein-php/) about the class he made for that. On his [Github project's page](https://github.com/sprain/class.Einzahlungsschein.php) I found [Peter Siska's](https://github.com/peschee) [pull request](https://github.com/sprain/class.Einzahlungsschein.php/pull/5). His pull request introduced PSR-0 compatibility and he created a composer package on [Packagist](http://packagist.org/). So I tried Peter's version and it suited my basic needs.

BUT since the customer I was working for used custom designed payment slips I couldn't use Manuel's/Peter's script since it wasn't flexible enough. Now I had to decide whether I want to "just" change the script to fit my needs or to rewrite it and make it as flexible as possible. I decided myself for the latter.

TODOs
-----

[](#todos)

- Improve code documentation
- Add more examples/improve existing ones, showcase disabling the various field blocks better
- Improve the tests
- Release the stable release of the API

Submitting bugs and feature requests
------------------------------------

[](#submitting-bugs-and-feature-requests)

Bugs and feature request are tracked on [GitHub](https://github.com/ravage84/SwissPaymentSlip/issues).

Author
------

[](#author)

This project was created by [Marc Würth](https://github.com/ravage84). See [Background Story](#background-story) for more details.

License
-------

[](#license)

SwissPaymentSlip is licensed under the MIT License. See the [LICENSE](https://github.com/ravage84/SwissPaymentSlip/blob/master/LICENSE) file for details.

Thanks to
---------

[](#thanks-to)

-  for public designs of Einzahlungsscheinen

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% 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 ~211 days

Recently: every ~427 days

Total

13

Last Release

2282d ago

PHP version history (2 changes)0.5.0PHP &gt;=5.3.0

0.12.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b319e683a7001c095bcf138d870d7b7ed12a1040e11c0264b914c2e213922169?d=identicon)[ravage84](/maintainers/ravage84)

---

Top Contributors

[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (284 commits)")[![D4rkMindz](https://avatars.githubusercontent.com/u/16854141?v=4)](https://github.com/D4rkMindz "D4rkMindz (2 commits)")[![steampilot](https://avatars.githubusercontent.com/u/6819141?v=4)](https://github.com/steampilot "steampilot (2 commits)")[![TekkCraft](https://avatars.githubusercontent.com/u/21214298?v=4)](https://github.com/TekkCraft "TekkCraft (1 commits)")

---

Tags

paymentswitzerlandPayment slipInpayment slipEinzahlungsscheinESR

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/swiss-payment-slip-swiss-payment-slip/health.svg)

```
[![Health](https://phpackages.com/badges/swiss-payment-slip-swiss-payment-slip/health.svg)](https://phpackages.com/packages/swiss-payment-slip-swiss-payment-slip)
```

###  Alternatives

[swiss-payment-slip/swiss-payment-slip-pdf

An abstract base class for creating Swiss payment slips with reference number (ESR) or without (ES) using a pdf engine

12287.9k2](/packages/swiss-payment-slip-swiss-payment-slip-pdf)[swiss-payment-slip/swiss-payment-slip-fpdf

Create Swiss payment slips with reference number (ESR) or without (ES) as PDFs with FPDF

11265.3k](/packages/swiss-payment-slip-swiss-payment-slip-fpdf)[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)

PHPackages © 2026

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