QR Invoice REST API (2.0)

The QR Invoice REST API provides various services for creation and processing of Swiss QR Invoices. This API is available as a Cloud Service but is also available as a self-hosted solution.

Product Website

www.qr-invoice.ch

API Key

This API requires an API Key for authorization on the Cloud. You may use the following Demo API Key or request a trial API on our website: QrInvoice - Order Trial Key
582c9ea9-741a-4bb6-acae-cf92f8805864

Important: Use of Demo API Key comes with a few restrictions!

Hints

  • Please note, that you can retrieve JSON example documents in the «00 Example Data» section using the respective Endpoints. E.g.: https://rest.qr-invoice.cloud/v2/examples/qr-invoice/with-qr-reference
  • Handle error responses correctly by checking HTTP status and read detailed error/validation message from response body
  • Check all parameters
  • Check out length limitation
  • Consult official standards / specification if you need more detailed information regarding QR-Bill specification

Standards / Specifications

Overview of official specs www.qr-invoice.ch/dokumentation/standards-merkblaetter/

QR Invoice Layers


QR Invoice Model



Product Version: 1.21-SNAPSHOT

Download OpenAPI description
Languages
Servers
Generated server url

https://rest.qr-invoice.cloud/

00 Example Data

Various example data that can be used as example input to other services

Operations

10 QR Invoice Documents including Payment Part & Receipt (QR Bill)

Operations

11 Payment Part & Receipt (QR Bill)

Operations

12 Swiss QR Code

Operations

Create Swiss QR Code - Prefer POST endpoint if possible

Request

Security
X-API-Key or api_key
Query
formatstring

Output Format

Default "application/pdf"
resolutionstring

Output Resolution.

Default "MEDIUM_300_DPI"
Enum"LOW_150_DPI""MEDIUM_300_DPI""HIGH_600_DPI"
sizestring

Desired QR Code size (in pixels). This is an alternative to Output Resolution. This is only relevant for raster graphics (e.g. PNG). Please note that it is only a hint.

Example: size=
normalizeInputboolean

If true, input gets normalized. This means strings are trimmed, special quotations replaced with ASCII ones and special characters replaced with semantically equal ones (e.g. œ -> oe)

Default false
qrInvoicestringrequired

QrInvoice json document, URL encoded using UTF8

curl -i -X GET \
  'https://rest.qr-invoice.cloud/v2/swiss-qr-code?format=application%2Fpdf&normalizeInput=false&qrInvoice=string&resolution=LOW_150_DPI' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

The QR code in the requested output format.

Body
object
Response
No response example

Create Swiss QR Code

Request

Security
X-API-Key or api_key
Query
resolutionstring

Output Resolution.

Default "MEDIUM_300_DPI"
Enum"LOW_150_DPI""MEDIUM_300_DPI""HIGH_600_DPI"
sizestring

Desired QR Code size (in pixels). This is an alternative to Output Resolution. This is only relevant for raster graphics (e.g. PNG). Please note that it is only a hint.

Example: size=
normalizeInputboolean

If true, input gets normalized. This means strings are trimmed, special quotations replaced with ASCII ones and special characters replaced with semantically equal ones (e.g. œ -> oe)

Default false
Bodyapplication/jsonrequired
creditorInformationobject(CreditorInformation)required
creditorInformation.​ibanstring= 21 charactersrequired

IBAN or QR-IBAN of the creditor.
Fixed length: 21 alphanumeric characters, only IBANs with CH or LI country code permitted.

Example: "CH3908704016075473007"
creditorInformation.​creditorobject(Creditor)required
creditorInformation.​creditor.​addressTypestring= 1 charactersrequired

Address type
The address type is specified using a code. The following codes are defined:
"S" - structured address
"K" - combined address elements (2 lines). DEPRECATED - discontinued and no longer supported after 21.11.2025

