TeyaCommonTransactionsApi

@ObjCName(name = "TeyaCommonTransactionsApi", exact = true)
interface TeyaCommonTransactionsApi

TeyaCommonTransactionsApi is the main interface for transaction related calls to the Teya payment app. It provides a unified API for transaction related functions in the Teya payment app, regardless of the type used underneath.

Properties

Link copied to clipboard
abstract val type: IntegrationType

IntegrationType of the integration.

Functions

Link copied to clipboard
abstract fun makePayment(transactionId: String, amount: Int, currency: String, tip: Int?, purchaseData: PurchaseData? = null): PaymentStateSubscription

Initiates a communication with the Payment app to make a payment. See PaymentStateSubscription for ways to show a default Teya UI (on the relevant integration types), listen for state changes and cancel the payment.

Link copied to clipboard
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.

Link copied to clipboard
abstract fun refundPayment(paymentId: GatewayPaymentId, amount: Int, currency: String, allocatedLineItems: List<AllocatedLineItem>? = null): RefundResultSubscription

Refunds the payment for a given com.teya.unifiedepossdk.models.GatewayPaymentId previously returned via PaymentStateDetails.gatewayPaymentId.