Giter Site home page Giter Site logo

stripe-ios's Introduction

Stripe iOS SDK

Travis CocoaPods Carthage compatible License Platform

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. We also expose the low-level APIs that power those UIs so that you can build fully custom experiences.

Get started with our 📚 integration guides and example projects, or 📘 browse the SDK reference.

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.

SCA-Ready: The SDK automatically performs native 3D Secure authentication if needed to comply with Strong Customer Authentication regulation in Europe.

Stripe API: We provide low-level APIs that correspond to objects and methods in the Stripe API. You can build your own entirely custom UI on top of this layer, while still taking advantage of utilities like STPCardValidator to validate your user’s input.

Native UI: We provide native screens and elements to collect payment and shipping details. For example, STPPaymentCardTextField is a UIView that collects and validates card details:

STPPaymentCardTextField

You can use these individually, or take all of the prebuilt UI in one flow by following the Basic Integration guide.

STPAddCardViewControllerSTPPaymentOptionsViewControllerSTPShippingAddressViewController

From left to right: STPAddCardViewController, STPPaymentOptionsViewController, STPShippingAddressViewController

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

Releases

We recommend installing the Stripe iOS SDK using a package manager such as Cocoapods or Carthage. If you link the library manually, use a version from our releases page.

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 10 or above. Please use v17.0.2 if you need to support iOS 9.

Getting Started

Integration

Get started with our 📚 integration guides and example projects, or 📘 browse the SDK reference for fine-grained documentation of all the classes and methods in the SDK.

Examples

There are 3 example apps included in the repository:

  • UI Examples.
    • This example lets you quickly try out the SDK's prebuilt UI components using a mock backend—just build and run!
  • Basic Integration
    • This example demonstrates how to build a payment flow using our prebuilt UI component integration (STPPaymentContext).
  • Non-Card Payment Examples
    • This example demonstrates how to use STPAPIClient to accept various non-card payment methods.

Check out stripe-samples for more, including:

Card IO

To add card scanning capabilities to our prebuilt UI components, 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").

Demo this in our Basic Integration example app by running ./install_cardio.rb, which will download and install card.io in the 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 7, iOS 12.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 davidme-stripe avatar danj-stripe avatar joeydong-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 joelchoo-stripe avatar angelogiurano avatar fbernardo avatar watsonbox avatar theill avatar phillco avatar aliriaz-stripe avatar bendeming avatar zwick-stripe avatar teich-stripe avatar raycmorgan avatar

Watchers

James Cloos 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.