Tinkoff Kassa Payment Gateway Integration in Mobile Application
Tinkoff Kassa (now T-Kassa) provides native SDKs for iOS and Android. Supports card payment, SBP, Tinkoff Pay, and Apple/Google Pay. Distinctive feature — SDK includes ready payment screen, so basic integration takes less than a day if backend is ready.
SDK Integration
// Android
implementation("ru.tinkoff.acquiring:ui:x.x.x")
// iOS, SPM
.package(url: "https://github.com/TinkoffCreditSystems/AcquiringSdk_IOS")
Main Flow
T-Kassa works via two-stage scheme: server initializes payment and gets paymentId, then SDK on client performs it.
Server initialization:
POST https://securepay.tinkoff.ru/v2/Init
{
"TerminalKey": "your_terminal_key",
"Amount": 150000,
"OrderId": "ORDER-1234",
"Description": "Payment for order",
"Token": "sha256_signature"
}
Response contains PaymentId and PaymentURL. PaymentId is passed to SDK to perform payment in native UI.
Android: Payment Screen Launch
val tinkoffAcquiring = TinkoffAcquiring(
context,
terminalKey = "your_terminal_key",
publicKey = "your_public_key"
)
val paymentOptions = PaymentOptions().setOptions {
setTerminalParams(
terminalKey = "your_terminal_key",
publicKey = "your_public_key"
)
orderOptions {
orderId = "ORDER-1234"
amount = Money.ofRubles(1500)
title = "Order #1234"
description = "Order payment"
savingAsParentPayment = false
}
featuresOptions {
useSecureKeyboard = true
cameraCardScanner = CameraCardIOScanner() // optional
fpsEnabled = true // SBP
tinkoffPayEnabled = true
}
}
val launcher = registerForActivityResult(TinkoffAcquiring.createPaymentContract(context)) { result ->
when (result.status) {
AsdkState.Success -> handleSuccess(result.paymentId)
AsdkState.Cancelled -> {}
AsdkState.Error -> handleError(result.error)
else -> {}
}
}
tinkoffAcquiring.openPaymentScreen(
activity = this,
paymentOptions = paymentOptions,
launcher = launcher
)
iOS: AcquiringUISDK
import TinkoffASDKUI
let credential = AcquiringSdkCredential(
terminalKey: "your_terminal_key",
publicKey: "your_public_key"
)
let acquiringSDK = try AcquiringUISDK(credential: credential)
let paymentData = PaymentInitData(
amount: 150000, // in kopecks
orderId: "ORDER-1234",
customerKey: "user_123"
)
acquiringSDK.presentPaymentView(
on: self,
paymentData: paymentData,
configuration: AcquiringViewConfiguration()
) { result in
switch result {
case .success(let paymentInfo):
print("Payment ID: \(paymentInfo.paymentId)")
case .failure(let error):
print("Error: \(error)")
case .cancelled:
break
}
}
Tinkoff Pay: Special Case
Tinkoff Pay opens Tinkoff Bank app for payment confirmation. Works only if Tinkoff Bank is installed on device. SDK checks this automatically via UIApplication.canOpenURL (iOS) or PackageManager.getLaunchIntentForPackage (Android) and hides button if app not found.
Request Signing (Token)
All server API requests to T-Kassa are signed via SHA-256: parameter value concatenation + Password in alphabetical key order. Incorrect token — frequent cause of 0 error (Invalid Token) during payment initialization.
Work Scope
- ASDK iOS / Android integration
- Server payment initialization with correct signature
- Feature configuration: SBP, Tinkoff Pay, card storage
- Status handling and Webhook confirmation
- Testing via test terminal
Timeline
2–3 days. Cost calculated individually.







