Skip to main content

QR payment slip generator for Switzerland and Lichtenstein

Project description

https://travis-ci.com/molitoris/qr_payment_slip.svg?branch=master

QR payment slip

QR payment slip generates payment slips for Switzerland and Lichtenstein according to the ‘Swiss Payment Standards 2019 (Version 2.1) <https://www.paymentstandards.ch/>’.

Features

  • Generates QR payment slip according to Swiss Payment Standard 2019 (Version 2.1)

  • Supported output formats
    • SVG

  • Supported paper formats
    • A4 containing payment slip (210mm x 297mm)

    • Payment slip only (210mm x 105mm)

  • Validates IBAN number & QR reference

  • Missing information is replaced by boxes (see samples)

Samples

A selection of payment slips is stored in the ./samples folder.

Getting Started

QR payment slip can be installed directly from the Python package index using the pip command:

$ pip install qr-payment-slip

The following example shows how to create a QR payment slip. First an instance of QRPaymentSlip is created and then the IBAN number, the creditor, the amount and then the debtor is defined. Finally the QR invoice is generated and saved.

from qr_payment_slip.bill import QRPaymentSlip, Address

payment_slip = QRPaymentSlip()

# Set IBAN number (mandatory)
payment_slip.account = "CH98 8914 4356 9664 7581 5"

# Set address of creditor (mandatory)
payment_slip.creditor = Address(name="Hans Muster", address_line_1="Musterstrasse", address_line_2="1",
                                pcode=1000, town="Musterhausen")

# Set amount (optional)
payment_slip.amount = 100

# Set address of debtor (optional)
payment_slip.debtor = Address(name="Marie de Brisay", address_line_1="Dreibündenstrasse 34", pcode=7260,
                              town="Davos Dorf")

# Generate and save qr payment slip
payment_slip.save_as("my_bill.svg")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

QR payment slip-0.1.7.tar.gz (14.5 kB view details)

Uploaded Source

File details

Details for the file QR payment slip-0.1.7.tar.gz.

File metadata

  • Download URL: QR payment slip-0.1.7.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for QR payment slip-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b01c52c838798c088276912fc1880f41a821f90ed8d01ee708b6a24e35fcaa77
MD5 e2130bd4089322cc59b72ad8251104c0
BLAKE2b-256 0dc8cd7cba49ff13f9fe37267097c438635ed3d9f93517a0149faef2f19a6136

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page