Stripe Terminal enables you to build your own in-person checkout to accept payments in the physical world. Built on Stripe's payments network, Terminal helps you unify your online and offline payment channels. With the Stripe Terminal iOS SDK, you can connect to pre-certified card readers from your iOS app and drive a customized in-store checkout flow.
Get started with our integration guides and sample integration, or browse the SDK reference documentation.
Upgrading from an older version of the SDK? See our migration guide for guidance.
The Stripe Terminal iOS SDK is compatible with apps supporting iOS 13 and above.
The iOS SDK includes an open-source example app, which you can use to familiarize yourself with the SDK and reader before starting your own integration.
To build the example app from source, you'll need to:
Example
folder, and open Example.xcworkspace
(make sure to open the .xcworkspace
and not the .xcodeproj
).AppDelegate.swift
, set the URL of the Heroku app you just deployed.We support CocoaPods and Swift Package Manager. If you prefer to install the library manually, please use the latest version from our releases page.
In Xcode, select File > Swift Packages > Add Package Dependency and enter https://github.com/stripe/stripe-terminal-ios
If you haven't already, install the latest version of CocoaPods.
Add this line to your Podfile:
pod 'StripeTerminal', '~> 3.0'
pod install
From now on, don't forget to use the *.xcworkspace
file to open your project in Xcode, instead of the .xcodeproj
file.
In the future, to update to the latest compatible version of the SDK, just run:
pod update StripeTerminal
Navigate to our releases page, download StripeTerminal.xcframework.zip, and unzip it.
Drag StripeTerminal.xcframework
to the Frameworks, Libraries, and Embedded Content section of your Xcode project’s General settings. Make sure to select "Copy items if needed".
When new versions of the SDK are released, repeat the above steps to update your installation.
Location services must be enabled in order to use the iOS SDK. Add the following key-value pair to your app's Info.plist
file:
NSLocationWhenInUseUsageDescription
Note: Stripe needs to know where payments occur to reduce risks associated with those charges and to minimize disputes. If the SDK can’t determine the iOS device’s location, payments are disabled until location access is restored.
For your app to run in the background and remain connected to the reader, add this key-value pair to your Info.plist
file:
UIBackgroundModes
bluetooth-central
(Uses Bluetooth LE accessories)bluetooth-central
to.For your app to pass validation when submitting to the App Store, add the following key-value pairs as well:
NSBluetoothPeripheralUsageDescription
NSBluetoothAlwaysUsageDescription
We maintain an archive of the API reference for the previous major version.
link |
Stars: 87 |
Last commit: 1 week ago |
retrievePaymentIntent
and retrieveSetupIntent
no longer require a connected reader.SCPCharge.authorizationCode
to the sdk's SCPCharge
model when it is available.
2.18
or later to be installed on your internet reader.network
and wallet
to SCPCardPresentDetails
.paymentMethodId
to SCPPaymentIntent
.SCPReaderNetworkStatus
has a new case (SCPReaderStatusUnknown
) that represents the network status of an internet reader that was discovered while the SDK is operating in offline mode.SCPSetupIntent.status
is now SCPSetupIntentStatusRequiresConfirmation
after the payment has been collected.SCPErrorSessionExpired
when the SDK comes back online while using offline mode.Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics