Latest 1.0.0-b5
Homepage https://github.com/stripe/stripe-terminal-ios
License MIT The MIT License

Copyright (c) 2011- Stripe, Inc. (https://stripe.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Platforms ios 9.0, requires ARC
Frameworks Foundation, Security, CoreBluetooth, CoreLocation, CoreAudio, MediaPlayer, ExternalAccessory
Authors

Stripe Terminal iOS StripeTerminal

Request a Beta invite to get started with Stripe Terminal.

Requirements

The Stripe Terminal iOS SDK is compatible with apps supporting iOS 10 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. Join the TestFlight Beta to download the example app directly (you’ll need to open the link on an iOS device).

To build the example app from source, you’ll need to:

  1. Navigate to the Example folder, and open Example.xcodeproj.
  2. Navigate to our example backend and click the button to deploy it on Heroku.
  3. In RootViewController.swift, set the URL of the Heroku app you just deployed.
  4. 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.

Installation

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.

CocoaPods

  1. If you haven’t already, install the latest version of CocoaPods.

  2. Add this line to your Podfile:

    pod 'StripeTerminal', '1.0.0-b5'
  3. Run the following command:
    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 version of the SDK, just run:

pod update StripeTerminal

Manual

  1. Navigate to our releases page, download StripeTerminal.framework.zip, and unzip it.

  2. Drag StripeTerminal.framework to the Embedded Binaries section of your Xcode project’s General settings. Make sure to select "Copy items if needed".

  3. 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:
    bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/StripeTerminal.framework/integrate_framework.sh"

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 Info.plist file:

  • Privacy – Location When In Use Usage Description
    • Key: NSLocationWhenInUseUsageDescription
    • Value: "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 Info.plist file:

  • Required background modes
    • Key: UIBackgroundModes
    • Value: bluetoooth-central (Uses Bluetooth LE accessories)

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
    • Key: NSBluetoothPeripheralUsageDescription
    • Value: “Bluetooth access is required in order to connect to supported bluetooth card readers.”
  • Privacy – Microphone Usage Description
    • Key: NSMicrophoneUsageDescription
    • Value: “Microphone access is required in order to connect to supported card readers.”

Note: Although we do not currently support any audio-jack card readers, you’ll still need to add a Microphone Usage Description to your Info.plist to pass App Store validation, as our underlying hardware SDK accesses these APIs. Since the SDK never actually uses microphone access, your users will never see a prompt for the microphone permission.

Documentation

Latest podspec

{
    "name": "StripeTerminal",
    "version": "1.0.0-b5",
    "summary": "The programmable point of sale.",
    "homepage": "https://github.com/stripe/stripe-terminal-ios",
    "authors": {
        "Stripe": "[email protected]"
    },
    "frameworks": [
        "Foundation",
        "Security",
        "CoreBluetooth",
        "CoreLocation",
        "CoreAudio",
        "MediaPlayer",
        "ExternalAccessory"
    ],
    "requires_arc": true,
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "http": "https://github.com/stripe/stripe-terminal-ios/releases/download/v1.0.0-b5/StripeTerminal.framework.zip"
    },
    "ios": {
        "vendored_frameworks": "StripeTerminal.framework"
    },
    "license": {
        "type": "MIT",
        "text": "    The MIT Licensenn    Copyright (c) 2011- Stripe, Inc. (https://stripe.com)nn    Permission is hereby granted, free of charge, to any person obtaining a copyn    of this software and associated documentation files (the "Software"), to dealn    in the Software without restriction, including without limitation the rightsn    to use, copy, modify, merge, publish, distribute, sublicense, and/or selln    copies of the Software, and to permit persons to whom the Software isn    furnished to do so, subject to the following conditions:nn    The above copyright notice and this permission notice shall be included inn    all copies or substantial portions of the Software.nn    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORn    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEn    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERn    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INn    THE SOFTWARE.n"
    }
}

Pin It on Pinterest

Share This