Enum"STRUCTURED""COMBINED"
Example: "STRUCTURED"
creditorInformation.​creditor.​namestring[ 1 .. 70 ] charactersrequired

The creditor's name or company according to the account name.
Comment: always matches the account holder
Maximum 70 characters permitted
First name (optional, if available) + last name or company name

Example: "Robert Schneider AG"
creditorInformation.​creditor.​streetNamestring[ 1 .. 70 ] characters

Street/P.O. box of the creditor
Maximum 70 characters permitted, may not include any house or building number.

Example: "Rue du Lac"
creditorInformation.​creditor.​houseNumberstring[ 1 .. 16 ] characters

House number of the creditor
Maximum 16 characters permitted

Example: "1268/2/22"
creditorInformation.​creditor.​postalCodestring[ 1 .. 16 ] charactersrequired

Postal code of the creditor
Maximum 16 characters permitted. The postal code is always to be entered without a country code prefix.

Example: "2501"
creditorInformation.​creditor.​citystring[ 1 .. 35 ] charactersrequired

City of the creditor
Maximum 35 characters permitted

Example: "Biel"
creditorInformation.​creditor.​countrystring= 2 charactersrequired

Country of the creditor
Two-digit country code according to ISO 3166-1

Example: "CH"
creditorInformation.​creditor.​addressLine1string[ 1 .. 70 ] charactersDeprecated

Address line 1 including street and building number or P.O. Box
Maximum 70 characters permitted

Example: "Rue du Lac 1268/2/22"
creditorInformation.​creditor.​addressLine2string[ 1 .. 70 ] charactersDeprecated

Address line 2 including postal code and town from creditor’s address
Maximum 70 characters permitted
Must be provided for address type "K".

Example: "2501 Biel"
ultimateCreditorobject(UltimateCreditor)
paymentAmountInformationobject(PaymentAmountInformation)required
paymentAmountInformation.​amountnumber[ 0 .. 999999999 ]

The payment amount
The amount element is to be entered without leading zeroes, including decimal separators and two decimal places.

Decimal, maximum 12-digits permitted, including decimal separators. Only decimal points (".") are permitted as decimal separators.

Example: 199.95
paymentAmountInformation.​currencystring= 3 charactersrequired

The payment currency, 3-digit alphanumeric currency code according to ISO 4217
Only CHF and EUR are permitted.

Enum"EUR""CHF"
Example: "CHF"
ultimateDebtorobject(UltimateDebtor)
paymentReferenceobject(PaymentReference)required
paymentReference.​referenceTypestring[ 3 .. 4 ] charactersrequired

Reference type (QR, ISO)
The following codes are permitted:
QRR – QR reference
SCOR – Creditor Reference (ISO 11649)
NON – without reference
Maximum four characters, alphanumeric
Must contain the code QRR where a QR-IBAN is used;
where the IBAN is used, either the SCOR or NON code can be entered

Enum"QRR""SCOR""NON"
Example: "SCOR"
paymentReference.​referencestring[ 0 .. 27 ] characters

Reference number
Structured payment reference
The reference is either a QR reference or a Creditor Reference (ISO 11649)
Maximum 27 characters, alphanumeric;
must be filled if a QR-IBAN is used.
QR reference: 27 characters, numeric, check sum calculation according to Modulo 10 recursive (27th position of the reference)
Creditor Reference (ISO 11649): max 25 characters, alphanumeric
The element may not be filled for the NON reference type.

REST API
On the REST API automatic creation of both QRR and SCOR reference numbers can be used. To do so, wrap the reference number in curly brackets {42}. In case of the QRR, customerId can be passed as well, separated by a colon, e.g. {123456:42}, whereas 123456 is the customerId

