Generate and Read Swiss QR Code in C++

Overview

The Swiss QR Code symbology has been developed in Switzerland to automate digital payments. At present, all payment receipts and bills in Switzerland are intended to have a Swiss QR Code barcode that encrypts payment details. To distinguish from basic QR Code, Swiss QR Code labels have the Swiss cross sign in the center.

Specifically, the Swiss QR Code standard is used to work with QR bills in electronic payments. A Swiss QR Code barcode contains all necessary payment information required to launch payments or to process a QR invoice. Aspose.BarCode for C++ includes SwissQRBill and SwissQRCodetext classes that provide various properties to work with Swiss QR codes.

The general rules for creating Swiss QR Code barcodes and corresponding payment documents are defined in a specific standard called “Swiss Implementation Guidelines for the QR-bill” that relies on the ISO 20022 standard.

Generate Swiss QR Code

To generate a Swiss QR Code barcode using Aspose.BarCode for C++, it is necessary to create an instance of ComplexBarcodeGenerator and specify the information to be encoded in the SwissQRCodetext property.

Read Swiss QR Code

Aspose.BarCode for C++ includes class ComplexCodetextReader that is used to decode barcode input text according to the specified complex barcode type, in this case, Swiss QR Code. To read Swiss QR Code barcodes, first, it is necessary to create an instance of class BarCodeReader and set it to the value DecodeType.QR; then, the obtained barcode contents need to be parsed in class ComplexCodetextReader by calling the TryDecodeSwissQR method that returns an instance of SwissQRCodetext with the decoded barcode information.