Start Credit Card Refund Transaction

Start a credit card refund transaction

POST /api/.../creditcardpayments?task=9/

This method allows the caller to initiate a credit card transaction to refund a payment on the credit card reader device.

Permissions

    CR_FinesRefund_Allow

Request Information

Parameters
Name Type Required Description
fineData DtoFineData Yes Define this parameter in the request body.
task Int Yes. Value should be '9'. Task identifier. Define this parameter in the request query string.
DtoCreditData
Property Type Required Description
PatronId Int Yes ID of the the payment txn attached to.
TxnAmount Decimal Yes Required. Value must be less than outstanding balance for single txnId, Value has to be equal to outstanding balance for multiple txnIds.
FreeTextNote String No Notes
MainTxnIds List of integer Yes Txn Ids of payment transactions to be refunded.
Credit card refund data CreditCardPaymentData Yes Credit card refund transaction data. Should be the CredotCardPaymentData responded by POST /api/.../patrons/{id}/accounttransactions/credit?action=refundfrmpay.
Property Type Required Description
TrackId Int Yes ILS store order ID attached to the payment txn ILS store transaction.
PatronId Int Yes Should be the same as the DtoCreditData.PatronId
Amount Decimal Yes Should match the DtoCreditData.TxnAmount
Request body
Example
application/json, text/json
{ 
    "PatronID": 359317,
    "TxnAmount": 0.03,
    "FreeTextNote": "Fiddler refund from CC Payment",
    "MainTxnIDs": 
    [
        3707296
    ],
    "CreditCardPaymentData": {
        "TrackId": 4239,
        "ILSStoreTransactionId": 0,
        "Guid": null,
        "VendorId": 5,
        "BaseAddress": null,
        "CustomerID": null,
        "TerminalID": null,
        "UserName": null,
        "Password": null,
        "Amount": 0.03,
        "ProcessingFee": null,
        "PatronID": 359317,
        "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
    }
}

Response Information

Example
application/json, text/json
{
    "TrackId": 4168,
    "ILSStoreTransactionId": 0,
    "Guid": "637a0e02-40ee-4538-85a1-07fd59da",
    "VendorId": 0,
    "BaseAddress": null,
    "CustomerID": null,
    "TerminalID": null,
    "UserName": null,
    "Password": null,
    "Amount": null,
    "ProcessingFee": null,
    "PatronID": null,
    "Language": null,
    "Result": 0,
    "TrackNumber": "0008200000200408",
    "Error": "OK",
    "TxnStatus": null,
    "TroutId": null,
    "CCDigits": null,
    "CCType": null,
    "AuthCode": null,
    "Request": "",
    "Response": "",
    "PaymentsServiceUrl": "https://{paymentserviceurl}",
    "LastUnfinishedTrackId": 0,
    "LastUnfinishedGuid": null
}

HTTP Response Codes

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