makeUnreferencedRefund

abstract fun makeUnreferencedRefund(transactionId: String, amount: Int, currency: String): PaymentStateSubscription

Initiates an unreferenced refund: a card-present credit to the card presented at the terminal, not tied to any original sale. The customer taps their card to receive the money back.

IMPORTANT: Because there is no original transaction to validate against, these refunds are subject to additional fraud screening, so they may be declined. Prefer to use refundPayment instead.

Unlike refundPayment, which refunds a specific previous payment by its com.teya.unifiedepossdk.models.GatewayPaymentId, this starts a brand new card-present transaction and reuses the same state machine as makePayment, so it returns a PaymentStateSubscription.

PosLink specifics:

  • Not available for tab payments.

Return

A subscription PaymentStateSubscription to the refund state.

Parameters

transactionId

ePOS unique identifier for this refund, unique within the linked store.

amount

The amount to refund, in the smallest unit of the currency (e.g., cents).

currency

The ISO 4217 currency code (e.g., "GBP", "EUR").