Example: "RF18539007547034"
paymentReference.​additionalInformationobject(AdditionalInformation)
alternativeSchemesobject(AlternativeSchemes)
curl -i -X POST \
  'https://rest.qr-invoice.cloud/v2/swiss-qr-code?normalizeInput=false&resolution=LOW_150_DPI' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "creditorInformation": {
      "iban": "CH3908704016075473007",
      "creditor": {
        "addressType": "STRUCTURED",
        "name": "Robert Schneider AG",
        "streetName": "Rue du Lac",
        "houseNumber": "1268/2/22",
        "postalCode": "2501",
        "city": "Biel",
        "addressLine1": "Rue du Lac 1268/2/22",
        "addressLine2": "2501 Biel",
        "country": "CH"
      }
    },
    "ultimateCreditor": {
      "addressType": "STRUCTURED",
      "name": "Robert Schneider Services Switzerland AG",
      "streetName": "Rue du Lac",
      "houseNumber": "1268/3/1",
      "postalCode": "2501",
      "city": "Biel",
      "addressLine1": "Rue du Lac 1268/3/1",
      "addressLine2": "2501 Biel",
      "country": "CH"
    },
    "paymentAmountInformation": {
      "amount": 199.95,
      "currency": "CHF"
    },
    "ultimateDebtor": {
      "addressType": "STRUCTURED",
      "name": "Pia-Maria Rutschmann-Schnyder",
      "streetName": "Grosse Marktgasse",
      "houseNumber": "28",
      "postalCode": "9400",
      "city": "Rorschach",
      "addressLine1": "Rue du Lac 1268/3/1",
      "addressLine2": "2501 Biel",
      "country": "CH"
    },
    "paymentReference": {
      "referenceType": "SCOR",
      "reference": "RF18539007547034",
      "additionalInformation": {
        "unstructuredMessage": "Bill No. 3139 for garden work and disposal of cuttings",
        "billInformation": "//S1/10/10201409/11/190512/20/1400.000-53/30/106017086/31/180508/32/7.7/40/2:10;0:30",
        "billInformationObject": {}
      }
    },
    "alternativeSchemes": {
      "alternativeSchemeParameters": [
        "eBill/B/john.doe@example.com"
      ]
    }
  }'

Responses

The QR code in the requested output format.

Body
object
Response
No response example

Validate file containing a single Swiss QR Code

Request

Security
X-API-Key or api_key
Bodymultipart/form-data
filestring(binary)required

QrInvoice

curl -i -X POST \
  https://rest.qr-invoice.cloud/v2/swiss-qr-code/validate \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -F file=string

Responses

The validation result

Bodytext/plain
string

Parse / extract Swiss QR Code from document (Returns first code if multiple present)

Request

Security
X-API-Key or api_key
Query
expandBillInformationboolean

If true, bill information will be expanded as object if present

Default false
effortLevelstring

If HARDER, service tries harder to detect QR codes. Operation is slower when efforts are strengthened, but detection rate is higher.

Default "DEFAULT"
Enum"DEFAULT""HARDER"
Bodymultipart/form-data
filestring(binary)required

QR bill to parse. Supported are PDFs and raster graphics such as JPEG and PNG.

curl -i -X POST \
  'https://rest.qr-invoice.cloud/v2/swiss-qr-code/parse?effortLevel=DEFAULT&expandBillInformation=false' \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -F file=string

Responses

The parsed QR Invoice structure

Bodyapplication/json
creditorInformationobject(CreditorInformation)required
creditorInformation.​ibanstring= 21 charactersrequired

IBAN or QR-IBAN of the creditor.
Fixed length: 21 alphanumeric characters, only IBANs with CH or LI country code permitted.

Example: "CH3908704016075473007"
creditorInformation.​creditorobject(Creditor)required
creditorInformation.​creditor.​addressTypestring= 1 charactersrequired

Address type
The address type is specified using a code. The following codes are defined:
"S" - structured address
"K" - combined address elements (2 lines). DEPRECATED - discontinued and no longer supported after 21.11.2025

Enum"STRUCTURED""COMBINED"
Example: "STRUCTURED"
creditorInformation.​creditor.​namestring[ 1 .. 70 ] charactersrequired

