Skip to main content

Read SwissQR Code in Zapier

Read SwissQR Code is a Zapier action by PDF4me that decodes the Swiss QR-bill embedded in a PDF and returns creditor, debtor, IBAN, amount, and reference data as JSON. Use it to auto-rename invoices, match payments to accounting records, or route documents by amount or reference without manual data entry.

Related Blog Posts(1)

What this action does

PDF4me Read SwissQR Code takes one PDF containing a Swiss QR-bill (QR-Rechnung) and returns its structured payment data, inside a Zap. Map the File, and the action returns Doc Text, a JSON string with IBAN, creditor, ultimate creditor, debtor, amount, currency, and reference fields. Parse it with a Code by Zapier step to drive invoice renaming, payment matching, or accounting automation.

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials.

Important Facts You Should Not Miss

Doc Text is a JSON string, not individual fields
The action returns one field, Doc Text, holding the whole decoded payload as a JSON string. You need a Code by Zapier (Run JavaScript) step to JSON.parse it before mapping individual values like IBAN or ud_Name.
Field names use cr_/ucr_/ud_ prefixes
cr_ is the creditor, ucr_ is the ultimate creditor (often blank), and ud_ is the ultimate debtor, matching the Swiss Payment Standards (SPC) field naming. cr_Name and ud_Name are the two fields most workflows use.
Use the original File for the PDF, not this action's output
Read SwissQR Code returns data about the PDF, it does not pass the PDF itself onward. Keep referencing File from your trigger for any Upload File, email, or storage step.
Zapier Read SwissQR Code action Set up action panel showing File required and File Name optional fields

Set up action panel: only File is required, File Name is optional

Parameters

Required in the Zapier UI: File. File Name is optional.

ParameterRequiredWhat it doesExample
FileRequiredThe PDF containing the Swiss QR-bill to decode. Map from your trigger or a previous step.1. File
File NameOptionalName for the response file. If left blank, the name is picked from the source URL.invoice.pdf

Output

The action returns file metadata plus one payload field, Doc Text, a JSON string. Parse it to reach the individual Swiss QR-bill fields listed below the table.

FieldTypeWhat it contains
File NameStringName of the generated response file, from File Name or picked from the source URL.
File ExtensionStringExtension of the response file, .json.
Full File NameStringComplete filename including extension.
File Alternate UrlStringURL to the generated JSON response file.
Document IdStringUnique identifier for this processing run.
File SizeNumberSize of the response file in bytes.
Doc TextString (JSON)The decoded Swiss QR-bill payload as a JSON string. Parse it to reach IBAN, creditor, debtor, amount, currency, and reference fields.

Doc Text Fields (after JSON.parse)

FieldWhat it contains
QRType, Version, CodingTypeSwiss Payment Standards header data identifying this as an SPC QR payload and its version.
IBANCreditor IBAN the payment settles to.
cr_Name, cr_StreetOrAddressLine1, cr_PostalCode, cr_City, cr_CountryCreditor (biller) name and address.
ucr_Name, ucr_StreetOrAddressLine1, ucr_PostalCode, ucr_City, ucr_CountryUltimate creditor fields, populated only when the creditor differs from the ultimate payee.
Amount, CurrencyPayment amount and currency (CHF or EUR).
ud_Name, ud_StreetOrAddressLine1, ud_PostalCode, ud_City, ud_CountryUltimate debtor (payer) name and address.
ReferenceType, ReferenceReference type (QRR, SCOR, or NON) and the reference number itself.
UnstructuredMessage, BillingInfoFree-text payment message and structured billing information, when present on the bill.

How Do I Set Up Read SwissQR Code in Zapier?

  1. Add PDF4me as the action app in your Zap and choose Read SwissQR Code.
  2. Connect your PDF4me account or select an existing connection.
  3. Map File to the Swiss QR-bill PDF from your trigger or a previous step. Optionally map File Name.
  4. Test the step and inspect Doc Text in the Data out panel, it is a JSON string.
  5. Add a Code by Zapier (Run JavaScript) step that receives Doc Text, runs JSON.parse, and returns the specific field you need (ud_Name, cr_Name, IBAN, Reference, or others).
  6. Map that parsed value into Upload File (for renaming), a Filter or Paths step (for routing), or a spreadsheet/accounting action.

What Is the Swiss QR-Bill and Why Does It Need a Special Reader?

The Swiss QR-bill (QR-Rechnung) is the Swiss Payment Standards format that became the only valid Swiss payment slip on 30 September 2022, replacing the old orange and red payment slips. It encodes creditor, debtor, IBAN, amount, and reference data inside a QR code using the SPC (Swiss Payment Code) structure, a fixed field order that a generic barcode or QR scanner reads as raw text but cannot map to named fields. Read SwissQR Code decodes that SPC structure and returns it as named JSON fields.

Typical Setups

