API Reference swiss_qr_bill v#0.1.3

Copy Markdown View Source

Modules

Swiss QR-bill generation library per SIX IG QR-bill v2.3.

Additional information for Swiss QR bills. Contains an unstructured message and/or coded bill information.

Structured address for Swiss QR bills (type "S"). Per v2.3, only structured addresses are allowed.

Alternative payment scheme parameter for Swiss QR bills. Maximum 2 alternative schemes are allowed per bill.

Holds the creditor's IBAN and provides QR-IBAN detection.

IBAN validation, formatting, and QR-IBAN detection for Swiss QR bills.

Generates the complete Swiss QR bill payment part as PDF. Uses the pdf library. Layout matches the SIX style guide. The QR code is drawn directly as filled rectangles from the QR matrix.

Generates PNG output by rasterizing the PDF via pdftocairo. The PDF is the source of truth — PNG is a pixel-perfect rasterization.

Generates SVG output by converting the PDF via pdftocairo. All text is automatically converted to glyph outlines (paths), ensuring pixel-perfect rendering on all devices without font dependencies.

Translations for Swiss QR bill payment part labels. Supports German (de), French (fr), Italian (it), English (en), and Romansh (rm).

Payment amount and currency for Swiss QR bills. Amount is optional (nil = blank amount box on payment part).

Payment reference information for Swiss QR bills.

QR code generation for Swiss QR bills. Uses the qr_code library with Medium error correction.

Assembles the QR code data payload per the SIX Swiss QR bill specification. The payload is a newline-separated string of fields in a strict order.

Generates RF creditor references per ISO 11649.

Generates 27-digit QR payment references with modulo-10 recursive check digit.

Validation logic for Swiss QR bill data.