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 refundPayment(paymentId: GatewayPaymentId, amount: Int, currency: String, allocatedLineItems: List<AllocatedLineItem>? = null): RefundResultSubscription