Cancel or Refund a completed transaction from the terminal transaction list

Cancel or refund a transaction from the terminal transaction list, and receive a receipt on the POS or on the PED.

You can only use this cancel or refund method for transactions that:

  • have been completed on the PED that is receiving the cancel or refund request.
  • are still within the PED storage – this is currently limited to 100 tenders.

PedDevice Object

Name

Description

PedDevice

PED object that represents the terminal.

Method

Name

Description

CancelOrRefund

Cancel or refund a completed transaction from the terminal transaction list. The transaction must have been completed on the PED that is receiving the cancel or refund request, and must be still within the PED storage (this is currently limited to 100 tenders.)

Parameters

Name

Type

Required

Description

merchantAccount

String

(tick)

The merchant account that is cancelling the transaction and refunding the money (if applicable).

tenderReference String (tick) A reference to the tender provided by the PED.
handleReceipt Boolean (error) Specifies that the POS handles and prints receipts. If omitted, it is required that the PED prints the receipt. If there is no printer unit, the transaction will fail.

additionalDataObject

AdditionalData

(error) Contains key/value pairs that can be used by the merchant to return specific additional data, in particular in the final transaction result.

Callback

Name Description
CancelOrRefundOnPedCB

The Cancel or Refund Callback returns the result of a cancellation or refund, as well as any errors.

Parameters

Name

Type

Description

pedObj

PedDevice

PED object that represents the terminal.

receipts

Receipts Passes receipts to the cash register. Its structure is formatted for printing.

pedResult

int

Result denoting whether an error occurred on the PED. A value of 0 means no error occurred.

As this request is not processed on the PSP, check pedResult for errors instead of the pspResult. 

libResult int

Result denoting whether an error occurred in the Library. A value of 0 means no error occurred.

As this request is not processed on the PSP, check libResult for errors instead of the pspResult.

pspResult

int

Result denoting whether an error occurred on the PSP. A value of 0 means no error occurred.
errorMessage String Reference for the transaction, used as the PSP reference is not available.