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

Refund a completed transaction

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

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.

Class

NameDescription
MerchantPed

Extends AdyenPed. Class used to implement all PIN entry device (PED) functionality. Implement the MerchantPed object yourself, and use the AdyenPed constructor without storeId parameter.

 

Method

NameDescription

CancelOrRefund

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.)

Create Request Object

NameDescription

CancelOrRefundRequest

Refund request request object passed with the CancelOrRefund method.

Parameters

Name Type Required Description
merchantAccount String -white_check_mark- The merchantAccount that is canceling the transaction and refunding the money (if applicable).
tenderReference String -x- Tender reference provided by the library if there is no connection to the PSP. Use the Tender reference to identify the transaction to be cancelled.
handleReceipt Boolean -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.
additionalData 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

Name

Description

cancelOrRefundCallback

Returns the result of the request.

Parameters

Name

Type

Description

CancelOrRefundResult

result

Object that contains the result of the cancel or refund request (whether it was completed).

Getters

Name Type Description
getTenderReference String Returns tender reference for the transaction. 
getAdyenResult AdyenResult Retrieves the transaction result details 
getReceiptSet Receipts.ReceiptSet Returns a list of receipt information.

Result Parameters

Name

Type

Description

libraryResult

String

Result code generated by the LIBRARY.

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

pedResultstring

Result code generated by the PED.

 

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


pspResultlong

Result code generated by the PSP.

errorMessageStringInformation that clarifies the error code.