Search

Are you looking for test card numbers?

Would you like to contact support?

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

Name Description
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

Name Description

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

Name Description

CancelOrRefundRequest

Refund request request object passed with the CancelOrRefund method.

Parameters

Name Type Required Description
merchantAccount String -white_check_mark- The merchantAccount that is cancelling 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.

pedResult string

Result code generated by the PED.

 

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


pspResult long

Result code generated by the PSP.

errorMessage String Information that clarifies the error code.