A QR-IBAN is a regular ISO 13616 IBAN (15-digit format for CH / LI) whose institution identifier — digits 5–9 of the IBAN — falls within the range 30000–31999. The range is reserved by SIX Interbank Clearing for QR-IID accounts that are payment-slip-issuance ready.
A payment-part rendered against a QR-IBAN is *required* to carry a QRR reference (the 27-digit numeric structured reference). A payment-part against a regular Swiss IBAN can use SCOR or unstructured remittance.
The simplest way to detect a QR-IBAN: parse the country prefix (must be CH or LI), slice digits 5..9 as an integer, and check the range. The browser-safe implementation is at lib/iban.ts:isQrIban. The server-side equivalent is at apps/api/src/lib/iban.ts.
A common source of bugs: code that always picks QRR or always picks SCOR without checking which IBAN type it is dealing with. iso-compliant's QR-bill builder enforces "QR-IBAN ↔ QRR" pairing and rejects mismatched inputs at validation time.