Skip to content
HALOWERK

Bildwerk

swiss qr bill

Generate: builds the SPC/0200 payload from structured data (address type S only, empty ultimate creditor, amount with two decimals, CHF/EUR), chooses QRR for a QR-IBAN (IID 30000–31999; a 26-digit reference gets its modulo 10 recursive check digit) or SCOR/NON for an IBAN, checks the permitted character set, lengths and the 997-character limit, and renders the QR code at level M with the 7 mm Swiss cross on 46 mm (proportions from the official SIX artwork); the PNG is decoded again to.

POST https://bild.halowerk.com/v1/swiss-qr-bill

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
billobjectNoData to generate a QR-bill code from.
payloadstringNoA QR-bill payload to validate.
image_base64stringNoThe image (PNG, JPEG, WebP, GIF, TIFF or AVIF) as base64 or data: URL, at most 10 MB decoded. Give either image_base64 or image_url.
image_urlstringNoPublic http(s) URL of the image, fetched once (at most 10 MB). Private and local addresses are refused.
line_endingstringNo
outputstringNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "bill": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "iban",
        "creditor",
        "currency"
      ],
      "description": "Data to generate a QR-bill code from.",
      "properties": {
        "iban": {
          "type": "string",
          "minLength": 21,
          "maxLength": 26,
          "description": "CH or LI IBAN or QR-IBAN."
        },
        "creditor": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "name",
            "postal_code",
            "town",
            "country"
          ],
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 70
            },
            "street": {
              "type": "string",
              "maxLength": 70
            },
            "building_number": {
              "type": "string",
              "maxLength": 16
            },
            "postal_code": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "town": {
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            },
            "country": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          }
        },
        "amount": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 999999999.99
        },
        "currency": {
          "type": "string",
          "enum": [
            "CHF",
            "EUR"
          ]
        },
        "debtor": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "name",
            "postal_code",
            "town",
            "country"
          ],
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 70
            },
            "street": {
              "type": "string",
              "maxLength": 70
            },
            "building_number": {
              "type": "string",
              "maxLength": 16
            },
            "postal_code": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            },
            "town": {
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            },
            "country": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          }
        },
        "reference": {
          "type": "string",
          "maxLength": 27,
          "description": "QR reference (26 or 27 digits) for a QR-IBAN, or ISO 11649 RF reference for an IBAN."
        },
        "message": {
          "type": "string",
          "maxLength": 140
        },
        "billing_information": {
          "type": "string",
          "maxLength": 140,
          "description": "Structured billing information (e.g. Swico S1)."
        },
        "alternative_procedures": {
          "type": "array",
          "maxItems": 2,
          "items": {
            "type": "string",
            "maxLength": 100
          }
        }
      }
    },
    "payload": {
      "type": "string",
      "minLength": 3,
      "maxLength": 5000,
      "description": "A QR-bill payload to validate."
    },
    "image_base64": {
      "type": "string",
      "minLength": 16,
      "maxLength": 14000000,
      "description": "The image (PNG, JPEG, WebP, GIF, TIFF or AVIF) as base64 or data: URL, at most 10 MB decoded. Give either image_base64 or image_url."
    },
    "image_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Public http(s) URL of the image, fetched once (at most 10 MB). Private and local addresses are refused."
    },
    "line_ending": {
      "type": "string",
      "enum": [
        "LF",
        "CRLF"
      ],
      "default": "LF"
    },
    "output": {
      "type": "string",
      "enum": [
        "svg",
        "png",
        "both",
        "payload"
      ],
      "default": "both"
    }
  }
}

Open original schema

Published input example

{
  "bill": {
    "iban": "CH4431999123000889012",
    "creditor": {
      "name": "Robert Schneider AG",
      "street": "Rue du Lac",
      "building_number": "1268",
      "postal_code": "2501",
      "town": "Biel",
      "country": "CH"
    },
    "amount": 1949.75,
    "currency": "CHF",
    "reference": "21000000000313947143000901"
  },
  "output": "svg"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →