Solutions QR-code API manual

6. QR code encoding specification

6. QR code encoding specification

6.0 QR code encoding specification

This section describes how to create Swish QR-code with the set design and with the correct content in order to be possible to be scanned and used in the Swish-app.

The code can include

  1. The receiving Swish-number (required)
  2. The amount of the payment (optional)
  3. The payment information such as reference number or order ID. (optional)

It is possible to define if number 2 and/or 3 will be editable by the payer or not.

6.1 Swish C2B



  • C (capital letter) is the required prefix
  • Payee is the corporate Swish Number.
  • Amount is in SEK, with 2 decimals. Decimal separator is a comma.
  • Message is URL encoded. It can be a reference number, Order ID or on a invoice, the OCR number.
  • Lock mask controls what parameters the consumer is allowed to edit in the payment view before making the payment:
    • Decimal value of bitmask where payee has bit position 0, amount 1 and message 2.
    • True means editable, false means parameter is fixed.
    • If amount and message shall be editable we will get the mask 110 in binary form, and then mask parameter has the value 4 + 2 + 0 = 6
    • Will in most cases be 0
      • Parameters are omitted by using empty string.
      • Omitted lock mask is interpreted as value 0 I.e. if a company (1237856901) send an invoice for 100SEK with OCR number 12229445, then the content of the QR code is one of:

C1237856901;100,00;12229445;0 || C1237856901;100,00;12229445