Skip to main content

Android Intents

The Android Intent API lets third-party Android apps running on yetipay devices initiate a payment on the device and receive the result. Your app hands off to the Yeti payment app via an Intent; the customer completes the payment on the same device; your app gets the outcome back.

Use this when you're building custom apps on yetipay hardware — kiosks, self-service terminals, or integrated POS experiences where your app controls the flow and triggers the payment.

Implementation support required

This integration requires provisioning, device configuration, and technical onboarding that we manage with you. Reach out to your account manager and we'll pair you with an implementation manager to guide you through setup, testing, and go-live.

How it works

Your Android app                    Yeti payment app
│ │
│──── Intent (INIT) ────────────────►│
│◄─── INIT_COMPLETE ─────────────────│
│ │
│──── Intent (SALE, amount) ────────►│
│ │ Customer taps/inserts card
│ │
│◄─── TX_COMPLETE (result) ──────────│
│ │
  1. Initialise — Your app sends an INIT Intent to ensure the Yeti app is ready.
  2. Start payment — Your app sends a SALE Intent with the amount. The Yeti app takes over the screen and handles the card flow.
  3. Receive result — When the customer completes (or cancels), you get a TX_COMPLETE Intent with the outcome.

Before you begin

  • Account setup: Contact your account manager to get paired with an implementation manager. They'll handle provisioning and ensure your app can communicate with the Yeti payment app.
  • Device requirement: Your app must run on a yetipay Android device. This integration is not available for generic Android hardware.
  • Android APIs: You'll use startActivityForResult (or the Activity Result API) to launch Intents and receive responses.
  • APK requirements: Your app must meet APK requirements (file size, SDK version, permissions, restrictions) to run on terminals.

API Reference

Initialise API

Call this before processing payments. Ensures the Yeti payment app is ready.

Action: me.yetipay.app.action.INIT

val intent = Intent("me.yetipay.app.action.INIT")
startActivityForResult(intent, REQUEST_CODE)

Response: me.yetipay.app.action.INIT_COMPLETE

ExtraTypeValues
me.yetipay.app.extra.INIT_RESULTBooleantrue = success, false = failure
me.yetipay.app.extra.INIT_RESULT_DETAILStringOK, COMPLETED, E1, A10, T1

Result details:

CodeMeaning
OKSuccessfully initialised
COMPLETEDAlready initialised
E1Failed to start
A10Provisioning error
T1Timeout

Initialise API is idempotent.


Start Payment

Action: me.yetipay.app.action.SALE

ExtraTypeRequiredDescription
me.yetipay.app.extra.BASE_AMOUNTIntYesAmount to charge (minor units)
val intent = Intent("me.yetipay.app.action.SALE")
intent.putExtra("me.yetipay.app.extra.BASE_AMOUNT", amountInMinorUnits)
startActivityForResult(intent, REQUEST_CODE)

Response: me.yetipay.app.action.TX_COMPLETE

ExtraTypeDescription
me.yetipay.app.extra.BASE_AMOUNTIntTotal amount paid (minor units)
me.yetipay.app.extra.GRATUITY_AMOUNTIntTotal tip amount (minor units)
me.yetipay.app.extra.TRANSACTION_RESULTStringAUTHORISED, FAILED, DECLINED, CANCELLED
me.yetipay.app.extra.CARD_SCHEMEStringCard scheme (e.g. visa, mastercard, amex) — optional

Transaction results:

ResultMeaning
AUTHORISEDPayment successful
DECLINEDPayment declined by issuer
FAILEDPayment failed
CANCELLEDUser cancelled payment

Complete example

class MainActivity : AppCompatActivity() {

companion object {
const val REQUEST_PAYMENT = 1001
}

fun startPayment(amountPence: Int) {
val intent = Intent("me.yetipay.app.action.SALE")
intent.putExtra("me.yetipay.app.extra.BASE_AMOUNT", amountPence)
startActivityForResult(intent, REQUEST_PAYMENT)
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)

if (requestCode == REQUEST_PAYMENT && resultCode == RESULT_OK) {
val result = data?.getStringExtra("me.yetipay.app.extra.TRANSACTION_RESULT")
val amount = data?.getIntExtra("me.yetipay.app.extra.BASE_AMOUNT", 0)
val tip = data?.getIntExtra("me.yetipay.app.extra.GRATUITY_AMOUNT", 0)
val cardScheme = data?.getStringExtra("me.yetipay.app.extra.CARD_SCHEME")

when (result) {
"AUTHORISED" -> handleSuccess(amount, tip, cardScheme)
"DECLINED" -> handleDeclined()
"FAILED" -> handleFailure()
"CANCELLED" -> handleCancelled()
}
}
}
}

Notes

  • Result code RESULT_CANCELED indicates the user backed out without completing the flow.
  • Initialise first: The device must be initialised (INIT) before processing payments (SALE).
  • CARD_SCHEME is only present on successful payments and may be null.
  • Amounts are in minor units (e.g. pence, cents).

Need help?

Contact your account manager or the Support Center to get paired with an implementation manager.