[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9454":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":18,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},9454,"flutter_stripe","flutter-stripe\u002Fflutter_stripe","flutter-stripe","Flutter SDK for Stripe.","https:\u002F\u002Fpub.dev\u002Fpackages\u002Fflutter_stripe",null,"Dart",1077,649,19,30,0,53.44,false,"main",[21,22,23],"dart","flutter","stripe","2026-06-12 04:00:44","\n\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F19904063\u002F116995247-20519e80-acda-11eb-8e1b-7d0efbd193ad.png\" height=\"36\" \u002F>\n\n\n# Flutter Stripe\n\n[![pub package](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fflutter_stripe.svg)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fflutter_stripe) ![build](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fflutter-stripe\u002Fflutter_stripe\u002Fall_plugins.yaml?logo=github?branch=main)\n\nThe 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.\n\n\n![stripe-flutter_cover](https:\u002F\u002Fuser-images.githubusercontent.com\u002F19904063\u002F121511757-48bf6d80-c9e9-11eb-9674-0fec35e26ef5.png)\n\n\n\n## Features\n\n**Simplified Security**: We make it simple for you to collect sensitive data such as credit card numbers and remain [PCI compliant](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fsecurity#pci-dss-guidelines). This means the sensitive data is sent directly to Stripe instead of passing through your server. For more information, see our [Integration Security Guide](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fsecurity).\n\n**Apple Pay**: We provide a [seamless integration with Apple Pay](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fapple-pay).\n\n**Google Pay**: The plugin can easily act as payment provider for the [Pay plugin](#Pay-Plugin-support) 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.\n\n**Payment methods**: Accepting more [payment methods](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fpayments\u002Fpayment-methods\u002Foverview) helps your business expand its global reach and improve checkout conversion.\n\n**SCA-Ready**: The SDK automatically performs native [3D Secure authentication](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fpayments\u002F3d-secure) if needed to comply with [Strong Customer Authentication](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fstrong-customer-authentication) regulation in Europe.\n\n**Native UI**: We provide native screens and elements to securely collect payment details on Android and iOS.\n\n**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.\n\n#### Recommended usage\n\nIf 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](https:\u002F\u002Fdeveloper.apple.com\u002Fapp-store\u002Freview\u002Fguidelines\u002F#payments) and [Google's](https:\u002F\u002Fsupport.google.com\u002Fgoogleplay\u002Fandroid-developer\u002Fanswer\u002F9858738?hl=en&ref_topic=9857752) guidelines for more information. For all other scenarios you can use this SDK to process payments via Stripe.\n\n## Installation\n\n```sh\ndart pub add flutter_stripe\n```\n\n### Requirements\n\n#### Android\n\n\nThis plugin requires several changes to be able to work on Android devices. Please make sure you follow all these steps:\n\n1. Use Android 5.0 (API level 21) and above.\n2. Use Kotlin version 1.8.0 and above: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Fandroid\u002Fsettings.gradle#L22)\n3. Requires Android Gradle plugin 8 and higher\n4. Using a descendant of `Theme.AppCompat` for your activity: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Fandroid\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002Fvalues\u002Fstyles.xml#L15), [example night theme](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Fandroid\u002Fapp\u002Fsrc\u002Fmain\u002Fres\u002Fvalues-night\u002Fstyles.xml#L16)\n5. Using an up-to-date Android gradle build tools version: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Fandroid\u002Fsettings.gradle#L21) and an up-to-date gradle version accordingly: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Fandroid\u002Fgradle\u002Fwrapper\u002Fgradle-wrapper.properties#L4) \n6. Using `FlutterFragmentActivity` instead of `FlutterActivity` in `MainActivity.kt`: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002F79b201a2e9b827196d6a97bb41e1d0e526632a5a\u002Fexample\u002Fandroid\u002Fapp\u002Fsrc\u002Fmain\u002Fkotlin\u002Fcom\u002Fflutter\u002Fstripe\u002Fexample\u002FMainActivity.kt#L6)\n7. Add the following rules to your `proguard-rules.pro` file: [example](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmaster\u002Fexample\u002Fandroid\u002Fapp\u002Fproguard-rules.pro)  \n```proguard\n-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g\n-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args\n-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error\n-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter\n-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider\n-dontwarn kotlinx.parcelize.Parceler$DefaultImpls\n-dontwarn kotlinx.parcelize.Parceler\n-dontwarn kotlinx.parcelize.Parcelize\n# Keep Stripe classes\n-keep class com.stripe.** { *; }\n```\n\n8. Rebuild the app, as the above changes don't update with hot reload\n\nThese 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\n\nIf you are having troubles to make this package to work on Android, join [this discussion](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fdiscussions\u002F538) to get some support.\n\n#### iOS\n\nCompatible with apps targeting iOS 13 or above.\n\nTo 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.\n\nYou will also need to update in your Podfile:\n\n`platform :ios, '13.0'`\n\nFor card scanning add the following to your Info.plist:\n\n```xml\n\u003Ckey>NSCameraUsageDescription\u003C\u002Fkey>\n\u003Cstring>Scan your card to add it automatically\u003C\u002Fstring>\n\u003Ckey>NSCameraUsageDescription\u003C\u002Fkey>\n\u003Cstring>To scan cards\u003C\u002Fstring>\n```\n\n#### Web\n\nNow you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented. Namely:\n\n- Create paymentmethod\n- Confirm payment intent\n- Confirm setup intent\n- Create token\n\n### Supported widgets\n- [Confirm payment element](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Flib\u002Fscreens\u002Fpayment_sheet\u002Fpayment_element\u002Fplatforms\u002Fpayment_element_web.dart) (recommended way of handling payments on web)\n- [Express checkout](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002Fmain\u002Fexample\u002Flib\u002Fscreens\u002Fpayment_sheet\u002Fexpress_checkout\u002Fplatforms\u002Fexpress_checkout_element_web.dart)\n\nTo use Stripe on web, it is required to add `flutter_stripe_web` in your pubspec file\n\n### Running on WASM\n\nTo run the project with WebAssembly support:\n\n1. Build the web app with WASM:\n```sh\nflutter build web --wasm\n```\n\n2. Serve the built app with the required CORS headers:\n```sh\ndhttpd --path build\u002Fweb --headers \"Cross-Origin-Opener-Policy:same-origin,Cross-Origin-Embedder-Policy:credentialless\"\n```\n\n**Note:** The `dhttpd` package is required to serve the app with proper CORS headers. Install it with:\n```sh\ndart pub global activate dhttpd\n```\n\n## Usage\n\n### Card payments\n\nThere are 3 ways of handling card payments\n\nMethod        | Ease of use   | description                                                                                                      | Implementation docs |\n------------- | ------------- |----------------------------------------------------------------------------------------------------------------- | ------------------- |\nPayment sheet | Easy          | Our recommended way of handling payments. It offers localization, animations and error handling out of the box.  | [docs](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fsheet) |\nCardfield     | Medium        | Single line cardfield. Offers more flexibility but has less built-in functionality.                              | [docs](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fcard_field)   |\nCard form     | Medium        | Similar as the cardfield but the entry fields are spread across multi lines                                      | [docs](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fcard_field)   |\n\n> **Note:** Stripe is sunsetting CardField and CardForm in favor of PaymentSheet. We recommend using PaymentSheet for all new integrations. See [Stripe's documentation](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fpayments\u002Fpayment-sheet) for more details.\n\n### Wallets\nThis library fully supports native [Apple Pay](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fapple_pay) and [Google pay](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fgoogle_pay) integration.\n\n### Mobile elements\nWe also support the [Customer Sheet](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Fcustomer_sheet) and the [Address sheet](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Faddress_sheet) mobile elements to collect and manage customer payment methods and addresses.\n\n### Financial connections\nWe also support Financial connections in our latest sdk. Check out the [docs](https:\u002F\u002Fdocs.page\u002Fflutter-stripe\u002Fflutter_stripe\u002Ffinancial_connections) to learn more on how to set it up.\n\n## Stripe initialization\n\nTo initialize Stripe in your Flutter app, use the `Stripe` base class.\n\n`Stripe` offers `publishableKey`, `stripeAccountId`, `threeDSecureParams` and `merchantIdentifier`. Only `publishableKey` is required.\n\n## Dart API\n\nThe library offers several methods to handle stripe related actions:\n\n```dart\nFuture\u003CPaymentMethod> createPaymentMethod(...);\nFuture\u003CPaymentIntent> handleNextAction(...);\nFuture\u003CPaymentIntent> confirmPayment(...);\nFuture\u003Cvoid> configure3dSecure(...);\nFuture\u003Cbool> isApplePaySupported();\nFuture\u003Cvoid> presentApplePay(...);\nFuture\u003Cvoid> confirmApplePayPayment(...);\nFuture\u003CSetupIntent> confirmSetupIntent(...);\nFuture\u003CPaymentIntent> retrievePaymentIntent(...);\nFuture\u003CString> createTokenForCVCUpdate(...);\n\nFuture\u003Cvoid> initPaymentSheet(...);\nFuture\u003Cvoid> presentPaymentSheet(...);\nFuture\u003Cvoid> confirmPaymentSheetPayment()\n```\n\nThe example app offers examples on how to use these methods.\n\n## Pay Plugin support\n\nflutter_stripe fully supports the [Pay plugin](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fpay) from the Google Pay team. By including a few lines you can integrate Stripe as a payment processor for Google \u002F Apple Pay:\n\n```dart\nFuture\u003Cvoid> onGooglePayResult(paymentResult) async {\n    final response = await fetchPaymentIntentClientSecret();\n    final clientSecret = response['clientSecret'];\n    final token = paymentResult['paymentMethodData']['tokenizationData']['token'];\n    final tokenJson = Map.castFrom(json.decode(token));\n\n    final params = PaymentMethodParams.cardFromToken(\n      token: tokenJson['id'],\n    );\n    \u002F\u002F Confirm Google pay payment method\n    await Stripe.instance.confirmPayment(\n      clientSecret,\n      params,\n    );\n}\n```\n\n## Run the example app\n\n- Navigate to the example folder `cd example`\n- Install the dependencies\n  - `flutter pub get`\n- Set up env vars for the flutter app and a local backend.\n  - [Get your test Stripe API keys](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fkeys)\n  - `cp lib\u002F.env.example.dart lib\u002F.env.dart` and set your Stripe publishable key.\n  - `cp server\u002F.env.example server\u002F.env` and set the variable values in your newly created `.env` file.\n- Install the server dependencies in the `server` directory: \n  * `cd server`\n  * `npm install` or `yarn --cwd \"server\"`\n- Start the example\n  - Terminal 1: \n    * Move to the `server` directory: `cd server`\n    * Run npm or yarn: `npm start` or `yarn --cwd \"server\" start`\n  - Terminal 2: \n    * Move to the `lib` directory: `cd lib`\n    * Run flutter: `flutter run`\n\n##### Additional steps for webhook forwarding\n\n- [Install the `stripe-cli`](https:\u002F\u002Fstripe.com\u002Fdocs\u002Fstripe-cli)\n- Run `stripe listen --forward-to localhost:4242\u002Fwebhook`\n\n## Contributing\n\nYou can help us make this project better, feel free to open an new issue or a pull request. Make sure to follow our [contribution guidelines](https:\u002F\u002Fgithub.com\u002Fflutter-stripe\u002Fflutter_stripe\u002Fblob\u002FHEAD\u002FCONTRIBUTING.md).\n","flutter-stripe 是一个用于在 Flutter 应用中集成 Stripe 支付功能的 SDK。它提供了简化安全的数据收集方式，支持 Apple Pay 和 Google Pay，并且可以接受多种支付方法，帮助商家拓展全球业务。此外，该 SDK 符合 SCA（强客户认证）要求，自动处理 3D 安全验证，同时提供原生 UI 组件和预构建的支付界面，便于开发者快速实现支付功能。适用于需要在 Android 或 iOS 平台上为用户提供流畅支付体验的应用场景，如电子商务、订阅服务等。",2,"2026-06-11 03:22:55","top_language"]