The creditor's name or company according to the account name.
Comment: always matches the account holder
Maximum 70 characters permitted
First name (optional, if available) + last name or company name

Example: "Robert Schneider AG"
creditorInformation.​creditor.​streetNamestring[ 1 .. 70 ] characters

Street/P.O. box of the creditor
Maximum 70 characters permitted, may not include any house or building number.

Example: "Rue du Lac"
creditorInformation.​creditor.​houseNumberstring[ 1 .. 16 ] characters

House number of the creditor
Maximum 16 characters permitted

Example: "1268/2/22"
creditorInformation.​creditor.​postalCodestring[ 1 .. 16 ] charactersrequired

Postal code of the creditor
Maximum 16 characters permitted. The postal code is always to be entered without a country code prefix.

Example: "2501"
creditorInformation.​creditor.​citystring[ 1 .. 35 ] charactersrequired

City of the creditor
Maximum 35 characters permitted

Example: "Biel"
creditorInformation.​creditor.​countrystring= 2 charactersrequired

Country of the creditor
Two-digit country code according to ISO 3166-1

Example: "CH"
creditorInformation.​creditor.​addressLine1string[ 1 .. 70 ] charactersDeprecated

Address line 1 including street and building number or P.O. Box
Maximum 70 characters permitted

Example: "Rue du Lac 1268/2/22"
creditorInformation.​creditor.​addressLine2string[ 1 .. 70 ] charactersDeprecated

Address line 2 including postal code and town from creditor’s address
Maximum 70 characters permitted
Must be provided for address type "K".

Example: "2501 Biel"
ultimateCreditorobject(UltimateCreditor)
paymentAmountInformationobject(PaymentAmountInformation)required
paymentAmountInformation.​amountnumber[ 0 .. 999999999 ]

The payment amount
The amount element is to be entered without leading zeroes, including decimal separators and two decimal places.

Decimal, maximum 12-digits permitted, including decimal separators. Only decimal points (".") are permitted as decimal separators.

Example: 199.95
paymentAmountInformation.​currencystring= 3 charactersrequired

The payment currency, 3-digit alphanumeric currency code according to ISO 4217
Only CHF and EUR are permitted.

Enum"EUR""CHF"
Example: "CHF"
ultimateDebtorobject(UltimateDebtor)
paymentReferenceobject(PaymentReference)required
paymentReference.​referenceTypestring[ 3 .. 4 ] charactersrequired

Reference type (QR, ISO)
The following codes are permitted:
QRR – QR reference
SCOR – Creditor Reference (ISO 11649)
NON – without reference
Maximum four characters, alphanumeric
Must contain the code QRR where a QR-IBAN is used;
where the IBAN is used, either the SCOR or NON code can be entered

Enum"QRR""SCOR""NON"
Example: "SCOR"
paymentReference.​referencestring[ 0 .. 27 ] characters

Reference number
Structured payment reference
The reference is either a QR reference or a Creditor Reference (ISO 11649)
Maximum 27 characters, alphanumeric;
must be filled if a QR-IBAN is used.
QR reference: 27 characters, numeric, check sum calculation according to Modulo 10 recursive (27th position of the reference)
Creditor Reference (ISO 11649): max 25 characters, alphanumeric
The element may not be filled for the NON reference type.

REST API
On the REST API automatic creation of both QRR and SCOR reference numbers can be used. To do so, wrap the reference number in curly brackets {42}. In case of the QRR, customerId can be passed as well, separated by a colon, e.g. {123456:42}, whereas 123456 is the customerId

