Terminal SDK migration guide
Learn how to migrate to version 5.0.0 of the Stripe Terminal SDK.
The Stripe Terminal iOS and Android SDKs have been updated with a number of breaking changes in APIs and behavior, some of which require you to update your integration with the Stripe Terminal SDK. To improve consistency between our SDKs and to simplify your application logic and integration, we regularly make changes in major version updates that might affect the way your integration works or behaves. This guide explains the latest changes to help you upgrade your integration.
Note
Building a new Stripe Terminal integration? Visit our Design an integration page to learn how to get started.
Migrate to version 5.0.0
Here’s what you need to know about the version 5.0.0 Stripe Terminal iOS and Android SDKs:
- Simplified payment integration
- Process payments, setup intents, and refunds with a single method call combining collect and confirm steps.
- Supports modern Swift async variants and Kotlin Coroutines for simplifying complex asynchronous flows
- Swift concurrency (async/await) for iOS and Kotlin Coroutines for Android.
- Customer cancellation enabled by default
- On supported readers, customers can now cancel transactions by default during payment, setup, refund, and data collection flows.
- Improved mobile reader and Tap to Pay reader auto reconnection observability
- Enhanced reader auto-reconnection handling with more connection status states for mobile readers (Bluetooth and USB) and Tap to Pay readers.
- Discover card acceptance support for Tap to Pay on Android Public preview
- Accept Discover card payments with Tap to Pay on Android.
- Updates to minimum supported platform versions from iOS 14.0 to iOS 15.0
If your application currently uses a Terminal Android SDK version earlier than 5.0.0, there are several changes you need to make to upgrade. For a detailed list of the changes from version 4.x to 5.0.0, see the SDK changelog.
Simplified payment integration
Update to unified payment processing
The v5 SDK introduces streamlined methods that combine the collect and confirm steps into a single operation. While the existing collectPaymentMethod and confirmPaymentIntent methods continue to work, we recommend using the new unified methods for simpler integrations.
Processing payments with processPaymentIntent
Replace two-step collect and confirm with a single processPaymentIntent method call.
Before
After
Processing refunds with processRefund
The collectRefundPaymentMethod and confirmRefund methods are now deprecated. Use processRefund instead.
Before
After
Processing setup intents with processSetupIntent
Replace two-step collect and confirm with a single processSetupIntent method call.
Before
After
Kotlin Coroutines support
For Kotlin developers, a new optional module stripeterminal-ktx provides suspend function wrappers for asynchronous Terminal APIs.
Note
Add this dependency: implementation("com.
Before
Terminal.getInstance().discoverReaders(config, object : DiscoveryListener { override fun onUpdateDiscoveredReaders(readers: List<Reader>) { val selectedReader = readers[0] Terminal.getInstance().connectReader(selectedReader, connectionConfig, object : ReaderCallback { override fun onSuccess(reader: Reader) { // Handle successful connection } override fun onFailure(e: TerminalException) { // Handle connection failure } }) } })
After
// Add dependency: implementation("com.stripe:stripeterminal-ktx:5.0.0") coroutineScope { try { val readers = Terminal.getInstance().discoverReaders(discoveryConfig) .filter { it.isNotEmpty() } .first() val selectedReader = readers.first() val reader = Terminal.getInstance().connectReader(selectedReader, connectConfig) // Handle successful connection } catch(e: TerminalException) { // Handle failures on discovery or connect } }
Platform and initialization
Update Terminal initialization
The Terminal. method has been renamed to Terminal.. It now requires a nullable OfflineListener parameter.
Before
After
Reader discovery and connection
Handle reconnection status changes
A new RECONNECTING value has been added to the ConnectionStatus enum. During initial connection Terminal. will now be null until the connection attempt succeeds.
Before
After
Streamlined connection with easyConnect
For smart readers, Tap to Pay, and Apps on Devices integrations, you can now use Terminal., which combines discovery and connection into a single method call.
Before
After
Internet reader discovery filtering
Internet reader discovery now supports filtering by reader ID or serial number. Set the discoveryFilter property on InternetDiscoveryConfiguration to discover a specific reader.
Before
After
Payment acceptance and data collection
Customer cancellation is now enabled by default
On Android-based readers, the ability for customers to cancel transactions is now enabled by default. You can disable this feature by setting customerCancellation to DISABLE_.
Before
After
Interac refund parameter updates
If you create RefundParameters for an Interac refund using a PaymentIntent ID, you must now also pass the PaymentIntent’s clientSecret. You can alternatively continue using the charge ID, which doesn’t require the clientSecret.
Before
After
Update your Apps on Devices integration
The Maven coordinates for the Apps on Devices feature have changed to com.. Update your build dependencies to point to the new artifact name. Stripe will no longer update the old handoffclient artifact.
We renamed all Handoff class names to AppsOnDevices to better describe the feature’s functionality.
Before
After
Rename Handoff classes to AppsOnDevices
We’ve renamed all Handoff class names to AppsOnDevices across discovery configuration, connection configuration, listeners, and token providers.
Before
After
Update Tap to Pay on Android integration
System requirements
Tap to Pay on Android 5.0.0 and above requires your Android device to be running Android 13 or higher.
This version also requires that your Android device’s KeyStore supports hardware-backed key agreements. This is checked automatically for you by supportsReadersOfType(), but can also be verified by checking that your device’s FEATURE_ version is 100 or above. Since this requirement depends on the hardware capabilities of a device, it might not be met by devices that were originally released with Android 12 or lower, even if they’ve been upgraded to meet the Android 13 runtime requirement. This new requirement means that devices like the Samsung Galaxy Tab Active4 Pro are no longer supported in SDK versions 5.0.0 and above.
For production environments, reader discovery fails with a TAP_ error if developer options, USB or Wi-Fi debugging, or other debug options are enabled on the device. This doesn’t apply to usage of the simulated Tap to Pay reader.
TapZone configuration refactoring
The TapToPayUxConfiguration. class has been refactored. The indicator and position fields are replaced by a single TapZone object.
Before
After