Introduction

BillScan is a REST API for parsing Swiss QR-bills from PDF files. It extracts all structured payment data — IBAN, creditor, debtor, amount, and reference — and returns clean JSON.

The API follows the Swiss Payments Code specification (SIX Group, v2.2). Files are processed in memory and never stored.

Base URLhttps://billscan.ch/api

Authentication

All requests except /api/health require an API key in the X-API-Key header.

curl -X POST https://billscan.ch/api/parse \
  -H "X-API-Key: bsk_live_your_key_here" \
  -F "file=@invoice.pdf"

Get your API key from the dashboard after signing up. Keys follow the format bsk_live_xxxxxxxx...

Quick Start

  1. Sign up at billscan.ch/signup
  2. Copy your API key from the dashboard
  3. Make your first API call
curl -X POST https://billscan.ch/api/parse \
  -H "X-API-Key: bsk_live_your_key_here" \
  -F "file=@your-swiss-invoice.pdf"

POST /api/parse

POST/api/parse

Accepts a Swiss QR-bill PDF and returns structured payment data as JSON.

Request

ParameterLocationRequiredDescription
X-API-KeyHeaderYesYour API key
fileForm field (multipart)YesThe PDF file to parse

Example request

curl -X POST https://billscan.ch/api/parse \
  -H "X-API-Key: bsk_live_your_key_here" \
  -F "file=@invoice.pdf"

Response 200

{
  "iban": "CH5604835012345678009",
  "creditor": {
    "addressType": "S",
    "name": "Muster Rechnung AG",
    "street": "Musterstrasse",
    "buildingNumber": "123",
    "postalCode": "8000",
    "city": "Zürich",
    "country": "CH"
  },
  "amount": 199.00,
  "amountFormatted": "199.00",
  "currency": "CHF",
  "debtor": {
    "addressType": "S",
    "name": "Max Muster",
    "street": "Musterstrasse",
    "buildingNumber": "1",
    "postalCode": "8000",
    "city": "Zürich",
    "country": "CH"
  },
  "reference": {
    "type": "QRR",
    "reference": "210000000003139471430009017"
  },
  "unstructuredMessage": "Rechnung Nr. 2026-001",
  "billingInformation": null
}

Response fields

FieldTypeDescription
ibanstringCreditor IBAN in compact format (no spaces)
creditorobjectCreditor name and address
ultimateCreditorobject or nullUltimate creditor if present in QR data
amountnumber or nullPayment amount as a number
amountFormattedstring or nullAmount formatted to 2 decimal places
currencystringCHF or EUR
debtorobject or nullDebtor name and address
reference.typestringQRR, SCOR, or NON
reference.referencestringReference number
unstructuredMessagestring or nullFree text message field
billingInformationstring or nullStructured billing info starting with //S1/

GET /api/health

GET/api/health

Health check endpoint. No authentication required.

curl https://billscan.ch/api/health

Response 200

{
  "status": "ok",
  "timestamp": "2026-05-25T10:00:00.000Z"
}

Error Codes

All error responses follow this shape:

{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid or inactive API key."
  }
}
CodeHTTP StatusDescription
MISSING_API_KEY401No API key provided in X-API-Key header
INVALID_API_KEY401API key not found or inactive
RATE_LIMIT_EXCEEDED429Monthly parse limit reached. Upgrade to Pro.
NO_FILE400No file field in the request body
INVALID_FILE400File provided is not a PDF
NO_PAGES422PDF could not be decoded or has no pages
NO_QR_CODE422No QR code found in any page of the PDF
NOT_SWISS_QR422QR code found but not a Swiss Payments Code
PARSE_ERROR422QR data found but could not be parsed against SIX spec

Rate Limits

PlanParses per monthPer-minute limitPrice
Free50100 CHF
Pro1,000609 CHF/month
Custom10,000+CustomContact us

When the monthly limit is reached, all requests return 429 RATE_LIMIT_EXCEEDED until the limit resets at the start of the next calendar month.

Upgrade your plan →

QR-bill Spec

BillScan implements version 2.2 of the Swiss Payments Code (SPC) specification, defined by SIX Group.

The QR code embedded in a Swiss invoice contains structured payment data across 28–32 newline-separated fields. BillScan handles:

  • Native PDFs generated by accounting software
  • Scanned PDFs from photographed paper invoices
  • Multi-page PDFs where the QR code appears on any page
  • Both QRR (QR reference) and SCOR (creditor reference) formats

Official SIX specification →