Refund Patron

Refund From Payment

POST /api/.../patrons/{id}/accounttransactions/credit?action=refundfrmpay

Refund to patron from patron's payments.

Permissions

Checked only if when refund to a credit card payment.
    CR_FinesRefund_Allow

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron code. Used to return a single object.
action String Yes. Value should be 'refundfrmpay' action identifier
DtoCreditData
Property Type Nullable Description
TxnAmount Decimal No Required. (Value must be less than outstanding balance for single txnId, Value has to be equal to outstanding balance for multiple txnIds)
FreeTextNote String Yes Notes
MainTxnIds List of integer No Txn Ids of payments that are refunded.
Request body
Example
application/json, text/json
{ 
    "TxnAmount" :8.50, 
    "FreeTextNote" : "Refund from patron payments.",
    "MainTxnIds":
    [
        45678,
        12345
    ]
}
      

Response Information

Example - Refund from a none credit card payment
application/json, text/json
{
    "CreditCardProcessRequired": false,
    "CreditData": {
        "PatronID": 359590,
        "TxnAmount": 1.5,
        "FreeTextNote": "Fiddler refund from CC Payment",
        "PatronPaymentMethod": 0,
        "MainTxnIDs": 
        [
            3706573,
            3706575
        ]
    }
}
MainTxnIds is an array on integer, in this call it returns the Txn Ids of successfully added credit.
Example - Refund from a credit card payment
application/json, text/json
{
    "CreditCardProcessRequired": true,
    "CreditData": {
        "PatronID": 359590,
        "TxnAmount": 1.5,
        "FreeTextNote": "Fiddler refund from CC Payment",
        "PatronPaymentMethod": 0,
        "MainTxnIDs": [
            3706573,
            3706575
        ],
        "CreditCardPaymentData": {
            "TrackId": 4168,
            "ILSStoreTransactionId": 0,
            "Guid": null,
            "VendorId": 5,
            "BaseAddress": null,
            "CustomerID": null,
            "TerminalID": null,
            "UserName": null,
            "Password": null,
            "Amount": 1.5,
            "ProcessingFee": null,
            "PatronID": 359590,
            "Language": null,
            "Result": 0,
            "TrackNumber": null,
            "Error": null,
            "TxnStatus": null,
            "TroutId": null,
            "CCDigits": null,
            "CCType": null,
            "AuthCode": null,
            "Request": null,
            "Response": null,
            "PaymentsServiceUrl": null,
            "LastUnfinishedTrackId": 0,
            "LastUnfinishedGuid": null
        }
    }
}
MainTxnIds is an array on integer, in this call it returns the Txn Ids of successfully added credit.

HTTP Response Codes

Code Description
200 OK. Success
403 Forbidden (privileges).
404 Not Found. Patron not found
409 CONFLICT. Patron record is secured.