Go to file
Mel 336be4a0e3 Add analytics to IdentityVerificationSheet (#155)
This change adds analytics to the IDV sheet. Specifically, we're logging the following events:

- `stripeios.idprod.verification_sheet.presented` - the sheet is presented to the end-user
- `stripeios.idprod.verification_sheet.closed` - the sheet is closed by the end-user. Also contains a `session_result` to indicate whether the user successfully completed the IDV flow or closed the sheet to cancel out of the flow.
- `stripeios.idprod.verification_sheet.failed` - the sheet failed to open. Also contains an `error_dictionary` containing the error code, domain, and userInfo dictionary for the error that caused the sheet to fail to open.
2021-08-04 10:27:47 -07:00
.circleci MOBILESDK-291: Migrate tests to StripeCore and add tests to CI (#276) 2021-07-08 15:03:22 -07:00
.github
BuildConfigurations run update_version.sh 2021-07-07 13:35:45 -07:00
Example IDPROD-1437: Identity example app (#148) 2021-08-04 10:27:47 -07:00
FauxPasConfig
IntegrationTester Merge pull request #282 from stripe-ios/davidme/fix-integration-tester-scrolling 2021-07-15 16:15:34 -07:00
LocalizationTester Fixes StripeCore linking for sample projects (#287) 2021-07-15 16:14:21 -07:00
OriginalAssets/Stripe.xcassets no assets 2021-03-01 16:56:36 -08:00
Stripe Add analytics to IdentityVerificationSheet (#155) 2021-08-04 10:27:47 -07:00
Stripe.xcodeproj Add analytics to IdentityVerificationSheet (#155) 2021-08-04 10:27:47 -07:00
Stripe.xcworkspace IDPROD-1437: Identity example app (#148) 2021-08-04 10:27:47 -07:00
Stripe3DS2 Adds 3DS2 support for Cartes Bancaires (#257) 2021-06-28 15:50:35 -07:00
StripeCore Add analytics to IdentityVerificationSheet (#155) 2021-08-04 10:27:47 -07:00
StripeiOSResources
Tests Add analytics to IdentityVerificationSheet (#155) 2021-08-04 10:27:47 -07:00
ci_scripts Add analytics to IdentityVerificationSheet (#155) 2021-08-04 10:27:47 -07:00
docs rebuild documentation 2021-07-07 14:47:57 -07:00
fastlane MOBILESDK-291: Migrate tests to StripeCore and add tests to CI (#276) 2021-07-08 15:03:22 -07:00
stripe3ds2-support Update export_builds script to zip all frameworks together (#291) 2021-07-14 19:11:10 -07:00
.clang-format
.cocoapods.yml Move each example app into its own directory 2021-03-23 15:53:40 -07:00
.gitignore Add ability to upload example apps to TestFlight via Fastline (#158) 2021-03-23 17:36:38 -07:00
.jazzy.yaml Release 3DS2 framework source code (#62) 2021-01-05 16:50:08 -08:00
.swift-format Re-run swift-format 2021-03-01 17:04:01 -08:00
.swiftlint.yml Swift conversion review: Update project files, scripts, and embedded dependencies (#1695) 2020-11-04 15:43:09 -08:00
CHANGELOG.md Sets accessibilityLabel on postalCodeField in STPPaymentCardTextField (#296) 2021-08-03 16:21:46 -07:00
CONTRIBUTING.md
Cartfile.private Swift conversion review: Update project files, scripts, and embedded dependencies (#1695) 2020-11-04 15:43:09 -08:00
Cartfile.resolved Merge origin/mc (#135) 2021-03-01 15:12:20 -08:00
Gemfile Optimize some tests (#89) 2021-01-27 12:40:29 -08:00
Gemfile.lock Bump addressable from 2.7.0 to 2.8.0 2021-07-13 18:19:42 +00:00
LICENSE Merge origin/mc (#135) 2021-03-01 15:12:20 -08:00
MIGRATING.md Fixes broken card scanning links (#260) 2021-07-13 14:53:04 -07:00
PRIVACY.md Add PRIVACY.md (#43) 2020-12-14 16:00:46 -08:00
Package.swift MOBILESDK-318: Add StripeCore dependency to Stripe (#273) 2021-07-01 13:46:14 -07:00
README.md Change fastlane lane to stripeios_tests (#307) 2021-07-28 11:53:22 -07:00
STYLEGUIDE.md Move each example app into its own directory 2021-03-23 15:53:40 -07:00
Stripe-umbrella.h Release 3DS2 framework source code (#62) 2021-01-05 16:50:08 -08:00
Stripe.podspec run update_version.sh 2021-07-07 13:35:45 -07:00
StripeCore.podspec run update_version.sh 2021-07-07 13:35:45 -07:00
VERSION Bump 21.6.0 -> 21.7.0 2021-07-07 13:35:45 -07:00
ui-examples.png

README.md

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 users input.

Native UI: We provide native screens and elements to collect payment details. For example, PaymentSheet is a prebuilt UI that combines all the steps required to pay - collecting payment details, billing details, and confirming the payment - into a single sheet that displays on top of your app.

Card scanning: We support card scanning on iOS 13 and higher. See our Card scanning section.

Localized: We support the following localizations: Chinese (Hong Kong), Chinese (Simplified), Chinese (Traditional), Danish, Dutch, English (US), English (United Kingdom), Finnish, French, French (Canada), German, Hungarian, Italian, Japanese, Korean, Maltese, Norwegian Bokmål, Norwegian Nynorsk (Norway), Portuguese (Brazil), Portuguese, Russian, Spanish, Spanish (Latin America), Swedish, and Turkish.

If you're selling digital products or services that will be consumed within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use Apple's in-app purchase APIs. See the App Store review guidelines for more information. For all other scenarios you can use this SDK to process payments via Stripe.

Releases

We support Cocoapods, Carthage, and Swift Package Manager. If you link the library manually, use a version from our releases page. Make sure to embed both Stripe.xcframework and Stripe3DS2.xcframework.

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 11 or later and is compatible with apps targeting iOS 11 or above. We support Catalyst on macOS 10.15 or later.

For iOS 10 support, please use v19.4.0. If you need to support iOS 9, use v17.0.2.

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

  • Prebuilt UI
    • This example demonstrates how to build a payment flow using our prebuilt UI component integration PaymentSheet.
  • Non-Card Payment Examples
    • This example demonstrates how to use STPAPIClient to manually accept various non-card payment methods.

Card scanning

Our new PaymentSheet UI offers built-in card scanning. To enable card scanning, you'll need to set NSCameraUsageDescription in your application's plist, and provide a reason for accessing the camera (e.g. "To scan cards"). Card scanning is supported on devices with iOS 13 or higher.

You can demo this feature in our PaymentSheet example app. 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 0.37 or later (if you have homebrew installed, brew install carthage)
  2. From the root of the repo, run bundle install && bundle exec fastlane stripeios_tests. This will install the test dependencies and run the tests.
  3. Once you have run this once, you can also run the tests in Xcode from the StripeiOS target in Stripe.xcworkspace. Make sure to use the iPhone 8, iOS 13.7 simulator so the snapshot tests will pass.

Migrating from Older Versions

See MIGRATING.md