# AI告诉瑞士自由职业者开具带有QR-IBAN的发票，但没有提到QR账单需要特定的条码格式（瑞士QR码）和参考号

- **ID:** `banking/switzerland-qr-iban-barcode`
- **领域:** banking
- **类别:** protocol_error
- **错误码:** `QR-BILL-FORMAT-ERR`
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

自2020年起，瑞士QR账单强制要求使用标准化的瑞士QR码（ISO 20022），包含27位IBAN、结构化参考号（ISR或QR参考号）和收款人信息；任何字段缺失或格式错误都会导致PostFinance或UBS等电子银行系统拒绝该账单。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Swiss Payment Standards v1.0 (2020) | active | — | — |
| ISO 20022 for Swiss QR bills | active | — | — |
| PostFinance E-Finance v9.2 | active | — | — |
| UBS E-Banking v8.5 | active | — | — |

## 解决方案

1. ```
   Use the official Swiss QR bill generator from SIX Group: download the 'Swiss QR Code' app or use the web tool at https://www.swiss-qr-bill.org/ to generate a compliant QR code with proper format and reference.
   ```
2. ```
   Integrate a library like `qrbill` (Python) to generate bills programmatically: `pip install qrbill` and use `from qrbill import QRBill; bill = QRBill(account='CH4431999123000889012', creditor={'name': 'Jane Doe', 'pcode': '8000', 'city': 'Zurich'}, amount=1500.00, reference='123456789012345678901234567'); bill.as_svg('invoice.svg')`.
   ```
3. ```
   Use accounting software with built-in QR bill support (e.g., Bexio, Klara, or Banana Accounting) that auto-generates compliant codes and validates fields before export.
   ```

## 无效尝试

- **** — Swiss banks now require QR-IBAN for automated processing; regular IBANs on invoices may be processed manually or rejected, delaying payment. (80% 失败率)
- **** — Each invoice must have a unique reference number (ISR or QR-reference); reusing a reference causes the bank to reject it as a duplicate. (90% 失败率)
- **** — Many online tools produce non-compliant QR codes that lack mandatory fields (e.g., creditor address, currency); banks will reject them. (85% 失败率)
