No momento, esta página não está disponível em português
Point-of-sale icon

Refund a transaction from the PED

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

-white_check_mark-

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

tenderReferenceString-white_check_mark-A reference to the tender provided by the PED.
handleReceiptBoolean-x-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

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

Callback

NameDescription
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

ReceiptsPasses 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

libResultint

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.
errorMessageStringReference for the transaction, used as the PSP reference is not available.