Fees
Let patrons see what they owe the library and pay it from the client.
2.7.1 View fees
SupportedShow what the patron owes the library, and why.
What you can build
An overview of outstanding fees with amount, due date and the material each one concerns. Each fee tells whether it can be paid through the API.
Typical flow
- The client fetches the fees with
Get.Patron Fees - Each fee is shown with its type, amount and, when known, the items it covers.
- Fees that are
payablecan be paid (2.7.2).
What the API provides
typeisfee(typically a late return),compensation(typically a damaged or lost item) orsend_.to_ debt_ collector amountandremainingare in minor units,Amount currencyin ISO 4217. Whenremainingdiffers fromAmount amount, part of the fee has been paid.payableisState payableornot_: whether the fee can be paid and finalized through the API.payable
Calls in the API
2.7.2 Pay fees
SupportedLet the patron pay fees from the client.
What you can build
Patrons pay outstanding fees with the payment methods the library offers, and the library system registers each fee as paid.
Typical flow
- The patron chooses the fees to pay and a payment method.
- The client starts the payment with
Initializeand receives an order ID.Payment - The patron pays through the payment gateway, which returns a payment ID.
- The client registers the payment with
Finalize, withPayment paymentandId order.Id - The response gives a
statusfor each fee.
What the API provides
paymentinGetlists the paymentConfiguration methods(mobile_,pay vipps) and whetherpartialpayments are allowed. Without methods, no payment is available.- When
initialize.isstate use_(the default),initialize Initializeshould come first (otherwisePayment Finalizefails withPayment 300005), andorderis required. WithId do_, the client should skip it.not_ use_ initialize - A fee may only appear once in
Finalize.Payment amounton a fee is only allowed when partial payment is enabled. registeredmeans the fee was paid with this payment, andregistered_that another payment had already paid it.by_ different_ payment_ id fee_andnot_ payable not_mean it was not paid.allowed - Calling
Finalizeagain with the samePayment paymentreturns the same confirmation ID for at least 48 hours. If anything in the request has changed, the call fails.Id
Calls in the API
- Requires
- 2.2.1 Log in
- Enabled in the configuration
-
GetConfiguration
In this order