Adding a Tip
You can add a tip either through our SDK on ePOS or directly on the terminal. See the documentation below for more details.
Adding a Tip on ePOS
As mentioned in Make Payment section, you can add a tip to makePayment.
Kotlin
val paymentSubscription = teyaIntegration.makePayment(
transactionId = UUID.randomUUID().toString(),
amount = amountToPay,
currency = "GBP",
tip = 30 // An optional tip amount, in the smallest unit of the currency.
)The tip parameter allows you to specify an optional tip amount, in the smallest unit of the currency (e.g., pence for GBP, cents for EUR/USD). When you provide a tip, it is treated as included within the total amount you pass.
For example, if you set:
amount = 100
tip = 20
In other words, the tip is not added on top of the amount — it is included within it. For example, if the total is £1.00, £0.20 will go toward the tip and £0.80 will be the purchased goods amount.
Adding a tip on Terminal
If you don't provide a tip amount in the makePayment function and tipping is enabled on the terminal, the tip can be selected directly on the terminal.
If you want to enable tipping on the terminal, you also need to pass true for tipping in the setup function:
Kotlin
val teyaIntegration = teyaAllInOneSDK.setupTransactionsApi(
skipApprovedScreen = false,
allowPaymentAppTips = true, // Enable tipping on the payment app
showReceiptOptionsOnPaymentApp = false
)When a tip is selected this way, the amount and tip properties in the PaymentStateDetails object will be updated accordingly. These updates occur once the payment status changes to Successful, allowing you to see the final tip amount selected on the terminal.
public data class PaymentStateDetails(
val eposTransactionId: String,
val amount: Int, // Total amount including tip; updated after a Successful payment with a terminal-side tip
val tip: Int?, // Tip amount; updated after a Successful payment with a terminal-side tip
// ...
)