Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
In-person payments
Terminal
    Overview
    Accept in-person payments
    Global availability
    Integration design
    Select your reader
    Design an integration
    Quickstart
    Example applications
    Testing
    Terminal setup
    Set up your integration
    Multiparty payments with Connect
    Connect to a reader
    Accepting a payment
    Collect card payments
    Additional payment methods
    Accept offline payments
    Mail order and telephone order payments
    Regional considerations
    During checkout
    Collect tips
    Collect and save payment details for future use
    Flexible authorizations
    After checkout
    Refund transactions
    Provide receipts
    Customize checkout
    Cart display
    Collect on-screen inputs
    Collect swiped data
    Collect tapped data for NFC instruments
    Apps on devices
    Manage readers
    Order, return, replace readers
    Register readers
    Manage locations and zones
    Configure readers
    Monitor Readers
    References
    API references
    Mobile readers
    Smart readers
    Tap to Pay readers
    SDK migration guide
      SDK v4 migration guide
      SDK v3 migration guide
    Deployment checklist
    Stripe Terminal reader product sheets
Payment methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United States)
HomePaymentsTerminal

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 iOS 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.

Update your minimum supported version to iOS 15 or higher

We regularly update the minimum supported version of our SDKs to streamline our developer support efforts.

Existing 4.X versions of the Terminal iOS SDK will continue to support devices running iOS 14 and higher.

Simplified payment integration

Update to unified payment processing

The v5 SDK includes 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 unified methods for simpler integrations.

Processing payments with processPaymentIntent

Replace two-step collect and confirm with a single processPaymentIntent method call.

Before

Swift
Objective-C
No results
// Step 1: Collect payment method Terminal.shared.collectPaymentMethod(paymentIntent, collectConfig: collectConfig) { collectedPaymentIntent, collectError in guard let collectedPaymentIntent = collectedPaymentIntent else { // Payment method collection failed return } // Step 2: Confirm the payment Terminal.shared.confirmPaymentIntent(collectedPaymentIntent) { confirmedPaymentIntent, confirmError in if let confirmedPaymentIntent = confirmedPaymentIntent { // Payment successful } else { // Payment confirmation failed } } }

After

Swift
Objective-C
No results
// Process and confirm the payment in one step Terminal.shared.processPaymentIntent(paymentIntent, collectConfig: collectConfig) { processedPaymentIntent, processError in if let processedPaymentIntent = processedPaymentIntent { // Payment successful } else { // Payment failed } }

Processing refunds with processRefund

The collectRefundPaymentMethod and confirmRefund methods are now deprecated. Use processRefund instead.

Before

Swift
Objective-C
No results
// Step 1: Collect refund payment method Terminal.shared.collectRefundPaymentMethod(refundParams) { collectError in guard collectError == nil else { // Refund collection failed return } // Step 2: Confirm the refund Terminal.shared.confirmRefund { refund, confirmError in if let refund = refund { // Refund successful } else { // Refund confirmation failed } } }

After

Swift
Objective-C
No results
// Process the refund in one step Terminal.shared.processRefund(refundParams) { refund, refundError in if let refund = refund { // Refund successful } else { // Refund failed } }

Processing setup intents with processSetupIntent

Replace two-step collect and confirm with a single processSetupIntent method call.

Before

Swift
Objective-C
No results
// Step 1: Collect setup intent payment method Terminal.shared.collectSetupIntentPaymentMethod(setupIntent, customerConsentCollected: true) { collectedSetupIntent, collectError in guard let collectedSetupIntent = collectedSetupIntent else { // Setup intent collection failed return } // Step 2: Confirm the setup intent Terminal.shared.confirmSetupIntent(collectedSetupIntent) { confirmedSetupIntent, confirmError in if let confirmedSetupIntent = confirmedSetupIntent { // Setup intent successful } else { // Setup intent confirmation failed } } }

After

