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 Public Payments Administration prohibits the generation and use of UPN-QR codes by any unapthorized party, you must be authorized in order to use this application and publish the content that it generates.

🔗 Form maker

Fill in the fields with static information and leave empty the ones that the user has to fill out.


🔗 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=Šolski center Nova Gorica&client_address=Cankarjeva ulica 8a&client_city=5000 Nova Gorica&amount=00000001000&payment_purpose=placilo&iban=SI56020170014356205&reference=SI121234567890120&issuer_name=Hitre Spletne Strani Na 123&issuer_address=Namisljena ulica 1a&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: A 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 (1234-2002). Max length 4+22 numbers and minus symbols. No spaces allowed.
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: Spletne strani na 123
🔗 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 -