Workflow ExamplesCommon Zapier patterns using Read SwissQR Code.
Auto-rename invoices by debtor name
  1. A New File in Folder trigger (Dropbox, Google Drive, SharePoint) fires on a new Swiss QR-bill PDF.
  2. Read SwissQR Code runs with File and File Name mapped from the trigger, returning Doc Text.
  3. A Code by Zapier step parses Doc Text and returns ud_Name (the debtor).
  4. Upload File saves the same PDF content with the parsed name so files are searchable by payer.
Match incoming payments to accounting records
  1. An email or folder trigger delivers a Swiss QR-bill PDF.
  2. Read SwissQR Code extracts Doc Text, then a Code by Zapier step parses IBAN, Amount, and Reference.
  3. A lookup step in an accounting system (QuickBooks, Xero, or a custom database) matches the Reference to an open invoice.
  4. A follow-up step marks the invoice as paid and logs the transaction.
Route by amount or reference type
  1. Read SwissQR Code runs on an incoming bill and returns Doc Text.
  2. A Code by Zapier step parses Amount and ReferenceType.
  3. A Paths step branches high-value payments to a manual-approval queue and QRR-referenced payments to automated posting.

Practical Tips

Doc Text always needs a parse step
There is no built-in field mapping for individual Swiss QR-bill values. Budget for a Code by Zapier step in every Zap that uses this action.
cr_ vs ud_ vs ucr_ is easy to mix up
cr_ is the creditor (who gets paid), ud_ is the ultimate debtor (who is paying), ucr_ is the ultimate creditor and is usually blank. Double-check which prefix your workflow actually needs.
ReferenceType tells you the reference format
QRR means a 27-digit QR reference, SCOR means a Creditor Reference (ISO 11649), NON means no structured reference, only UnstructuredMessage. Branch your parsing logic on ReferenceType if you support more than one format.
Amount can be null for open-amount bills
Some Swiss QR-bills are issued without a fixed Amount, letting the payer enter it. Handle a null or missing Amount in your Code by Zapier step rather than assuming it is always present.
The action reads, it does not validate compliance
This action decodes whatever SPC data is embedded in the QR code. It does not certify Swiss banking regulatory compliance, that responsibility stays with however the bill was originally issued.

Cheat Sheet

FieldValue
ActionRead SwissQR Code
FileRequired, Swiss QR-bill PDF
File NameOptional
Output payloadDoc Text (JSON string)
Common parsed fieldsIBAN, cr_Name, ud_Name, Amount, Currency, Reference
Parse step neededCode by Zapier, JSON.parse(Doc Text)
Counterpart actionCreate SwissQR Bill (generates the QR-bill instead of reading it)

Common Questions

What does Read SwissQR Code actually return?+
The action returns Doc Text, a JSON string containing the decoded Swiss QR-bill fields: QRType, Version, CodingType, IBAN, creditor fields (cr_Name, cr_StreetOrAddressLine1, cr_PostalCode, cr_City, cr_Country), ultimate creditor fields (ucr_*), Amount, Currency, ultimate debtor fields (ud_Name, ud_StreetOrAddressLine1, ud_PostalCode, ud_City, ud_Country), ReferenceType, Reference, UnstructuredMessage, and BillingInfo. It also returns file metadata (File Name, File Extension, Full File Name, File Alternate Url, Document Id, File Size) for the generated JSON response file.
Do I need a separate step to parse the output?+
Yes. Doc Text is a single JSON string, not individually mapped fields. Add a Code by Zapier (Run JavaScript) step, run JSON.parse on the Doc Text value, and return the specific field you need such as data.ud_Name or data.IBAN so later steps in the Zap can map it directly.
What is the Swiss QR-bill and why does it need a special reader?+
The <a href="https://www.six-group.com/en/products-services/banking-services/payment-standardization/qr-bill.html" target="_blank" rel="noopener noreferrer">Swiss QR-bill (QR-Rechnung)</a> is the Swiss Payment Standards format that became the only valid Swiss payment slip on 30 September 2022. It encodes structured payment data (IBAN, creditor, debtor, amount, reference) inside a QR code using the SPC data format, a fixed field order that a generic barcode or QR scanner cannot parse into named fields without knowing that structure.
Can I use the extracted data to rename or route the PDF?+
Yes. A common pattern parses Doc Text for ud_Name (debtor) or cr_Name (creditor) and uses that value as the filename in an Upload File step, or checks Reference or Amount in a Filter or Paths step to route the invoice. Use the original File field from your trigger for the file content, this action's output only carries data, not the PDF. See <a href="https://www.iso20022.org/" target="_blank" rel="noopener noreferrer">ISO 20022</a> for background on the structured payment messaging standard the Swiss QR-bill builds on.

Industry Use Cases & Applications

  • Payment Processing: Read SwissQR Codes for automated payment processing and transaction handling
  • Transaction Management: Extract payment data for comprehensive transaction processing and reconciliation
  • Compliance Reporting: Feed decoded reference and amount data into internal audit trail records
  • Customer Service: Process customer payments and inquiries with automated SwissQR Code recognition

Get Help