It is important to know the main terms of the QR Bill
. It starts with Swiss Payments Code
(SPC), which contains all required payment information.
The SPC is only a sequence of characters. It is then encoded into a QR code, which is known as the Swiss QR Code
. The term Payment Part
refers to the DIN A6 output containing
the Swiss QR Code and all of its information in textual representation. Left to the Payment Part there is the Receipt
which contains all relevant textual information in the same
way the Paymet Part does. The Payment Part together with the Receipt replaces what was known as payment slips. Adding a Payment Part & Receipt to a bill document results
in a QR Bill
.
For further definition of terms, please refer to the Glossary
The QR Invoice Library provides a domain model that represents the QR Invoice as a whole, as defined in the official specification.
The root entity is ch.codeblock.qrinvoice.model.QrInvoice
. Although it is possible to create the QrInvoice
object graph by hand, we do not recommend doing so.
Instead we advise to use the ch.codeblock.qrinvoice.model.builder.QrInvoiceBuilder
. The QrInvoiceBuilder
does also implicitly perform validation of the given input.
Once the QrInvoice
has been built, it can be used to generate the required products, such as:
Swiss Payments Code (String)
QR Code (Image)
Payment Part & Receipt (Document)
Please see the Examples.
The field "Bill Information" provides a way billers can pass additional information to the receiver in order to increase automated processing.
The structure can be defined by third party entities to meet specific needs. The Swico has done this and provides the first and only structure known at the time of writing.