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 |
---|---|
| 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 |
---|---|---|---|
| String | The merchant account that is canceling the transaction and refunding the money (if applicable). | |
tenderReference | String | A reference to the tender provided by the PED. | |
handleReceipt | Boolean | 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. | |
| 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 |
---|---|---|
| PED object that represents the terminal. | |
| Receipts | Passes receipts to the cash register. Its structure is formatted for printing. |
| 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 |
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 |
| 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. |