Stripe iOS SDK: Swift Payments & Apple Pay
Stripe iOS SDK is Stripe's official Swift library for accepting payments and Apple Pay inside an iOS app, with modules for identity checks and bank linking. PaymentSheet handles card collection and 3D Secure, so checkout ships as one sheet instead of a hand-rolled form. Reach for it on a Stripe merchant account; skip it if you're selling goods consumed inside the app, since that needs Apple's own in-app purchase APIs instead.
What is the Stripe iOS SDK?
Stripe iOS SDK is a Swift library published by Stripe at stripe/stripe-ios for collecting payments, running Apple Pay, verifying identity, and pulling financial account data in an iOS app. It ships as separate modules: StripePaymentSheet for prebuilt checkout UI, StripePayments for low-level API bindings, plus StripeApplePay, StripeIdentity, and StripeFinancialConnections. It targets iOS 15 and above, with an older release for iOS 13 or 14.
Key Features for iOS Payments
- ✓PaymentSheet packages card entry, billing details, and payment confirmation into one embeddable sheet, per the README, instead of three separate screens you'd otherwise build yourself.
- ✓Apple Pay support ships through the StripeApplePay module, with a lighter version of it built specifically for App Clips.
- ✓3D Secure runs automatically when Strong Customer Authentication rules in Europe require it, so you're not writing separate SCA logic.
- ✓StripePayments exposes the low-level Stripe API bindings directly, including STPCardValidator for validating card input if you build a custom form instead of using PaymentSheet.
- ✓StripeIdentity captures ID documents and selfies for Stripe's Identity API, and StripeFinancialConnections links a user's bank account to a Stripe merchant account.
- ✓Card scanning is built into PaymentSheet: turn it on by adding an NSCameraUsageDescription string to your app's plist.
- ✓The SDK's built-in screens are localized into dozens of languages listed in the README, including Vietnamese, French, German, Japanese, and Korean.
Getting Started with Installation
Stripe iOS SDK installs through Cocoapods or Swift Package Manager, both officially supported per the README. Linking the frameworks manually instead means pulling a tagged release from the GitHub releases page and embedding every required xcframework for the module in use; for the core Stripe module that's Stripe, Stripe3DS2, StripeApplePay, StripePayments, StripePaymentsUI, StripeFinancialConnectionsLite, StripeIssuing, StripeCore, and StripeUICore. The SDK targets apps built for iOS 15 or later and works with any Xcode version Apple currently supports; Catalyst support starts at macOS 12. Apps that still need iOS 13 or 14 have to pin to the older 25.17.0 release instead of the current one.
Integrating Payments into Your App
Getting payments running starts with Stripe's own integration guides and the example projects in the repo rather than a quick inline snippet; the README points to the PaymentSheet Example project as the recommended starting point, plus a separate Non-Card Payment Examples project for payment methods outside PaymentSheet's flow. PaymentSheet itself accepts 10+ payment methods through a single integration, per the README, so most apps won't hand-write separate flows per method. Turning on card scanning is a one-line plist change: add NSCameraUsageDescription with a reason string, and PaymentSheet shows a Scan Card button automatically. For anything PaymentSheet doesn't cover, StripePayments exposes the underlying API client so you can build your own screens on top of it.
Strengths
- ✓PCI-sensitive data goes straight to Stripe instead of touching your own server, per the README, which cuts real compliance scope out of your backend.
- ✓PaymentSheet's single-sheet flow means less custom UI to build and test than hand-rolling card entry, billing address, and confirmation screens separately.
- ✓3D Secure and Strong Customer Authentication are handled automatically for European transactions.
- ✓MIT license, so there's no proprietary lock-in on the client code itself, even though production use still requires a Stripe account.
- ✓Modules split apart by capability (Identity, Financial Connections, Apple Pay, Connect), so you ship only the frameworks your app actually needs.
When Not to Use the SDK
- △This is a real Stripe SDK, not a sandbox toy: using it for actual payments requires an active Stripe account, and digital goods consumed inside the app must go through Apple's own in-app purchase APIs instead, per the README's own guidance and Apple's App Store review rules.
- △The README doesn't document a getting-started code snippet inline; you're sent to Stripe's external integration guides and the example projects before writing your first line of integration code.
- △Manual linking means embedding nine separate xcframeworks for the core Stripe module alone, more bookkeeping than a single Cocoapods or SPM dependency.
- △iOS 13 and 14 aren't supported by the current release; apps targeting those versions have to stay on the older 25.17.0 tag.
- △The SDK collects data for fraud prevention and product improvement, per its privacy section, so teams with strict data-minimization requirements should review what's collected before shipping.
Considering Apple's In-App Purchases
Frequently Asked Questions
Stripe iOS SDK targets apps built for iOS 15 or later, according to the README, and works with any Xcode version Apple currently supports; Catalyst is supported starting at macOS 12. Apps still on iOS 13 or 14 need the older 25.17.0 release instead of the current SDK.
Stripe iOS SDK supports Apple Pay through its StripeApplePay module, which the README also offers in a lighter version built specifically for App Clips.
Stripe iOS SDK is built for PCI compliance: card details go straight to Stripe's servers rather than touching yours, which the README says keeps your own backend out of PCI scope.
Stripe iOS SDK is not the right tool for digital goods or services consumed inside your app, like subscriptions or in-game currency; Apple's App Store review guidelines require Apple's own in-app purchase APIs for that case, per the README's recommended-usage note. Stripe iOS SDK covers other payment scenarios instead.
Stripe iOS SDK is released under the MIT license, listed in the repository's LICENSE file and on its GitHub page.
Stripe iOS SDK's built-in screens are localized into dozens of languages, including Vietnamese, French, German, Japanese, and Korean among others listed in the README, so PaymentSheet doesn't need separate translation work for those locales.
The problem it solves
Handling card numbers directly inside an iOS app usually means taking on PCI scope yourself and writing 3D Secure logic by hand for European customers, and Apple's App Store rules add a second wrinkle: digital goods consumed inside the app aren't allowed to go through Stripe or any outside processor at all, only Apple's own in-app purchase APIs. Stripe iOS SDK's own README draws that line explicitly: in-app-consumed goods go through Apple, and everything else can run through this SDK, which sends sensitive card data straight to Stripe instead of your server and builds the SCA-compliant checkout UI through PaymentSheet.
Best use cases
- •Adding a checkout flow to an iOS app that already has a Stripe merchant account, using PaymentSheet instead of building card entry UI from scratch.
- •Building a custom payment form while still relying on Stripe's validation and API layer through StripePayments and STPCardValidator.
- •Verifying a user's government ID and selfie inside the app through StripeIdentity.
- •Linking a user's bank account for payouts or balance checks through StripeFinancialConnections.
- •Shipping a lightweight Apple Pay button inside an App Clip using the StripeApplePay module on its own.
Who should try it — and who should skip
Try Stripe iOS SDK if your app already runs on a Stripe merchant account and you want native Apple Pay, card scanning, and SCA-ready checkout without writing that compliance logic yourself. PaymentSheet gets you there fastest; StripePayments is there if you need a custom UI instead. Skip it if you're selling anything consumed inside the app, like subscriptions or in-game currency, since Apple's in-app purchase APIs are the required route there. Also skip it if you don't have or don't want a Stripe account, since the SDK is built specifically around Stripe's own API.
Related repositories
Still deciding about stripe-ios?
One click hands the question to an AI along with this page — see what it says about stripe-ios.
