Skip to main content

PAY by square

Generate codes for by square payments.

Installation

Note: pay-by-square generates string that can be passes to QR code generator to create image. To run example below, you need to install qrcode module as well.

pip install pay-by-square

Usage

API

pay_by_square.generate(
    *,
    amount: float,
    iban: str,
    swift: str = '',
    date: Optional[date] = None,
    beneficiary_name: str = '',
    currency: str = 'EUR',
    variable_symbol: str = '',
    constant_symbol: str = '',
    specific_symbol: str = '',
    note: str = '',
    beneficiary_address_1: str = '',
    beneficiary_address_2: str = '',
) -> str:
    Generate pay-by-square code that can by used to create QR code for banking apps

    When date is not provided current date will be used.

Example

import qrcode
import pay_by_square


code = pay_by_square.generate(
    amount=10,
    iban='SK7283300000009111111118',
    swift='FIOZSKBAXXX',
    variable_symbol='47',
)

print(code)
img = qrcode.make(code)
img.show()

Testing

python -m unittest tests.py

Kudos to guys from devel.cz

Metadata

Release files for pay-by-square 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pay-by-square 0.2.0
File Size Uploaded
pay-by-square-0.2.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pay-by-square 0.2.0
File Interpreter ABI Platform
pay_by_square-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / pay-by-square-0.2.0.tar.gz

Download URL pay-by-square-0.2.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d8c8e326f9d5cbb932b38aea60e1f7d5e8e85234e7b02fe47240a0acf26857db
BLAKE2b-256 checksum
How to use checksums
0b82a07547370ae173d88ed6c9d66801a973941b00c2a6fa500542d63bce7570
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.6.9 Linux/4.15.0-108-generic

Release files / pay_by_square-0.2.0-py3-none-any.whl

Download URL pay_by_square-0.2.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff44bb37865a51526d77e72c5e91abc3fc73dc6ff04b4291f9aa999e2ed435c0
BLAKE2b-256 checksum
How to use checksums
f892e2b6de613401000f5aaeb3052cb68a190311576d9008e2a8bec2fcebd420
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.6.9 Linux/4.15.0-108-generic

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page