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:
NSBluetoothAlwaysUsageDescription
We maintain an archive of the API reference for the previous major version.
link |
Stars: 94 |
Last commit: 1 week ago |
CollectInputs
can now display optional toggles
in each input type.
SetupIntentParameters.paymentMethodTypes
.
2.22
or later to be installed on your internet reader.supportsReadersOfType
now returns NO with error SCPErrorInvalidDiscoveryConfiguration
if the device type and discovery method are incompatible.reader:didFinishInstallingUpdate:error:
callback. The update will be available to be retried using installAvailableUpdate
. If the update isn't installed with installAvailableUpdate
the installation will be retried the next time connecting to the reader.collectPaymentMethod
was not responsive in certain conditions when a card was left in the reader or inserted before calling collectPaymentMethod
.rebootReader
would return SCPErrorUnexpectedSdkError
if called after the reader received a firmware update.Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics