VuFind supports online payment of library fines directly through the patron’s browser. When a patron views their account, they can select individual fines, proceed to a payment gateway, and have the payment registered back to the ILS — all without staff involvement. VuFind ships two production-ready payment handlers: Stripe and Paytrail. ADocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vufind-org/vufind/llms.txt
Use this file to discover all available pages before exploring further.
Test handler is also included for development use.
Payment flow
Patron views fines
The patron logs in and navigates to their account fines page. VuFind calls the ILS driver to retrieve outstanding fines.
Patron selects items to pay
If
selectFines = true in the driver’s [OnlinePayment] section, the patron can choose which fines to include. Otherwise all payable fines are included.VuFind starts a payment session
VuFind calls
startPayment() on the configured handler. The handler creates a checkout session with the payment provider and redirects the patron to the provider’s hosted payment page.Patron completes payment on the provider's page
The patron enters card details on Stripe’s or Paytrail’s hosted page. VuFind is not involved in card data handling.
Provider calls the notify URL
On success, the payment provider calls VuFind’s notify endpoint server-to-server. VuFind validates the response via
processPaymentResponse(), marks the payment record as paid, and registers it with the ILS.ILS requirements
For online payment to function, your ILS driver must:- Return fine data from
getMyFines()including an amount and a fine type for each item. - Implement
markFeesAsPaid()to register a completed payment back to the ILS. - Optionally implement
getPayableOnlineStatus()to indicate whether a fine type can be paid online.
KohaRest and SierraRest. Check the driver’s .ini file in config/vufind/ for an [OnlinePayment] section — if one is present, the driver supports it.
Configuring the [OnlinePayment] section
Payment is configured in your ILS driver’s local .ini file (for example, local/config/vufind/KohaRest.ini). All settings below live in that file’s [OnlinePayment] section.
General settings
Configuring Stripe
The Stripe handler uses Stripe Checkout (a hosted payment page). Card data never touches your server. Stripe’s webhook signature verification is handled automatically by the handler.
Configuring Paytrail
Fine type filtering
Not all fine types should be payable online. Use these settings (in the[OnlinePayment] section) to control which fines appear:
Product code mappings
Payment providers often require a product code for each line item. Configure mappings from VuFind fine types to provider-specific codes:Receipt configuration
VuFind can generate a receipt page after successful payment:Transaction logging and reconciliation
VuFind logs every payment event to theaudit_event database table. Logging is controlled by config.ini:
errorEmail notification so staff can reconcile manually.
