Update Credit Card Transaction

Update a succeeded/finished transaction: paid for existing charges

PUT /api/.../patrons/{id}/accounttransactions/finesfees?action=pay&reload={true}&overpayment={true}

This method allows the caller to update patron account and ILSStore data when a credit card transaction completed successfully on the credit card reader device.

Request Information

Parameters
Name Type Required Description
fineData DtoFineData Yes Define this parameter in the request body.
id Integer Yes The unique id assigned to the patron.
action String Yes Define this parameter in the request query string. Value is 'pay'
reload Bool Yes Define this parameter in the request query string. If set true, updated fines and fees list is returned
overpayment Bool Yes Define this parameter in the request query string. Value is 'false'.
circ Bool Yes Define this parameter in the request query string. Value is 'false'.
DtoFineData
Property Type Nullable Description
PatronID Int Yes Patron ID.
TxnAmount Decimal No Required. Amount that was trying to be paid.
MainTxnIDs Int No Required. List of transaction IDs. Unique identifier for each transaction
PatronPaymentMethod Int No Payment method. Value is 12 for paying by credit card.
FreeTextNote String No Notes
CreditCardPaymentData DtoCCPaymentData Yes Data packet responsed from Innovative.Payments.Service
DtoCCPaymentData
Property Type Nullable Description
TrackId Int No ILSStoreOrder ID
Guid String No Guid generated internally to when credit card transaction is initiated
TxnAmount Decimal No Required. Amount that was trying to be paid.
Error String No Error message. "OK" if transaction succeeded.
TxnStatus String No Latest credit card transaction status. Possible values are InProgress, Success, Failed or Finished.
TroutId String Yes Trout Id
CcDigits String Yes Could be the last 4-digit of the credit card number.
ccType String Yes Could be the credit card type.
AuthCode String Yes Could be credit card transaction auth code.
Response String No Response returned by Payments.Service API
Request body
Example
application/json, text/json
{ 
    "PatronID": 1234,
    "TxnAmount" : 12.15, 
    "FreeTextNote" : "Paying by credit card from LEAP",
    "PatronPaymentMethod": 12,
    "MainTxnIDs": [
        123,
        124
    ],
    "CreditCardPaymentData": {
        "trackId": 1234,
        "guid": "xxxx-xxx-xxx-xxx-xxx",
        "vendorId": 0,
        "baseAddress": null,
        "customerID": null,
        "terminalID": null,
        "userName": null,
        "password": null,
        "amount": null,
        "patronID": null,
        "language": null,
        "result": 0,
        "trackNumber": null,
        "error": "Ok",
        "txnStatus": "Finished",
        "troutId": "TROUTD",
        "ccDigits": "XXXX",
        "ccType": "????",
        "authCode": null,
        "request": "",
        "response": "<Response><Status>Success</Status><TroutID>TROUTD</TroutID><Error>OK</Error><CCDigits>XXXX</CCDigits><CCType>????</CCType></Response>"
    }
}      

Response Information

