How stripe/stripe-ios works
Stripe iOS SDK is a modular client library for collecting payment and identity data, invoking Stripe APIs, and presenting native authentication or connected-account flows. The primary payment path is an app embedding PaymentSheet (or custom UI), collecting details, then using StripePayments/StripeCore to communicate with Stripe and invoking authentication when required. README documents the broad capabilities; sampled source confirms selected internal behavior, but most module relationships are represented only at module level, not as verified call chains.
Main entry points: STPAPIClient.swift API client · PaymentSheet.swift PaymentSheet · DocumentCaptureViewController.swift Document capture · CameraSession.swift Camera session
Components 28
Payment experiences
- PaymentSheet
StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheet.swift - Sheet flow controller
StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetFlowController.swift - Payment form UI
StripePaymentsUI/StripePaymentsUI/Source - Link
StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/Link/LinkController.swift
Payments runtime
- Payments API
StripePayments/StripePayments/Source/API Bindings - Payment method model
StripePayments/StripePayments/Source/API Bindings/Models/PaymentMethods/STPPaymentMethod.swift - Intent authentication
StripePayments/StripePayments/Source/Internal/IntentConfirmationChallengeViewController.swift - 3DS2 authentication
Stripe3DS2/Stripe3DS2 - Apple Pay
Stripe/StripeiOS/Source/STPApplePayContextDelegate.swift
Account experiences
- Financial Connections
StripeFinancialConnections/StripeFinancialConnections/Source/Native/NativeFlowController.swift - Connections web flow
StripeFinancialConnections/StripeFinancialConnections/Source/Web/FinancialConnectionsWebFlowViewController.swift - Connect components
StripeConnect/StripeConnect/Source/Internal/Webview/ConnectComponentWebViewController.swift - Issuing
StripeIssuing/StripeIssuing/Source/STPEphemeralKeyManager.swift
Identity and scanning
- Identity flow
StripeIdentity/StripeIdentity/Source/NativeComponents/Coordinators/VerificationSheetFlowController.swift - Document capture
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController.swift - Document upload
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentFileUploadViewController.swift - Selfie capture
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/SelfieCaptureViewController.swift - Document scan output
StripeIdentity/StripeIdentity/Source/NativeComponents/Coordinators/ImageScanner/DocumentScanner/DocumentScannerOutput.swift - Camera session
StripeCameraCore/StripeCameraCore/Source/Coordinators/CameraSession.swift - Card scanning
StripeCardScan/StripeCardScan/Source/CardVerify/Card Image Verification/ScannedCard.swift
Shared SDK core
- API client
StripeCore/StripeCore/Source/API Bindings/STPAPIClient.swift - API configuration
StripeCore/StripeCore/Source/API Bindings/StripeAPI.swift - Analytics client
StripeCore/StripeCore/Source/Analytics/STPAnalyticsClient.swift - JSON decoding
StripeCore/StripeCore/Source/Coder/StripeJSONDecoder.swift - UI controls
StripeUICore/StripeUICore/Source/Controls/Button.swift
Other components
- Integrating app
- Stripe services
- Apple Pay services
Connections 25
- Integrating app → PaymentSheet: presents
README.md - Integrating app → Payment form UI: builds custom UI
README.md - Integrating app → Apple Pay: integrates
README.md - PaymentSheet → API client: uses APIs
- Sheet flow controller → PaymentSheet: coordinates
StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetFlowController.swift - PaymentSheet → Link: offers
- Payments API → Payment method model: exposes
- Payments API → API client: uses client
- API client → Stripe services: sends requests
- API client → API configuration: uses settings
StripeCore/StripeCore/Source/API Bindings/STPAPIClient.swift - Intent authentication → 3DS2 authentication: launches
- Apple Pay → Apple Pay services: authorizes
README.md - Financial Connections → API client: uses API
- Financial Connections → Connections web flow: offers web flow
- Connect components → Stripe services: loads components
- Identity flow → Document capture: coordinates capture
- Document capture → Camera session: starts scanning
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController.swift - Document capture → Document scan output: processes frames
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController.swift - Document capture → Document upload: uploads images
StripeIdentity/StripeIdentity/Source/NativeComponents/ViewControllers/DocumentCaptureViewController.swift - Identity flow → Selfie capture: coordinates capture
- Selfie capture → Camera session: uses camera
- Card scanning → Camera session: uses camera
- UI controls → PaymentSheet: supports UI
- Analytics client → Stripe services: sends telemetry
StripeCore/StripeCore/Source/Analytics/STPAnalyticsClient.swift - JSON decoding → API client: decodes responses
StripeCore/StripeCore/Source/API Bindings/STPAPIClient.swift