stripe_checkout 패키지는 Android, iOS 및 웹 플랫폼에서 원활한 Stripe Checkout 결제 페이지를 생성할 수 있도록 해줍니다. 안전한 결제 인프라와 직접 통합되어 사용자가 앱이나 브라우저를 벗어나지 않고도 거래를 완료할 수 있습니다. Flutter용으로 제작되었으며, 일회성 결제, 구독, 사용자 정의 체크아웃 흐름을 쉽게 구현할 수 있게 해줍니다. 이 패키지는 토큰화 및 보안 데이터 전송을 처리하여 PCI 준수 부담을 줄여줍니다. 빠르고 신뢰할 수 있으며 브랜드에 맞는 결제 경험을 필요로 하는 앱에 이상적입니다.
사용 사례
일회성 결제
구독 결제
전자상거래 통합
모바일 및 웹 체크아웃
사용자 지정 결제 흐름
주요 기능
안전한 스토어 체크아웃 통합
크로스 플랫폼 지원 (Android, iOS, Web)
결제 시작을 위한 간단한 API
내장된 토큰화
브랜드화된 결제 경험
적합한 대상
결제가 필요한 Flutter 앱
전자상거래 플랫폼
SaaS 구독 서비스
결제가 필요한 웹 및 모바일 앱
PCI 준수 솔루션을 찾는 개발자
고려 사항
Stripe 계정이 필요합니다
웹을 위해 적절한 백엔드 설정이 필요합니다
완전한 Stripe SDK에 비해 사용자 지정 옵션이 제한적
인터넷 연결에 의존합니다
환불 및 웹훅 처리를 위해 추가적인 조치가 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Flutter Stripe
The Stripe Flutter SDK allows you to build delightful payment experiences in your native Android and iOS apps using Flutter. We provide powerful and customizable UI screens and elements that can be used out-of-the-box to collect your users' payment details.
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.
Google Pay: The plugin can easily act as payment provider for the Pay plugin that enables you to seamlessly integrate Google Pay or Apple Pay. All you need to do is add your stripe publishable key to the payment profile.
Payment methods: Accepting more payment methods helps your business expand its global reach and improve checkout conversion.
Native UI: We provide native screens and elements to securely collect payment details on Android and iOS.
Pre-built payments UI: Learn how to integrate Payment Sheet, the new pre-built payments UI for mobile apps. This pre-built UI lets you accept cards, Apple Pay, and Google Pay out of the box, and includes support for saving & reusing cards.
Recommended usage
If you're selling digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. This does not apply to app developers in the USA as they are excluded by new court ruling in 2025. See Apple's and Google's guidelines for more information. For all other scenarios you can use this SDK to process payments via Stripe.
Installation
dart pub add flutter_stripe
Requirements
Android
This plugin requires several changes to be able to work on Android devices. Please make sure you follow all these steps:
Rebuild the app, as the above changes don't update with hot reload
These changes are needed because the Android Stripe SDK requires the use of the AppCompat theme for their UI components and the Support Fragment Manager for the Payment Sheets
If you are having troubles to make this package to work on Android, join this discussion to get some support.
iOS
Compatible with apps targeting iOS 13 or above.
To upgrade your iOS deployment target to 13.0, you can either do so in Xcode under your Build Settings, or by modifying IPHONEOS_DEPLOYMENT_TARGET in your project.pbxproj directly.
You will also need to update in your Podfile:
platform :ios, '13.0'
For card scanning add the following to your Info.plist:
<key>NSCameraUsageDescription</key><string>Scan your card to add it automatically</string><key>NSCameraUsageDescription</key><string>To scan cards</string>
Web
Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. Namely:
Note: Stripe is sunsetting CardField and CardForm in favor of PaymentSheet. We recommend using PaymentSheet for all new integrations. See Stripe's documentation for more details.
We also support the Customer Sheet and the Address sheet mobile elements to collect and manage customer payment methods and addresses.
Financial connections
We also support Financial connections in our latest sdk. Check out the docs to learn more on how to set it up.
Deep linking & coexistence with other deep-link plugins
Redirect-based payment methods (Link, iDEAL, Bancontact, PayPal, etc.) send the user out to a browser and back to your app via a returnURL. On iOS, flutter_stripe registers an app- and scene-delegate and forwards incoming URLs to the Stripe SDK. For URLs that are not a pending Stripe redirect it returns false and does not consume them — it does not block app_links, uni_links, go_router, or any other URL handler.
If a deep-link plugin stops receiving links after adding flutter_stripe, it is almost always one of the following (none of which is flutter_stripe consuming the URL):
app_links version. On apps using UISceneDelegate (the Flutter default since 3.41), use app_links >= 7.0.0, which registers a scene delegate. Older versions only register an app delegate and never receive scene:openURLContexts:.
FlutterDeepLinkingEnabled. If it is true in Info.plist, Flutter's own router may handle the URL. Either set it to false, or forward only your Stripe URLs from your router/deep-link handler (see below) and let everything else flow to your routes.
Scheme/returnURL mismatch. Make sure CFBundleURLSchemes, Stripe.urlScheme, and your PaymentSheet returnURL all use the same scheme.
To complete a Stripe redirect while your app owns deep linking, forward matching URLs to Stripe.instance.handleURLCallback():
// e.g. from your app_links / go_router listenerif (uri.scheme == 'yourappscheme' && uri.host == 'safepay') {
awaitStripe.instance.handleURLCallback(uri.toString());
}
A full example (router-based, deep-link-package-based, and the FlutterDeepLinkingEnabled=false approach) is in example/lib/main.dart. See also Stripe.instance.handleURLCallback in the Dart API.
Stripe initialization
To initialize Stripe in your Flutter app, use the Stripe base class.
Stripe offers publishableKey, stripeAccountId, threeDSecureParams and merchantIdentifier. Only publishableKey is required.
Dart API
The library offers several methods to handle stripe related actions:
The example app offers examples on how to use these methods.
Pay Plugin support
flutter_stripe fully supports the Pay plugin from the Google Pay team. By including a few lines you can integrate Stripe as a payment processor for Google / Apple Pay:
Future<void> onGooglePayResult(paymentResult) async {
final response = awaitfetchPaymentIntentClientSecret();
final clientSecret = response['clientSecret'];
final token = paymentResult['paymentMethodData']['tokenizationData']['token'];
final tokenJson = Map.castFrom(json.decode(token));
final params = PaymentMethodParams.cardFromToken(
token: tokenJson['id'],
);
// Confirm Google pay payment methodawaitStripe.instance.confirmPayment(
clientSecret,
params,
);
}
Run the example app
Navigate to the example folder cd example
Install the dependencies
flutter pub get
Set up env vars for the flutter app and a local backend.