Swiss QR

Overview

Scandit supports version 1.0 of the Swiss QR ISO 20022 standard. For the complete documentation of the standard please refer to the official website.

Example

Parsing following code (whitout quotes)

"SPC\r\n0100\r\n1\r\nCH6812345678901234567\r\nScandit AG\r\nLimmatstrasse\r\n73\r\n8005\r\nZuerich\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n1234.00\r\nCHF\r\n2020-01-01\r\n\r\n\r\n\r\n\r\n\r\n\r\nNON\r\n\r\ntest code\r\nAC:Alternative scheme data first\r\nAC:Alternative scheme data second"

will result in following JSON output:

[
 {
   "name" : "QRCH/Header/QRType",
   "parsed" : "SPC",
   "rawString" : "SPC"
},
{
   "name" : "QRCH/Header/Version",
   "parsed" : "0100",
   "rawString" : "0100"
},
{
   "name" : "QRCH/Header/Coding",
   "parsed" : 1,
   "rawString" : "1"
},
{
   "name" : "QRCH/CdtrInf/IBAN",
   "parsed" : "CH6812345678901234567",
   "rawString" : "CH6812345678901234567"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/Name",
   "parsed" : "Scandit AG",
   "rawString" : "Scandit AG"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/StrtNm",
   "parsed" : "Limmatstrasse",
   "rawString" : "Limmatstrasse"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/BldgNb",
   "parsed" : "73",
   "rawString" : "73"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/PstCd",
   "parsed" : "8005",
   "rawString" : "8005"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/TwnNm",
   "parsed" : "Zuerich",
   "rawString" : "Zuerich"
},
{
   "name" : "QRCH/CdtrInf/Cdtr/Ctry",
   "parsed" : "CH",
   "rawString" : "CH"
},
{
   "name" : "QRCH/UltmtCdtr/Name",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtCdtr/StrtNm",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtCdtr/BldgNb",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtCdtr/PstCd",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtCdtr/TwnNm",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtCdtr/Ctry",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/CcyAmtDate/Amt",
   "parsed" : "1234.00",
   "rawString" : "1234.00"
},
{
   "name" : "QRCH/CcyAmtDate/Ccy",
   "parsed" : "CHF",
   "rawString" : "CHF"
},
{
   "name" : "QRCH/CcyAmtDate/ReqdExctnDt",
   "parsed" : {
      "day" : 1,
      "month" : 1,
      "year" : 2020
   },
   "rawString" : "2020-01-01"
},
{
   "name" : "QRCH/UltmtDbtr/Name",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtDbtr/StrtNm",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtDbtr/BldgNb",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtDbtr/PstCd",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtDbtr/TwnNm",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/UltmtDbtr/Ctry",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/RmtInf/Tp",
   "parsed" : "NON",
   "rawString" : "NON"
},
{
   "name" : "QRCH/RmtInf/Ref",
   "parsed" : "",
   "rawString" : ""
},
{
   "name" : "QRCH/RmtInf/Ustrd",
   "parsed" : "test code",
   "rawString" : "test code"
},
{
   "name" : "QRCH/AltPmtInf/AltPmt/1",
   "parsed" : "AC:Alternative scheme data first",
   "rawString" : "AC:Alternative scheme data first"
},
{
   "name" : "QRCH/AltPmtInf/AltPmt/2",
   "parsed" : "AC:Alternative scheme data second",
   "rawString" : "AC:Alternative scheme data second"
}
]

Exposed fields

The exposed fields correspond one-to-one with the fields defined in the specs (link) at page 18, table 6. The full list is given below:

Element Name Meaning Always Present May be empty Parsed Content
QRCH/Header/QRType Indicator for Swiss QR Code, always ‘SPC’ yes no  
QRCH/Header/Version Version string, ‘0100’ for v1.0 yes no  
QRCH/Header/Coding Character set code, always 1 yes no parsed Integer
QRCH/CdtrInf/IBAN IBAN (string of 21 characters) yes no  
QRCH/Cdtr/Name Creditor’s name yes no  
QRCH/Cdtr/StrtNm Creditor’s street name yes yes  
QRCH/Cdtr/BldgNb Creditor’s house number yes yes  
QRCH/Cdtr/PstCd Creditor’s postal code yes no  
QRCH/Cdtr/TwnNm Creditor’s city yes no  
QRCH/Cdtr/Ctry Creditor’s country (2 digit ISO 3166-1) yes no  
QRCH/UltmtCdtr/Name Ultimate Creditor’s name yes yes (but only if all other QRCH/UltmtCdtr/* fields are empty)  
QRCH/UltmtCdtr/StrtNm Ultimate Creditor’s street name yes yes  
QRCH/UltmtCdtr/BldgNb Ultimate Creditor’s house number yes yes  
QRCH/UltmtCdtr/PstCd Ultimate Creditor’s postal code yes yes (but only if all other QRCH/UltmtCdtr/* fields are empty)  
QRCH/UltmtCdtr/TwnNm Ultimate Creditor’s city yes yes (but only if all other QRCH/UltmtCdtr/* fields are empty)  
QRCH/UltmtCdtr/Ctry Ultimate Creditor’s country (2 digit ISO 3166-1) yes yes (but only if all other QRCH/UltmtCdtr/* fields are empty)  
QRCH/CcyAmtDate/Amt Payment amount yes yes  
QRCH/CcyAmtDate/Ccy Currency (‘CHF’ or ‘EUR’) yes no  
QRCH/CcyAmtDate/ReqdExctnDt Due date yes yes

key/value pairs:

  • ‘year’ : YYYY,
  • ‘month’ : MM,
  • ‘day’ : DD

with YYYY, MM, DD integers

QRCH/UltmtDbtr/Name Ultimate Debitor’s name yes yes (but only if all other QRCH/UltmtDbtr/* fields are empty)  
QRCH/UltmtDbtr/StrtNm Ultimate Debitor’s street name yes yes  
QRCH/UltmtDbtr/BldgNb Ultimate Debitor’s house number yes yes  
QRCH/UltmtDbtr/PstCd Ultimate Debitor’s postal code yes yes (but only if all other QRCH/UltmtDbtr/* fields are empty)  
QRCH/UltmtDbtr/TwnNm Ultimate Debitor’s city yes yes (but only if all other QRCH/UltmtDbtr/* fields are empty)  
QRCH/UltmtDbtr/Ctry Ultimate Debitor’s country (2 digit ISO 3166-1) yes yes (but only if all other QRCH/UltmtDbtr/* fields are empty)  
QRCH/RmtInf/Tp Reference type (QRR for QR reference, SCOR for Creditor Reference, NON wihtout reference) yes no  
QRCH/RmtInf/Ref Reference number yes yes  
QRCH/AltPmtInf/AltPmt/1 Additional scheme parameters (first) no yes  
QRCH/AltPmtInf/AltPmt/1 Additional scheme parameters (second) no yes