Swiss QR-bill code

Build the Swiss QR-bill code for a payment: validates every field against the Swiss Payment Standards (version 2.3), returns the QR payload text and the QR code as SVG (46 × 46 mm, with the Swiss cross), ready to place on an invoice.

CHF 0.01 / callCall itTry it
McGill cash register, patent model, 1886
McGill cash register, patent model1886

Details

Checks: IBAN or QR-IBAN, matching reference type (QR reference with a QR-IBAN; RF creditor reference or none with a normal IBAN), structured addresses, amount range and decimals, currency CHF or EUR, field lengths, allowed characters, 997-byte limit.

Does not cover: the full A6 payment part layout with receipt; printing.

Price: CHF 0.01 per call (first 100 calls per day free).

Example: {"iban":"CH44 3199 9123 0008 8901 2","creditor":{"name":"Muster AG","street":"Bahnhofstrasse","building":"1","postcode":"8001","town":"Zürich","country":"CH"},"amount":199.95,"currency":"CHF","reference":"210000000003139471430009017"} → payload with reference type QRR and an SVG.

Call it

REST
curl -X POST https://api.tausendwerk.xyz/v1/qr-bill \
  -H "Content-Type: application/json" \
  -d '{"iban":"CH44 3199 9123 0008 8901 2","creditor":{"name":"Muster AG","street":"Bahnhofstrasse","building":"1","postcode":"8001","town":"Zürich","country":"CH"},"amount":199.95,"currency":"CHF","reference":"210000000003139471430009017"}'
MCP tool name
qr_bill

After the free 100 calls per day, add a key: Authorization: Bearer tw_live_…. Pricing

Try it

Runs against the live API with the free allowance.

Input schema JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "iban",
    "creditor",
    "currency"
  ],
  "properties": {
    "iban": {
      "type": "string",
      "maxLength": 34
    },
    "creditor": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "postcode",
        "town",
        "country"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 70
        },
        "street": {
          "type": "string",
          "maxLength": 70
        },
        "building": {
          "type": "string",
          "maxLength": 16
        },
        "postcode": {
          "type": "string",
          "maxLength": 16
        },
        "town": {
          "type": "string",
          "maxLength": 35
        },
        "country": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        }
      }
    },
    "debtor": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "postcode",
        "town",
        "country"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 70
        },
        "street": {
          "type": "string",
          "maxLength": 70
        },
        "building": {
          "type": "string",
          "maxLength": 16
        },
        "postcode": {
          "type": "string",
          "maxLength": 16
        },
        "town": {
          "type": "string",
          "maxLength": 35
        },
        "country": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        }
      }
    },
    "amount": {
      "type": [
        "number",
        "null"
      ]
    },
    "currency": {
      "type": "string",
      "enum": [
        "CHF",
        "EUR"
      ]
    },
    "reference": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 40
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 140
    },
    "bill_information": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 140
    },
    "alternative_schemes": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "maxItems": 2
    },
    "svg": {
      "type": "boolean",
      "default": true
    }
  },
  "examples": [
    {
      "iban": "CH44 3199 9123 0008 8901 2",
      "creditor": {
        "name": "Muster AG",
        "street": "Bahnhofstrasse",
        "building": "1",
        "postcode": "8001",
        "town": "Zürich",
        "country": "CH"
      },
      "amount": 199.95,
      "currency": "CHF",
      "reference": "210000000003139471430009017"
    }
  ]
}

More in Identifiers and Swiss QR-bills