Returns Txn Ids. If reload is set, fines fees are also returned
Example
application/json, text/json
{
    "FinesAndFees": [
        {
            "ItemRecordID":0,
            "TxnID":3665717,
            "TxnCodeID":1,
            "CallNumber":null,
            "MaterialType":null,
            "TxnDate":"2013-05-29T17:11:59.33",
            "Type":"Charge",
            "FeeDescription":"Damage",
            "BrowseTitle":"",
            "Barcode":null,
            "TxnAmount":6.0000,
            "OutstandingAmount":6.0000,
            "Organization":"Schenectady County Public Library - Central",
            "TxnOrgID":null,
            "FreeTextNote":"damage fine from NextGen",
            "WaiverRequestID": null,
            "HasPendingWaiverRequest": false
        },
        {
            "ItemRecordID":0,
            "TxnID":3665712,
            "TxnCodeID":1,
            "CallNumber":null,
            "MaterialType":null,
            "TxnDate":"2013-05-29T16:29:29.633",
            "Type":"Charge",
            "FeeDescription":"Damage",
            "BrowseTitle":"",
            "Barcode":null,
            "TxnAmount":6.0000,
            "OutstandingAmount":6.0000,
            "Organization":"Schenectady County Public Library - Central",
            "TxnOrgID":null,
            "FreeTextNote":"damage fine from NextGen",
            "WaiverRequestID": null,
            "HasPendingWaiverRequest": false
        },
        {
            "ItemRecordID":0,
            "TxnID":3665709,
            "TxnCodeID":1,
            "CallNumber":null,
            "MaterialType":null,
            "TxnDate":"2013-05-29T16:20:19.28",
            "Type":"Charge",
            "FeeDescription":"Misc Charge",
            "BrowseTitle":"",
            "Barcode":null,
            "TxnAmount":4.0000,
            "OutstandingAmount":4.0000,
            "Organization":"Schenectady County Public Library - Central",
            "TxnOrgID":null,
            "FreeTextNote":"charge"},
            "WaiverRequestID": null,
            "HasPendingWaiverRequest": false
        }
    ],
    TxnIds: [
        1,
        2
    ]
 }

Update a succeeded/finished transaction: paid for new charges.

e.g. Check-out changes during checkout or renew.

PUT /api/.../workflow/5d356b6e-d626-4b8c-aa3b-f08fc4caaa22

Continuew with current workflow once credit card payment transaction is completed on the payment device.

Request Information

see Workflow
Example: DtoWorkflowAnswer - Checkout charge and overdue entry
application/json, text/json
{
    "WorkflowRequestGuid":"13b828d6-0f23-4db2-b063-1af0b6043e9a",
    "WorkflowRequestType":2,
    "WorkflowStatus":-3,
    "WorkflowPromptID": 92,
    "WorkflowPromptResult": 5,
    "ReplyValue": null,
    "ReplyExtension":{
        "WorkflowReplyExtensionType":3,
        "Data":{
            "ProcChargeTxnCodeID":2,
            "ProcTransAmount":1,
            "OVDChargeTxnCodeID":2,
            "OVDTransAmount":0.7,
            "PayMethod":12,
            "CreditCardPaymentData": {
                "trackId": 1234,
                "guid": "xxxx-xxx-xxx-xxx-xxx",
                "vendorId": 0,
                "baseAddress": null,
                "customerID": null,
                "terminalID": null,
                "userName": null,
                "password": null,
                "amount": 1.0,
                "patronID": null,
                "language": null,
                "result": 0,
                "trackNumber": null,
                "error": "Ok",
                "txnStatus": "Finished",
                "troutId": "TROUTD",
                "ccDigits": "XXXX",
                "ccType": "????",
                "authCode": null,
                "request": "",
                "response": "<Response><Status>Success</Status><TroutID>TROUTD</TroutID><Error>OK</Error><CCDigits>XXXX</CCDigits><CCType>????</CCType></Response>"
            }
        }
    }
}

Reference for Polaris enum values:

enum PatronAccountTxnCode
{	
    Charge = 1,
    Payment = 2,
    Return = 3,
    Deposit = 4,
    Waive = 5,
    WaiveExistingCharge = 6,
    Forfeit = 7,
    Credit = 8,
    PayRefund = 9,
    AutoWaive = 10
}
enum PatronPaymentMethod
{
    PayFrmCredit = 1,
    PayFrmDeposit = 2,
    DepositFrmCredit = 3,
    CreditFrmDeposit = 4,
    CreditFrmPAY = 5,
    StoredValue = 6,
    Cash = 11,
    CreditCard = 12,
    DebitCard = 13,
    Check = 14,
    Voucher = 15,
    CollectionAgency = 16,
    SmartCard = 17
}
            

HTTP Response Codes

Code Description
200 OK. Success
400 Null object. Bad request
409 CONFLICT. Patron record is secured.