com.rinne.sdk, and the managed checkout under com.rinne.sdk.checkout. Anything not on this page is internal and may change without notice.
Payments
object com.rinne.sdk.Payments, the terminal’s lifecycle.
suspend () -> String
required
Supplies the token your backend minted at
POST /v1/terminal/token. Called once per handshake and never stored. If the backend refuses it mid-handshake the SDK asks once more and retries that request, then reports ACCESS_TOKEN_REJECTED.CheckoutConfig
default:"CheckoutConfig()"
The branding of the screens and the certified PIN pad. Applied when the terminal is created; to change it,
dispose() and prepare again. See Customization.Environment
default:"Environment.default"
The Rinne environment to prepare against. Must be one the installed artifact reaches, or
getReady throws IllegalStateException.List<String>
default:"emptyList()"
Installer packages to accept besides Google Play, for fleets distributed through a device-management tool. A build installed by an unlisted installer fails attestation in production.
(ReadyResult) -> Unit
required
Delivered once, on the main thread.
getReady is idempotent: on a prepared terminal it completes at once with Ready, and two concurrent calls share one handshake. dispose() releases the terminal so the next getReady creates a new one with the current CheckoutConfig. kernelVersion() returns the version of the certified card reader inside the SDK, as the reader reports it, and is safe to call before getReady.
The managed checkout, launched through Checkout.Contract, is the supported way to take a payment during the closed beta.
Checkout.Contract
class com.rinne.sdk.checkout.Checkout.Contract : ActivityResultContract<CheckoutRequest, PaymentResult>
PaymentResult is delivered per launch, after the operator dismisses the outcome screen.
CheckoutRequest
data class com.rinne.sdk.checkout.CheckoutRequest, one sale described.
A request that breaks these rules throws
IllegalArgumentException before the screen opens.
CheckoutConfig
data class com.rinne.sdk.CheckoutConfig, the branding of the screens and the PIN pad.
A
null on-colour is the SDK’s dark ink or white, whichever has the higher contrast against the colour beneath it, and a null buttonColor is primaryColor. resolvedOnPrimaryColor, resolvedButtonColor and resolvedOnButtonColor return the colours the screens draw.
enum class BackgroundType { FULL, TRANSPARENT } and enum class PinPadType { SHIFTED, SHUFFLED }. What each field does, with a live preview: Customization.
TransactionType and PaymentMethod
PaymentResult
sealed interface com.rinne.sdk.PaymentResult, delivered once per checkout.
Every variant also carries
raw: String?, a JSON snapshot of the card reader’s response, and diagnostics: EmvDiagnostics?, decoded card diagnostics for support triage. Neither contains cardholder data. transactionId is the card reader’s identifier for the attempt, not a Rinne id. cardScheme is VISA, MASTERCARD or ELO. Full behaviour: Results and errors.
TransactionRecord
data class com.rinne.sdk.TransactionRecord, Rinne’s record of the transaction, relayed to the phone during authorisation.
It is
null on the result when the transaction never reached Rinne, as with a card refused on the device, or when Rinne’s answer did not reach the phone. Look the transaction up by requestId then.
ReadyResult
ErrorCode and ErrorCatalog
enum class com.rinne.sdk.ErrorCode, fourteen values in a fixed order that only ever grows:
TERMINAL_NOT_READY, ATTESTATION_FAILED, CARD_READ_TIMEOUT, PIN_FAILED, DECLINED_BY_ISSUER, NETWORK, CANCELLED, UNKNOWN, LOCATION_UNAVAILABLE, SECURE_ENTRY_BLOCKED, ACCESS_TOKEN_REJECTED, TAP_ON_PHONE_NOT_ENABLED, EMV_CONFIG_UNAVAILABLE, PAYMENT_METHOD_NOT_SUPPORTED.
ErrorCatalog[code] returns an ErrorInfo(message, retryHint, retriable) with English defaults for hosts that build their own error screens. The managed checkout uses its own localized copy for the same codes. Meanings, retry rules and operator text: Results and errors.
Environment
LOCAL, DEV and SANDBOX; the production artifact reaches PRODUCTION only. Environment.supported lists what the installed artifact reaches and Environment.default is its default, which for the sandbox artifact is DEV, so pass SANDBOX explicitly.
AntennaSetup.Contract
class com.rinne.sdk.checkout.AntennaSetup.Contract : ActivityResultContract<Unit, Boolean>
Opens the antenna guide. Needs no terminal or token, reads no card data, inherits the last CheckoutConfig, and returns true when the merchant confirms the position with a test tap. See Device setup.
Nfc
object com.rinne.sdk.Nfc, platform helpers with no kernel and no credentials.
DeviceReadiness
Returned byPayments.checkDeviceReadiness(context).
OS_PATCH_LEVEL only warns; the other four block. Readiness is not attestation: a device can pass every check and still be refused with ATTESTATION_FAILED.
RinneApplication
abstract class com.rinne.sdk.RinneApplication : Application. Subclass it and put your startup work in onRinneCreate(). onCreate() is final: the card reader runs its cryptography in an isolated process that re-enters Application.onCreate, and the SDK returns early there before any host code runs.
Next steps
Quickstart
Every type above, in the order you use them.
Simulator
See what each
CheckoutConfig and CheckoutRequest field does on the screens.
