Stripe Terminal iOS SDK
For information on migrating from beta versions of the iOS SDK, see the Stripe Terminal Beta Migration Guide.
The Stripe Terminal iOS SDK is compatible with apps supporting iOS 9 and above.
Try the example app
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:
- Navigate to the
Examplefolder, and open
- Navigate to our example backend and click the button to deploy it on Heroku.
AppDelegate.swift, set the URL of the Heroku app you just deployed.
- Build and run the app. The SDK comes with a simple reader simulator, so you can get started without any physical hardware.
Note: the example app comes with the Stripe Terminal SDK pre-installed, but uses a few other dependencies. We’ve included pre-built dependencies using Swift 4.2. You may need to run
./setup.sh to re-build the app’s dependencies for your environment.
We recommend that you install the SDK using CocoaPods. If you prefer to install the library manually, please use the latest version from our releases page.
If you haven’t already, install the latest version of CocoaPods.
Add this line to your Podfile:
pod 'StripeTerminal', '1.0.3'
Run the following command:
From now on, don’t forget to use the
*.xcworkspace file to open your project in Xcode, instead of the
In the future, to update to the latest version of the SDK, just run:
pod update StripeTerminal
Navigate to our releases page, download StripeTerminal.framework.zip, and unzip it.
StripeTerminal.frameworkto the Embedded Binaries section of your Xcode project’s General settings. Make sure to select
Copy items if needed.
Navigate to the Build Phases section of your Xcode project settings, and create a new Run Script Build Phase. Paste the following snippet into the text field:
When new versions of the SDK are released, repeat steps one and two to update your installation
Configure your app
Location services must be enabled in order to use the iOS SDK. Add the following key-value pair to your app’s
- Privacy - Location When In Use Usage Description
Location access is required in order to accept payments.
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
bluetoooth-central(Uses Bluetooth LE accessories)
NoteNote the value is actually an array that you will need to add
For your app to pass validation when submitting to the App Store, add the following key-value pairs as well:
- Privacy - Bluetooth Peripheral Usage Description
- Value: “Bluetooth access is required in order to connect to supported bluetooth card readers.”