stripe_android 패키지는 Flutter의 Stripe 통합을 위한 안드로이드 전용 구현을 제공하여 안드로이드 기기에서 원활한 결제 처리를 가능하게 합니다. 이 패키지는 보다 포괄적인 flutter_stripe SDK의 플랫폼 계층으로서 작동하며, Stripe의 결제 인프라스트럭처와의 네이티브 안드로이드 상호작용을 처리합니다. 이 패키지는 안드로이드 대상의 Flutter 앱 내에서 안전하고 신뢰할 수 있으며 일관된 결제 흐름을 보장하며, 카드 결제, 토큰화 및 결제 시트 통합과 같은 기능을 지원합니다. 핵심 flutter_stripe 패키지 및 공유 인터페이스와 함께 작동하도록 설계되었습니다.
사용 사례
Android 전용 Flutter 앱에서 Stripe 결제 통합
안드로이드에서 신용카드/직불카드 결제 처리
Android 앱에서 Stripe Payment Sheet 사용하기
결제 정보의 안전한 토큰화 활성화
Android에서 모바일 체크아웃 흐름 지원
주요 기능
네이티브 안드로이드 구현
안전한 결제 처리
flutter_stripe 핵심과의 통합
Stripe 결제 시트 지원
민감한 데이터의 토큰화
적합한 대상
Android 결제 앱을 구축하는 Flutter 개발자
PCI DSS 기준 준수를 요구하는 앱
flutter_stripe SDK를 사용하는 프로젝트
Stripe 기능을 갖춘 Android를 타겟으로 하는 개발자
고려 사항
flutter_stripe 핵심 패키지 필요
Android 전용 설정이 필요합니다
독립형이 아님; 플랫폼 인터페이스에 의존함
안드로이드 플랫폼에 한정
스트라이프의 보안 최선의 실천 방식을 따라야 합니다
원본 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.