Libraries are also changing to provide more flexible and user-friendly payment options as digital transactions become more commonplace. The acceptance of UPI-based fine payments through QR codes is one example of this practical change. Our library has put in place a quick and easy method for collecting fine payments via UPI. These payments are then manually entered into the Koha, along with the UTR (Unique Transaction Reference) number for tracking and verification.
Why use UPI?
In India, UPI (Unified Payments Interface) is a commonly used real-time payment method. Many users choose it because of its accessibility and ease of use via mobile apps like BHIM, PhonePe, and Google Pay. Nevertheless, Koha lacks integrated support for UPI-based
Step 1: Add "UPI" as a Payment Type in Koha
Navigate to: Administration > Authorized values > PAYMENT_TYPE
Create a new authorized value with the following details:
- Category: PAYMENT_TYPE
- Authorized value: UPI
- Description: UPI Payment
This ensures “UPI” appears as an option in the payment type dropdown during manual fine entry.
Step 2: Accept Payments Using Static Bank QR Code
- Display a static UPI QR code linked to your library’s bank account at the circulation desk.
- Patrons scan and pay via any UPI app (like Google Pay, PhonePe, or BHIM).
- Patrons provide the UTR number (proof of transaction) to the librarian.
Step 3: Record the Payment in Koha
Open the patron’s account in Koha.
- Go to the Fines tab and select Make a Payment.
- Choose the Payment Type as UPI.
- Enter the amount paid and paste the UTR number in the Notes field.
- Submit the payment entry.
Tracking UPI Payments Using SQL Reports
To generate reports for UPI-based payments with UTR details, we use the following two custom SQL queries:
SELECT
b.cardnumber AS 'Card Number',
CONCAT(COALESCE(b.firstname, ''), ' ', COALESCE(b.surname, '')) AS 'Patron Name',
FORMAT(ABS(a.amount), 2) AS 'Amount',
a.date AS 'Payment Date',
av.lib AS 'Payment Type',
a.note AS 'UTR Number'
FROM
borrowers b
JOIN
accountlines a ON b.borrowernumber = a.borrowernumber
LEFT JOIN
authorised_values av ON a.payment_type = av.authorised_value
AND av.category = 'PAYMENT_TYPE'
WHERE
a.credit_type_code = 'payment'
AND DATE(a.date) = CURDATE()
AND b.branchcode = <<Enter patrons library|branches>>
ORDER BY
a.date DESC;
Payments Within a Date Range
SELECT
b.cardnumber AS 'Card Number',
CONCAT(COALESCE(b.firstname, ''), ' ', COALESCE(b.surname, '')) AS 'Patron Name',
FORMAT(ABS(a.amount), 2) AS 'Amount',
a.date AS 'Payment Date',
av.lib AS 'Payment Type',
a.note AS 'UTR Number'
FROM
borrowers b
JOIN
accountlines a ON b.borrowernumber = a.borrowernumber
LEFT JOIN
authorised_values av ON a.payment_type = av.authorised_value
AND av.category = 'PAYMENT_TYPE'
WHERE
a.credit_type_code = 'payment'
AND DATE(a.date) BETWEEN <<From Date|date>> AND <<To Date|date>>
AND b.branchcode = <<Enter patrons library|branches>>
ORDER BY
a.date DESC;
Library staff can use these reports to audit and validate payments, filter them by branch or time period, and validate the UTR numbers that were entered.
Although Koha does not yet have native support for QR or UPI integration, libraries can adopt digital payment systems with this methodical, manual approach without sacrificing efficiency or accountability.
Watch On Youtube