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

Refund a transaction from the POS

POS Object

Name Description
POS POS object representing the cash register application.

With a PSP Reference

Method

NameDescription
CancelOrRefundPspReferenceInitiates the cancel or refund process. Use the PSP reference to identify the transaction to be cancelled.

Parameters

Name

Type

Required

Description

merchantAccount

String

-white_check_mark-

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

pspreferenceString-white_check_mark-

PSP reference of the original transaction.

referenceString-white_check_mark-Reference for the merchant, used in reporting.

Callback

NameDescription

CancelOrRefundCB

Refund Callback returns the result of a partial refund, as well as any errors.

The response contains a cancelOrRefundObj. This object contains a getResponse method which should return a result of "refund-received". The response also includes the following parameters:

Name

Type

Description

pedResult

int

Result denoting whether an error occurred on the PED. A value of 0 means no error occurred.

pspResult

int

Result denoting whether an error occurred on the PSP. A value of 0 means no error occurred.
libResultintResult denoting whether an error occurred in the Library. A value of 0 means no error occurred.
errorMessageStringReference for the transaction, used as the PSP reference is not available.

With a Tender Reference

Method

Name

Description

CancelOrRefundTenderReference

Initiates the cancel or refund process where the PSP reference is unknown. Use the tender reference instead of the PSP reference.

Occurs when the original sale transaction was performed offline, where the PspReference was not generated because it requires online access. In this case, provide the TerminalId and TenderReference. The property PspReference is not required.

Parameters

Name

Type

Required

Description

merchantAccount

String

-white_check_mark-

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

uniqueTerminalIdLong-white_check_mark-

Unique terminal ID to reference the PED that is processing the request.

tenderReferenceString-white_check_mark-Reference for the transaction, used as the PSP reference is not available.
referenceString-white_check_mark-Reference for the merchant, used in reporting.

Callback

NameDescription

CancelOrRefundCB

The Cancel or Refund Callback returns the result of a cancellation or refund, as well as any errors.

The response contains a cancelOrRefundObj. This object contains a getResponse method which should return a result of "refund-received". The response also includes the following parameters:

Name

Type

Description

pedResult

int

Result denoting whether an error occurred on the PED. A value of 0 means no error occurred.

pspResult

int

Result denoting whether an error occurred on the PSP. A value of 0 means no error occurred.
libResultintResult denoting whether an error occurred in the Library. A value of 0 means no error occurred.
errorMessageStringReference for the transaction, used as the PSP reference is not available.