Skip to content

Accept payments

A unified quickstart for accepting card-reader payments with the iOS or Android Terminal SDK.

This guide shows the core card-reader payment flow for both mobile SDKs.

For platform-specific setup details, permissions, and advanced options, use the full documentation:

  1. Initialize the SDK with your Affiliate Key.
  2. Log the merchant in.
  3. Optionally prepare the reader connection before checkout.
  4. Create a checkout request and start payment.
  5. Handle the result in your app.
import SumUpSDK
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
SumUpSDK.setup(withAPIKey: "sup_afk_abcqwerty")
return true
}
}
SumUpSDK.presentLogin(from: self, animated: true) { success, error in
if let error {
print("Login error: \(error)")
return
}
if success {
print("Merchant logged in")
}
}

Use this when the merchant is about to charge, so the SDK can wake/reconnect the reader early.

SumUpSDK.prepareForCheckout()
guard let merchantCurrencyCode = SumUpSDK.currentMerchant?.currencyCode else {
return
}
let request = CheckoutRequest(
total: NSDecimalNumber(string: "12.34"),
title: "Coffee",
currencyCode: merchantCurrencyCode
)
request.foreignTransactionID = UUID().uuidString
SumUpSDK.checkout(with: request, from: self) { result, error in
if let error {
print("Checkout error: \(error)")
return
}
if let result {
print("Result: \(result.success), transactionCode: \(result.transactionCode ?? "-")")
}
}
// Handled in the completion block of SumUpSDK.checkout(...)
// Use result.success, result.transactionCode, and error for your UI/state updates.