Example: "RF18539007547034"
paymentReference.​additionalInformationobject(AdditionalInformation)
alternativeSchemesobject(AlternativeSchemes)
Response
application/json
{ "creditorInformation": { "iban": "CH3908704016075473007", "creditor": {} }, "ultimateCreditor": { "addressType": "STRUCTURED", "name": "Robert Schneider Services Switzerland AG", "streetName": "Rue du Lac", "houseNumber": "1268/3/1", "postalCode": "2501", "city": "Biel", "addressLine1": "Rue du Lac 1268/3/1", "addressLine2": "2501 Biel", "country": "CH" }, "paymentAmountInformation": { "amount": 199.95, "currency": "CHF" }, "ultimateDebtor": { "addressType": "STRUCTURED", "name": "Pia-Maria Rutschmann-Schnyder", "streetName": "Grosse Marktgasse", "houseNumber": "28", "postalCode": "9400", "city": "Rorschach", "addressLine1": "Rue du Lac 1268/3/1", "addressLine2": "2501 Biel", "country": "CH" }, "paymentReference": { "referenceType": "SCOR", "reference": "RF18539007547034", "additionalInformation": {} }, "alternativeSchemes": { "alternativeSchemeParameters": [], "alternativeSchemeParameterObjects": [] } }

Parse / extract all Swiss QR Code from document in an array

Request

Security
X-API-Key or api_key
Query
expandBillInformationboolean

If true, bill information will be expanded as object if present

Default false
effortLevelstring

If HARDER, service tries harder to detect QR codes. Operation is slower when efforts are strengthened, but detection rate is higher.

Default "DEFAULT"
Enum"DEFAULT""HARDER"
Bodymultipart/form-data
filestring(binary)required

QR bill to parse. Supported are PDFs and raster graphics such as JPEG and PNG.

curl -i -X POST \
  'https://rest.qr-invoice.cloud/v2/swiss-qr-code/parseAll?effortLevel=DEFAULT&expandBillInformation=false' \
  -H 'Content-Type: multipart/form-data' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -F file=string

Responses

The parsed QR Invoices structure

Bodyapplication/json
creditorInformationobject(CreditorInformation)required
creditorInformation.​ibanstring= 21 charactersrequired

IBAN or QR-IBAN of the creditor.
Fixed length: 21 alphanumeric characters, only IBANs with CH or LI country code permitted.

Example: "CH3908704016075473007"
creditorInformation.​creditorobject(Creditor)required
creditorInformation.​creditor.​addressTypestring= 1 charactersrequired

Address type
The address type is specified using a code. The following codes are defined:
"S" - structured address
"K" - combined address elements (2 lines). DEPRECATED - discontinued and no longer supported after 21.11.2025

Enum"STRUCTURED""COMBINED"
Example: "STRUCTURED"
creditorInformation.​creditor.​namestring[ 1 .. 70 ] charactersrequired

The creditor's name or company according to the account name.
Comment: always matches the account holder
Maximum 70 characters permitted
First name (optional, if available) + last name or company name

Example: "Robert Schneider AG"
creditorInformation.​creditor.​streetNamestring[ 1 .. 70 ] characters

Street/P.O. box of the creditor
Maximum 70 characters permitted, may not include any house or building number.

Example: "Rue du Lac"
creditorInformation.​creditor.​houseNumberstring[ 1 .. 16 ] characters

House number of the creditor
Maximum 16 characters permitted

Example: "1268/2/22"
creditorInformation.​creditor.​postalCodestring[ 1 .. 16 ] charactersrequired

Postal code of the creditor
Maximum 16 characters permitted. The postal code is always to be entered without a country code prefix.

Example: "2501"
creditorInformation.​creditor.​citystring[ 1 .. 35 ] charactersrequired

City of the creditor
Maximum 35 characters permitted

Example: "Biel"
creditorInformation.​creditor.​countrystring= 2 charactersrequired

Country of the creditor
Two-digit country code according to ISO 3166-1

Example: "CH"
creditorInformation.​creditor.​addressLine1string[ 1 .. 70 ] charactersDeprecated

Address line 1 including street and building number or P.O. Box
Maximum 70 characters permitted

Example: "Rue du Lac 1268/2/22"
creditorInformation.​creditor.​addressLine2string[ 1 .. 70 ] charactersDeprecated

