Go to file
Ben Guo cdcf6913eb add status to shipping validation block 2016-11-08 11:45:33 -05:00
.github more github stuffs 2016-07-20 22:22:39 +01:00
Example add status to shipping validation block 2016-11-08 11:45:33 -05:00
FauxPasConfig Merge branch 'master' into bdorfman-localization 2016-08-25 11:49:12 -07:00
Stripe add status to shipping validation block 2016-11-08 11:45:33 -05:00
Stripe.xcodeproj add standalone shipping address view controller 2016-11-08 11:45:33 -05:00
Stripe.xcworkspace remove osx example 2015-08-06 10:54:31 -04:00
StripeiOSResources remove CFBundleExecutable from resources bundle 2016-08-24 22:51:20 -04:00
Tests minor revisions 2016-11-08 11:45:33 -05:00
ci_scripts Install carthage dependency before running tests 2016-10-24 14:58:22 -07:00
docs Bump documentation 2016-11-01 14:05:03 -07:00
.clang-format introduce style defaults with clang-format 2014-10-22 15:20:32 -04:00
.cocoapods.yml add Stripe iOS Example (Simple).xcworkspace 2016-04-27 16:32:45 -04:00
.gitignore update .gitignore 2016-07-12 15:02:01 -04:00
.jazzy.yaml update ci scripts 2016-06-27 19:19:46 +01:00
.phraseapp.yml Add phraseapp push/pull scripts 2016-08-25 16:51:06 -07:00
.travis.yml Disable fauxpas linting 2016-09-15 16:28:20 -07:00
CHANGELOG Update changelog and version to 9.1.0 2016-11-01 13:58:17 -07:00
Cartfile.private Move cartfile -> cartfile.private 2016-11-04 11:57:32 -07:00
Cartfile.resolved Add FBSnapshotTestCase to test target 2016-10-21 12:02:04 -07:00
LICENSE Add LICENSE 2012-11-12 11:54:52 -05:00
MIGRATING.md 9.0.0 release 2016-10-04 11:20:57 -07:00
README.md 9.0.0 release 2016-10-04 11:20:57 -07:00
Stripe.podspec Update changelog and version to 9.1.0 2016-11-01 13:58:17 -07:00
VERSION Update changelog and version to 9.1.0 2016-11-01 13:58:17 -07:00

README.md

Stripe iOS SDK

Travis CocoaPods Carthage compatible CocoaPods CocoaPods

The Stripe iOS SDK make it easy to collect your users' credit card details inside your iOS app. By creating tokens, Stripe handles the bulk of PCI compliance by preventing sensitive card data from hitting your server (for more, see our article about PCI compliance).

We also offer seamless integration with Apple Pay that will allow you to securely collect payments from your customers in a way that prevents them from having to re-enter their credit card information.

Requirements

Our SDK is compatible with iOS apps supporting iOS 8.0 and above. It requires Xcode 8.0+ to build the source.

If you need iOS 7 or Xcode 7 compatibility, the last supported SDK release is version 8.0.7.

Integration

We've written a guide that explains everything from installation, to creating payment tokens, to Apple Pay integration and more.

For more fine-grained information on all of the classes and methods in our SDK, consult our full SDK reference.

Example apps

There are 2 example apps included in the repository:

  • Stripe iOS Example (Simple) shows a Swift integration using our prebuilt UI components.
  • Stripe iOS Example (Custom) demonstrates 2 different ways of collecting your user's payment details: via Apple Pay, and STPPaymentCardTextField, a native credit card UI form component we provide. It, too, uses a small example backend to make charges.

To build and run the example apps, open Stripe.xcworkspace and choose the appropriate scheme.

Getting started with the iOS example apps

Note: all the example apps require Xcode 8.0 to build and run.

Before you can run the apps, you need to provide them with your Stripe publishable key.

  1. If you haven't already, sign up for a Stripe account (it takes seconds). Then go to https://dashboard.stripe.com/account/apikeys.
  2. Replace the stripePublishableKey constant in CheckoutViewController.swift (for the Simple app) or Constants.m (for the Custom app) with your Test Publishable Key.
  3. Head to https://github.com/stripe/example-ios-backend and click "Deploy to Heroku" (you may have to sign up for a Heroku account as part of this process). Provide your Stripe test secret key for the STRIPE_TEST_SECRET_KEY field under 'Env'. Click "Deploy for Free".
  4. Replace the backendChargeURLString variable in the example iOS app with the app URL Heroku provides you with (e.g. "https://my-example-app.herokuapp.com")

After this is done, you can make test payments through the app (use credit card number 4242 4242 4242 4242, along with any cvc and any future expiration date) and then view them in your Stripe Dashboard!

Running the tests

  1. Open Stripe.xcworkspace
  2. Choose the "iOS Tests" or "OS X Tests" scheme
  3. Run Product -> Test

Migrating from older versions

See MIGRATING.md