Gravity Forms SWISS QR-Bill For Gravity PDF Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
Gravity Forms Swiss QR-Bill for Gravity PDF — A Real QR-Bill, Not a QR Code on a Page
Appends a complete Swiss QR-bill to the PDF your form already produces: the payment part and the
receipt, 210 × 105 mm on the lower cut edge, with the Swiss QR Code at exactly 46 × 46 mm and
the Swiss cross in the middle. Your customer scans it with any banking app, or cuts it off and hands it in
at the counter.
Built to the Implementation Guidelines QR-bill version 2.4, in force from 14 November
2026 — the version most implementations have not caught up with yet. And verified against the
standard’s own worked examples rather than against a reading of it.
Why you’ll love it
- The whole payment part, to the millimetre. Receipt 62 mm, payment part 148 mm,
the mandatory 5 mm blank borders, the amount and payer boxes in their prescribed sizes, the
acceptance point area, cut lines with a scissors symbol and the “separate before paying in”
notice. The document a Swiss bank expects. - Version 2.4, and it matters. Three things changed against the widely
implemented 2.3, and every one of them can invalidate a bill: the QR reference and the QR-IBAN are
CHF only now, the structured address is compulsory, and Romansh
became a fifth correspondence language. All three are enforced, and a
configuration that collides with them is named on screen. - ✅ Verified against the standard’s own examples. Annex A prints two complete worked
data sets; this implementation reproduces both of them byte for byte — including
the detail that trips up hand-written implementations, namely that the version line inside the code
stays 0200 and not 0240. - The reference is built per invoice. Put your invoice number in one field, with
merge tags, and the 27-digit QR reference is assembled and its check digit calculated. Point the
same field at a reference that already exists and a complete, valid one is recognised and passed
through untouched instead of being mangled. - QR-IBAN handled properly. An IBAN in the reserved institution range obliges you
to use a QR reference, and since 2.4 restricts that to CHF, “QR-IBAN plus EUR” has become
impossible. You are told before you configure anything, not by a bill your bank rejects. - Five languages, chosen per form. German, French, Italian, Romansh and English.
The headings are prescribed wording, not translations, and the biller picks the language — so a
German-language WordPress can print an Italian payment part. - ✍️ Unknown amount or unknown payer is not a problem. Both are legitimate: the
payment part then prints a colourless field with black corner marks, in the exact sizes the standard
specifies, for filling in by hand. A donation form works as well as an invoice. - ️ An apostrophe cannot break your bill. The standard allows a specific subset of
Unicode and WordPress inserts characters outside it without being asked. Those are converted to
their plain equivalents rather than dropped, so a name keeps its meaning. - Nothing to install. No Composer step, no bcmath, no API key, no
external service, no vendor directory to collide with another plugin. Payload, check digits and
layout are all in the plugin — which is why it still runs on PHP 7.4. The QR
encoder comes from Gravity PDF itself. - Translation-ready. English and German included, fully internationalized.
Key features
Geometry you can measure
These are not approximations — they were read back out of a produced PDF:
- Swiss QR Code exactly 46 × 46 mm with no quiet zone inside it, error
correction level M, and at least 5 mm of clear space on every side. - Module size 0.667 mm for a typical payload, comfortably above the 0.4 mm the
standard requires for reliable scanning. - Swiss cross 7 × 7 mm, centred exactly on the code.
- Amount box 40 × 15 mm on the payment part and 30 × 10 mm on the receipt; payer box
65 × 25 mm and 52 × 20 mm; corner marks at 0.75 pt. - Acceptance point area 20 mm high, “Acceptance point” right-aligned as prescribed.
References done by the book
- QRR — the 27-digit QR reference, check digit by modulo 10 recursive. Requires a
QR-IBAN and, since version 2.4, CHF. - SCOR — the Creditor Reference of ISO 11649, check digits by ISO 7064 MOD 97-10.
Requires an ordinary IBAN; CHF or EUR. - NON — no reference at all.
Or simply let the add-on decide from the IBAN, which is what the recommended setting does.
The shared “(e)invoice Settings” page
Every add-on of this family that needs global configuration would otherwise add its own tab. Instead
there is one page, to which every plugin contributes one or more sections. This one contributes the
creditor block — and your own plugin can add a section with a single filter:
add_filter( 'einvoicepress_settings_sections', function ( $sections ) {
$sections[] = array(
'title' => 'My Section',
'priority' => 30,
'fields' => array(
array( 'name' => 'my_plugin_value', 'type' => 'text', 'label' => 'My value' ),
),
);
return $sections;
} );
Read a value from anywhere with EInvoicePress_Settings::get( ‘my_plugin_value’ ).
The identifiers are validated, not just stored
- IBAN — check digits and per-country format, plus the QR-bill’s own restriction to
Swiss and Liechtenstein accounts. - QR reference — 27 digits and the modulo 10 recursive check digit.
- Creditor Reference — structure plus the ISO 7064 MOD 97-10 check digits of
ISO 11649.
A typo is caught while it is being saved, not months later by a payment that never arrives.
A reusable Settings API field type — two files
The QR reference ships as a self-contained package you may copy into any Gravity Forms
plugin:
- class.sp-qrr-validator.php — the rules, including the check digit table
- class.gf-settings-field-qrr.php — the Settings API field type
$fields[] = array(
'name' => 'qr_reference',
'type' => 'qrr',
'label' => __( 'QR reference', 'your-textdomain' ),
'class' => 'medium',
);
Nothing else travels with them: no vendor library, no API key, no database table, no network. Every class
declaration and every type registration is guarded, so two plugins carrying the same package coexist
instead of colliding. The same applies to the iban and iso11649 packages this plugin
carries.
Advice notes
One switch produces the variant the guidelines define for a bill that is not to be paid: the amount fixed
at 0.00 and the prescribed wording in the chosen language. The 0.00 also guarantees that a conversion into
an eBill cannot be released for payment.
Built for how Gravity PDF actually works
A Gravity PDF document is not built when the form is submitted — it is built whenever somebody asks for
it, possibly years later and several times over. The payment part is therefore produced at render time,
which is the only point at which the finished document exists. Gravity PDF reuses files it has already
saved, so a document created before you added the feed keeps its old content; one feed switch rebuilds it,
off by default so nothing slows down in normal operation. And a document is never extended twice, however
often the hooks fire within a request.
It does not fight your invoice template
The payment part occupies exactly the area a page footer sits in, and the guidelines allow nothing inside
that area but the prescribed headings and values. The template’s running header and footer are therefore
switched off — for the payment part page only. Your invoice pages keep theirs.
Developer friendly
- The whole layout is one filterable array of named constants
(sp_swissqr_geometry), so any position can be adjusted without touching code. - The payload class is free of WordPress, Gravity Forms and mPDF, so the rules of the standard can be
exercised on their own. - Further filters for where the block sits on the sheet (sp_swissqr_origin) and for the font
candidate list (sp_swissqr_fonts). - Nothing ever throws: a PDF is often generated while a notification is being sent, so every problem
comes back as data and is written to the Gravity Forms log.
What’s included
- The plugin — a Gravity Forms feed add-on for Gravity PDF, plus the shared (e)invoice
Settings page other plugins can extend. - Portable qrr, iban and iso11649 Settings API field types with their
dependency-free validators — reusable in your own plugins. - English and German translations (.po / .mo).
- Full documentation in English and German (README + feature overview), including the
developer reference, every hook, and a plain statement of which layout numbers are normative and
which are adjustable. - Clean, well-structured, object-oriented and heavily commented code — easy to read, extend and
audit.
Requirements & compatibility
- WordPress with Gravity Forms ≥ 2.5
- Gravity PDF ≥ 6 (the free core plugin is enough)
- PHP ≥ 7.4 — no extensions beyond a standard WordPress install, in particular no
bcmath - The Gravity Forms currency has to be CHF or EUR, and the creditor
account a Swiss or Liechtenstein IBAN - No outbound network access, no API key, no third-party service — the code is computed on your own
server - Works alongside the companion EPC-QR, SEPA Fields,
VAT ID Field, SIRET Field, LEI Field and
ABN Field add-ons, sharing the same settings page without conflicts.
Support & updates
Clean, well-documented code that’s easy to maintain. Localization-ready out of the box. Built to follow
Gravity Forms’ official add-on framework and Settings API conventions and to use Gravity PDF’s documented
filters, so it stays compatible as your stack evolves.
A note on the fine print: this add-on follows both normative documents — the
Implementation Guidelines for the data and the Style Guide for the typography, right down to the line
spacing per element, which is not what a typographic rule of thumb would produce. Where the two
disagree — and they do, in two glossary entries — the Guidelines win, and the reasoning is written down
in the code. The handful of values neither document fixes are named constants behind one filter, so the
layout can be matched to a printed reference without modifying the plugin.
Changelog
1.1.0
- The shared settings page gained new optional company fields (legal form, trading name,
register details, GLN/DUNS, an electronic address) and an optional SEPA Creditor Identifier
next to the bank account, encrypted the same way as the IBAN. - Internal: the entry point that appends the QR-bill now implements a small shared interface
used across the family’s QR add-ons. No change to the QR-bill itself.
1.0.0
- Initial release. Feed add-on that appends a complete Swiss QR-bill — payment part and receipt — to a
Gravity PDF document. - Built against Implementation Guidelines QR-bill version 2.4, in force from 14 November 2026, with
its three substantive changes enforced: QR reference and QR-IBAN restricted to CHF, structured
address compulsory, Romansh as a fifth correspondence language. - Payload verified byte for byte against both worked examples of Annex A; geometry verified by
measuring it back out of a produced PDF. - No vendor dependency: payload, check digits and layout implemented in the plugin, so no Composer
step and no bcmath, and PHP 7.4 is enough. - QR reference, Creditor Reference or no reference, with the reference either built per invoice from a
merge tag or taken as a complete value. - Five correspondence languages, chosen per feed and independent of the site locale.
- Corner-mark boxes in their normative sizes when the amount or the payer is not in the code, and the
advice-note variant. - Character set restriction applied with typographic characters transliterated rather than
dropped. - New portable qrr Settings API package; copied iban and iso11649
packages. - Layout adjustable through three filters; optional rebuild of already saved PDFs.
- German translation.