Address line 2 including postal code and town from creditor’s address
Maximum 70 characters permitted
Must be provided for address type "K".

Example: "2501 Biel"
ultimateCreditorobject(UltimateCreditor)
paymentAmountInformationobject(PaymentAmountInformation)required
paymentAmountInformation.​amountnumber[ 0 .. 999999999 ]

The payment amount
The amount element is to be entered without leading zeroes, including decimal separators and two decimal places.

Decimal, maximum 12-digits permitted, including decimal separators. Only decimal points (".") are permitted as decimal separators.

Example: 199.95
paymentAmountInformation.​currencystring= 3 charactersrequired

The payment currency, 3-digit alphanumeric currency code according to ISO 4217
Only CHF and EUR are permitted.

Enum"EUR""CHF"
Example: "CHF"
ultimateDebtorobject(UltimateDebtor)
paymentReferenceobject(PaymentReference)required
paymentReference.​referenceTypestring[ 3 .. 4 ] charactersrequired

Reference type (QR, ISO)
The following codes are permitted:
QRR – QR reference
SCOR – Creditor Reference (ISO 11649)
NON – without reference
Maximum four characters, alphanumeric
Must contain the code QRR where a QR-IBAN is used;
where the IBAN is used, either the SCOR or NON code can be entered

Enum"QRR""SCOR""NON"
Example: "SCOR"
paymentReference.​referencestring[ 0 .. 27 ] characters

Reference number
Structured payment reference
The reference is either a QR reference or a Creditor Reference (ISO 11649)
Maximum 27 characters, alphanumeric;
must be filled if a QR-IBAN is used.
QR reference: 27 characters, numeric, check sum calculation according to Modulo 10 recursive (27th position of the reference)
Creditor Reference (ISO 11649): max 25 characters, alphanumeric
The element may not be filled for the NON reference type.

REST API
On the REST API automatic creation of both QRR and SCOR reference numbers can be used. To do so, wrap the reference number in curly brackets {42}. In case of the QRR, customerId can be passed as well, separated by a colon, e.g. {123456:42}, whereas 123456 is the customerId

Example: "RF18539007547034"
paymentReference.​additionalInformationobject(AdditionalInformation)
alternativeSchemesobject(AlternativeSchemes)
Response
application/json
{ "creditorInformation": { "iban": "CH3908704016075473007", "creditor": {} }, "ultimateCreditor": { "addressType": "STRUCTURED", "name": "Robert Schneider Services Switzerland AG", "streetName": "Rue du Lac", "houseNumber": "1268/3/1", "postalCode": "2501", "city": "Biel", "addressLine1": "Rue du Lac 1268/3/1", "addressLine2": "2501 Biel", "country": "CH" }, "paymentAmountInformation": { "amount": 199.95, "currency": "CHF" }, "ultimateDebtor": { "addressType": "STRUCTURED", "name": "Pia-Maria Rutschmann-Schnyder", "streetName": "Grosse Marktgasse", "houseNumber": "28", "postalCode": "9400", "city": "Rorschach", "addressLine1": "Rue du Lac 1268/3/1", "addressLine2": "2501 Biel", "country": "CH" }, "paymentReference": { "referenceType": "SCOR", "reference": "RF18539007547034", "additionalInformation": {} }, "alternativeSchemes": { "alternativeSchemeParameters": [], "alternativeSchemeParameterObjects": [] } }

13 Swiss Payments Code

Operations

20 IBAN

Operations

21 QR Reference (QRR)

Operations

22 Creditor Reference (SCOR)

Operations

23 Country Codes

According to ISO 3166-1 alpha-2

Operations

30 Bill Information

Operations

31 Alternative Schemes

Operations

90 PDF

Operations

99 Authentication

Operations

XX Deprecated QR Invoice Operations v1

Version 1 of QR Invoice REST API

Operations