Terminal-2 icon

Cancel or refund a transaction

Cancel or refund with a PSP reference

Method

Call cancelOrRefundTransactionWithPSPReference to cancel or refund a transaction where the transaction was processed online successfully and generated a PSP reference. The response from the server indicates if the cancel or refund was received, not if it was performed.

If the request is successful, if the pspReference of the original transaction is valid, and if the transaction was not already cancelled or refunded, the cancel or refund will always be performed. When the transactions are retrieved and their refunds are examined, each refund will have a processingState to indicate whether a cancelOrRefund request was sent. 

Parameters

Name Type Required Description
pspReference merchantReference -white_check_mark- PSP reference of the original transaction.
merchantReference NSString -white_check_mark- Reference for the merchant, used in reporting.
refundState ADYProcessingState -white_check_mark- Indicates whether a cancelOrRefund request was sent. 
error NSError -white_check_mark- Information about any errors that occurred.

Canc