Swift
Objective-C
No results
// Configure with allowRedisplay let config = try CollectSetupIntentConfigurationBuilder() .setAllowRedisplay(.always) .build() // Process the setup intent in one step Terminal.shared.processSetupIntent(setupIntent, collectConfig: config) { processedSetupIntent, setupError in if let processedSetupIntent = processedSetupIntent { // Setup intent successful } else { // Setup intent failed } }

Swift async variant support

The SDK now provides async variants for Terminal methods. You can write cleaner, sequential code instead of nesting completion handlers.

Before

let cancelable = Terminal.shared.collectPaymentMethod(paymentIntent, collectConfig: collectConfig) { collectedPaymentIntent, collectError in guard let collectedPaymentIntent = collectedPaymentIntent else { // Payment method collection failed return } Terminal.shared.confirmPaymentIntent(collectedPaymentIntent) { confirmedPaymentIntent, confirmError in // Handle confirmation } }

After

let collectTask = Task { do { let collectedIntent = try await Terminal.shared.collectPaymentMethod(paymentIntent, collectConfig: collectConfig) let confirmedIntent = try await Terminal.shared.confirmPaymentIntent(collectedIntent) // Payment successful } catch { // Handle error } } // Use collectTask.cancel() to cancel the operation when needed

Platform and initialization

Update Terminal initialization

The setTokenProvider method has been removed. You must now initialize the SDK with the static Terminal.initWithTokenProvider(_tokenProvider:) method before accessing the Terminal.shared singleton.

Before

Swift
Objective-C
No results
// In your AppDelegate or scene delegate Terminal.setTokenProvider(yourTokenProvider)

After

Swift
Objective-C
No results
// In your AppDelegate or scene delegate, at app launch Terminal.initWithTokenProvider(yourTokenProvider)

Reader discovery and connection

Update DiscoveryConfiguration initialization

You can no longer initialize DiscoveryConfiguration objects directly with init or new. You must now use their associated builder classes.

Before

Swift
Objective-C
No results
let config = SCPInternetDiscoveryConfiguration(isSimulated: true)

After

Swift
Objective-C
No results
let config = InternetDiscoveryConfiguration.Builder() .setSimulated(true) .build()

Handle reconnection status changes

A new .reconnecting value has been added to the ConnectionStatus enum. During a reconnect, Terminal.shared.connectedReader will now be nil until the reconnection is successful.

Before

Swift
Objective-C
No results
func terminal(_ terminal: Terminal, didChange connectionStatus: ConnectionStatus) { switch connectionStatus { case .notConnected: // Handle not connected case .connected: // Handle connected @unknown default: break } }

After

Swift
Objective-C
No results
func terminal(_ terminal: Terminal, didChange connectionStatus: ConnectionStatus) { switch connectionStatus { case .notConnected: // Handle not connected case .connected: // Handle connected case .reconnecting: // Handle reconnection in progress @unknown default: break } }

Payment acceptance and data collection

Customer cancellation is now enabled by default

On supported readers, the ability for customers to cancel transactions is now enabled by default. The customerCancellation property has changed from a Bool to the new SCPCustomerCancellation enum.

Before

Swift
Objective-C
No results
let collectConfig = try CollectConfigurationBuilder() .setEnableCustomerCancellation(false) .build()

After

Swift
Objective-C
No results
let collectConfig = try CollectPaymentIntentConfigurationBuilder() .setCustomerCancellation(.disableIfAvailable) .build()

Interac refund parameter updates

If you create SCPRefundParameters 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

Swift
Objective-C
No results
let refundParams = try RefundParametersBuilder( paymentIntentId: "pi_123", amount: 1000, currency: "cad" ).build()

After

Swift
Objective-C
No results
let refundParams = try RefundParametersBuilder( paymentIntentId: "pi_123", clientSecret: "pi_123_secret_abc", amount: 1000, currency: "cad" ).build()
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc