Giter VIP home page Giter VIP logo

stripe-ios's Introduction

Stripe iOS SDK

Travis CocoaPods Carthage compatible CocoaPods CocoaPods

The Stripe iOS SDK makes it quick and easy to build an excellent payment experience in your iOS app. We provide powerful and customizable UI screens and elements that can be used out-of-the-box to collect your users' payment details.

STPPaymentCardTextField

We also expose the low-level APIs that power those UIs so that you can build fully custom experiences. See our iOS Integration Guide to get started!

Updating to a newer version of the SDK? See our migration guide and changelog.

Table of contents

Features

Simplified Security: We make it simple for you to collect sensitive data such as credit card numbers and remain PCI compliant. This means the sensitive data is sent directly to Stripe instead of passing through your server. For more information, see our Integration Security Guide.

Apple Pay: We provide a seamless integration with Apple Pay. After installing the SDK, see our full guide to accept Apple Pay in your iOS app.

Native UI: We provide out-of-the-box native screens and elements so that you can get started quickly without having to think about designing the right interfaces. For example, STPPaymentCardTextField is a UIView that collects and validates card details. STPAddCardViewController is a UIViewController that also creates the Stripe API payment object for you. See our Custom Integration Guide.

STPAddCardViewControllerSTPPaymentOptionsViewControllerSTPShippingAddressViewController

We also offer all of our UI components bundled into an all-in-one class designed to handle collecting, saving, and reusing your user’s payment details, as well as collecting shipping info. Take our entire checkout flow at once by following the STPPaymentContext guide.

Card Scanning: We support card scanning capabilities using card.io. See our Card IO section.

Releases

We recommend that you install the Stripe iOS SDK using a package manager such as Cocoapods or Carthage. If you prefer to link the library manually, please use a version from our releases page because we consider the master branch to be unstable.

If you're reading this on GitHub.com, please make sure you are looking at the tagged version that corresponds to the release you have installed. Otherwise, the instructions and example code may be mismatched with your copy. You can read the latest tagged version of this README and browse the associated code on GitHub using this link.

Requirements

The Stripe iOS SDK requires Xcode 10.1 or later and is compatible with apps targeting iOS 9 or above.

Getting Started

Integration

Please see our iOS Integration Guide which explains SDK installation, collecting payment information, Apple Pay integration, and more. For more fine-grained documentation for all of the classes and methods, please see our full Stripe iOS SDK Reference.

Examples

There are 3 example apps included in the repository:

Card IO

To add card scanning capabilities to our prebuilt UI components, you can simply install card.io alongside our SDK. You'll also need to set NSCameraUsageDescription in your application's plist, and provide a reason for accessing the camera (e.g. "To scan cards").

To try this out, you can run ./install_cardio.rb, which will download and install card.io in the Standard Integration project. Now, when you run the example app on a device, you'll see a "Scan Card" button when adding a new card.

Contributing

We welcome contributions of any kind including new features, bug fixes, and documentation improvements. Please first open an issue describing what you want to build if it is a major change so that we can discuss how to move forward. Otherwise, go ahead and open a pull request for minor changes such as typo fixes and one liners.

Running Tests

  1. Install Carthage (if you have homebrew installed, brew install carthage)
  2. From the root of the repo, install test dependencies by running carthage bootstrap --platform ios --configuration Release --no-use-binaries
  3. Open Stripe.xcworkspace
  4. Choose the "StripeiOS" scheme with the iPhone 6, iOS 11.2 simulator (required for snapshot tests to pass)
  5. Run Product -> Test

Migrating from Older Versions

See MIGRATING.md

stripe-ios's People

Contributors

jack-stripe avatar bg-stripe avatar bdorfman-stripe avatar yuki-stripe avatar danj-stripe avatar joeydong-stripe avatar davidme-stripe avatar csabol-stripe avatar vprtwn avatar scalessec avatar jamesreggio avatar acavailhez-stripe avatar alex-stripe avatar michaelvillar avatar irace avatar ray-stripe avatar bradfol avatar klaaspieter avatar jil-stripe avatar angelogiurano avatar fbernardo avatar watsonbox avatar theill avatar phillco avatar aliriaz-stripe avatar zwick-stripe avatar teich-stripe avatar raycmorgan avatar joshavant avatar jgiola avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.