This example shows how to create a QR reference using the QRReferenceUtils class.

import ch.codeblock.qrinvoice.util.QRReferenceUtils;

// ...

// QR references can be created without restrictions from numeric input with up to 26 digits, the 27th digit is used as check digit
final String qrReference = QRReferenceUtils.createQrReference("127");

// prints 000000000000000000000001273

This example shows how to create a Creditor reference using the CreditorReferenceUtils class.

import ch.codeblock.qrinvoice.util.CreditorReferenceUtils;

// ...

// Creditor references can be created from alphanumeric (0-9a-zA-Z) input with up to 21 chars, 2 chars are used for "RF" prefix and two for the check digits
final String creditorReference = CreditorReferenceUtils.createCreditorReference("123");

// prints RF78123