Cancel or refund a transaction directly from a POS to the Adyen Payments Platform

Class

Name Description
MerchantPos Extends AdyenPos. Class used to implement all payment platform functionality. Implements all functions that do not involve the PED.

Method

Name Description
cancelOrRefundAtPsp
Start a cancel or refund. If a pspReference has been generated, pass this as a reference for the transaction. Otherwise, provide the tenderReference.

This method returns an immediate response of type LibraryResult. Check if this result is "OK", before continuing the operation. If the LibraryResult value is not "OK", the system will not return the related callback with the asynchronous result. See here for more on extracting data from an event or callback.

Tender Parameter

Name

Type Required

Description

tender Tender (tick) Represents the tender.


Attributes

Name Type Required Definition

merchantAccount

String

(tick)

The merchantAccount account to receive the money.

merchantReference

String

(tick)

The transaction reference provided by the Merchant (reported in the Adyen payments platform).

pspReference

String

(error)

The reference provided by the Adyen PSP (reported in the Adyen payments platform). Use the PSP reference to identify the transaction to be cancelled.

tenderReference

String

(error)

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.

terminalId

String

(error)

The PED to process the transaction on.

Callback

Name

Description

 cancelOrRefundAtPspCallback

Returns the result of creating the tender

Callback Response Attributes

Name

Description

additionalData

Adyen returns the additionalData object, a generic container that can hold extra response fields

tenderReference

Reference the PED provides for the transaction, used in reporting on the Adyen payments platform.

tenderState

Transaction state

adyenResult

Transaction result details

Determine the current and final tender state

Adyen provides a method to determine the current, or final, tender state. For more information, see Determine the current and final tender state - JNI.