QRR is the structured numeric reference embedded in a Swiss QR-bill payment-part. It is exactly 27 digits long: 26 digits of customer-chosen base + 1 mod-10 check digit computed via the Lührmann recursive algorithm.
QRR is mandatory when the QR-bill is issued against a QR-IBAN (institution ID in the range 30000–31999); it is the rail's way of guaranteeing the payment carries a structured remittance the creditor's accounting system can auto-reconcile against. For QR-bills issued against a regular IBAN, the reference can be SCOR (the ISO 11649 creditor reference) or empty.
The check-digit algorithm is fully specified in the SIX Interbank Clearing implementation guidelines and is identical to the one used on legacy ESR slips. The lookup table is at lib/iban.ts:QRR_TABLE and the public helpers are computeQrrCheckDigit and buildQrrReference.
A common error is mixing QRR and SCOR formats: putting an alphanumeric SCOR reference into a QR-IBAN payment-part will be rejected by the issuer's bank at deposit.