PatronAccountPayAll

This method takes a payment amount, a note, and a payment method, and applies the payments to all patron charges, paying off the oldest charges first. It allows a partial pay all, but not an overpayment. If the amount is greater than the amount the patron currently owes in charges, a -3610 error is returned.

  PUT /protected/1/{AccessToken}/patron/{PatronBarcode}/account/
lumpsumpayment
 

Authorization required?

Yes

Protected method?

Yes

URI Parameters

Name

Required

Description/Notes

PatronBarcode

Yes

Barcode of patron

Query String Parameters

Name

Values

Required

Description/Notes

wsid

>0

Yes

ID of workstation calling this method

userid

>0

Yes

ID of user calling this method (not patron ID)

XML Body Elements

Important: XML elements must be in the order shown below.

Name

Required

Description/Notes

TxnAmount

Yes

Valid dollar amount and not greater than balance owed

PaymentMethodID

Yes

Valid values are:

11 - Cash
12 - Credit card
13 - Debit card
14 - Check
15 - Voucher
17 - Smart card

FreeTextNote

Yes

Note to attach to payment

XML elements returned

The following XML elements are returned.

Name

Description/Notes

PAPIErrorCode

PAPI Error code: Negative values represent errors and are defined elsewhere.

Note: On successful completion, the PAPI error code is populated with a positive integer representing the number of rows returned.

ErrorMessage Error or information message

Example

Copy
https://[hostname]/PAPIService/REST/protected/v1/1033/100/1/kSUEQM6CuhkFaloIaHPYdpHJ0U7Neczl/patron/21756003332022/account/lumpsumpayment

Body

Copy
<PatronAccountPayData>
    <TxnAmount >1.25</TxnAmount>
    <PaymentMethodID >11</PaymentMethodID>
    <FreeTextNote>Paid through Polaris API</FreeTextNote>
</PatronAccountPayData>

Return - Success

Copy
Return - Success
HTTP/1.1 200 OK
<PatronAccountPayResult
    xmlns:i="http://www.w3.org/2001/XMLSchemainstance">
    <PAPIErrorCode>0</PAPIErrorCode>
    <ErrorMessage/>
</PatronAccountPayResult>

Return - Failed

Copy
Return - Failed
HTTP/1.1 200 OK
<PatronAccountPayResult
    xmlns:i="http://www.w3.org/2001/XMLSchemainstance">
    <PAPIErrorCode>-1</PAPIErrorCode>
    <ErrorMessage>Invalid workstation ID.</ErrorMessage>
</PatronAccountPayResult>