About

This API was developed for personal use, but modified and later released for public use. It is an unofficial application with the sole purpose of simplifying QR code generation for universal payment ordes (https://upn-qr.si). The application does not keep any long-term logs.

Terms of usage

Because The Bank Association of Slovenia prohibits the printing and use of UPN-QR codes on bills by any unauthorized party, you must be authorized in order to use this application to generate a QR code and print it.

🔗 Form maker

Fill in the fields with reciever's bank information and leave empty the ones that user has to fill out.

🔗 API

🔗 GET /api/qrcode

Returns a image/png image if successful (OK 200), else returns the following JSON { ok: false, errors: String[] } where errors is an array of descriptive strings.
<!-- Meant to be used as direct image source, for example -->
<img src="https://upn-qr.gitapp.si/api/qrcode?client_name=Dobri človek&client_address=Kristanova ulica 1&client_city=1000 Ljubljana&amount=00000001000&payment_purpose=Donacija&iban=SI56021400015556761&reference=SI99&issuer_name=Slovenska Karitas&issuer_address=Kristanova ulica 1&issuer_city=1000 Ljubljana">
            

Query parameters:

Following the specification from official documentation - NavodilaZaProgramerjeUPNQR.pdf, section 4. Vsebina kode QR.

🔗 client_name
Regex: ^[a-zA-Z0-9ČŠŽĐ'](?:[A-Z0-9 ČŠŽĐ']{0,31}[A-Z0-9ČŠŽĐ'])?$/i
Demo: regex101.com/r/pNmOI0/1
Description: Name and surname of the client. Max length 33 characters including spaces and numbers.
Example: Peter Novak
🔗 client_address
Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
Demo: regex101.com/r/JA4wmM/1
Description: Full client address in long form. Max length 33 characters including spaces and numbers.
Example: Ravna ulica 13 a
🔗 client_city
Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
Demo: regex101.com/r/5QMpTn/1
Description: Client's city including postal code
Example: 1000 Ljubljana
🔗 amount
Regex: ^(?=.{11}$)[0]{1,11}[0-9]{0,11}$
Demo: regex101.com/r/Tyq5S1/1
Description: Total amount to pay. Must contain 11 numbers. Last two numbers are decimal places (cents).
Example (11,32€): 00000001132
🔗 purpose_code
Regex: ^[A-Z]{4}$
Demo: regex101.com/r/TsiZQJ/1
Default: OTHR
Description: Must contain 4 uppercase characters compliant with public purpose code library www.nlb.si/sepa-koda-namena-prebivalstvo
Example: OTHR
🔗 payment_purpose
Regex: ^[A-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ\-:;_'"]{0,40}[A-Z0-9ČŠŽĐ])?$
Demo: regex101.com/r/egl24t/1
Description: Can contain any character including ŠČŽĐ and space. Max length 33 characters including space.
Example: Moutain bike first half
🔗 iban
Regex: ^[A-Z]{2}\d{17}$
Demo: regex101.com/r/8bXDvh/1
Description: Must contain country code (exp. SI56). No spaces allowed. Max length 34 characters
Example: SI56047500000280672
🔗 reference
Regex: ^[A-Z]{2}[0-9\-]{1,24}$
Demo: regex101.com/r/2tSYMw/1
Description: Must contain reference model (exp. SI00) and reference (exp. 1234-2002). Max length 4+22 numbers and minus symbols. No spaces allowed. Reference model and structure must comply with standard reference model.
Example: SI121234567890120
🔗 issuer_name
Regex: ^[a-zA-Z0-9ČŠŽĐ'](?:[A-Z0-9 ČŠŽĐ']{0,31}[A-Z0-9ČŠŽĐ'])?$/i
Demo: regex101.com/r/JW7Ywq/1
Description: Name and surname of the issuer or company name. Max length 33 characters including spaces and numbers.
Example: Kolesarstvo Hrib
🔗 issuer_address
Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
Demo: regex101.com/r/5oKk0T/1
Description: Full issuer address in long form. Max length 33 characters including spaces and numbers.
Example: Za deveto smreko 15 k
🔗 issuer_city
Regex: ^[a-zA-Z0-9ČŠŽĐ](?:[A-Z0-9 ČŠŽĐ]{0,31}[A-Z0-9ČŠŽĐ])?$/i
Demo: regex101.com/r/JfuNU1/1
Description: Issuer city including postal code
Example: 1000 Ljubljana
-- - -- Development and hosting: Aljaž Starc Initial insight: Tjaž Valentinčič - gitplac.si/aljaxus/upn-qr -