All Projects → flutter-stripe → flutter_stripe

flutter-stripe / flutter_stripe

Licence: other
Flutter SDK for Stripe.

Programming Languages

dart
5743 projects
swift
15916 projects
kotlin
9241 projects
typescript
32286 projects
java
68154 projects - #9 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to flutter stripe

Memberprism2
open source alternative to memberstack / memberspace , but with both front and backend member-only content protection
Stars: ✭ 171 (-75.22%)
Mutual labels:  stripe
Subscription Use Cases
Create subscriptions with fixed prices or usage based billing.
Stars: ✭ 215 (-68.84%)
Mutual labels:  stripe
switchboard-plug-wallet
Manage Payment Methods and related settings
Stars: ✭ 17 (-97.54%)
Mutual labels:  stripe
Spree gateway
Huge collection of payment gateways for @spree. Stripe, Braintree, Apple Pay, Authorize.net and many others!
Stars: ✭ 180 (-73.91%)
Mutual labels:  stripe
Buefy Shop
A sample shop built with Nuxt, Stripe, Firebase and Serverless Functions
Stars: ✭ 207 (-70%)
Mutual labels:  stripe
Omnipay Pingpp
A Ping++ driver for the Omnipay PHP payment processing library. 一个聚合了支付宝(APP、Wap、PC、即时到账、扫码、企业付款),微信(APP、公众号、红包), 银联网关、银联企业网银、Apple Pay、QQ 钱包、易宝支付、百度钱包、京东支付、京东白条、招行一网通、分期支付等国内主流支付渠道的聚合支付网关(Ping++, also known as Pingpp/Pingxx/Pingplusplus)
Stars: ✭ 227 (-67.1%)
Mutual labels:  stripe
Checkout Subscription And Add On
Uses Stripe Checkout to create a payment page that starts a subscription for a new customer.
Stars: ✭ 169 (-75.51%)
Mutual labels:  stripe
Stripe-Payment-For-Opencart-3.x
Stripe payment module for opencart 3.x
Stars: ✭ 29 (-95.8%)
Mutual labels:  stripe
React Express Stripe
💰 Minimal Boilerplate for Stripe used in React and Express. Charge payments from your customers with this project.
Stars: ✭ 209 (-69.71%)
Mutual labels:  stripe
Builderbook
Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.
Stars: ✭ 3,015 (+336.96%)
Mutual labels:  stripe
Stripe Billing Typographic
⚡️Typographic is a webfont service (and demo) built with Stripe Billing.
Stars: ✭ 186 (-73.04%)
Mutual labels:  stripe
Stripe
Typed .NET clients for stripe.com REST APIs
Stars: ✭ 193 (-72.03%)
Mutual labels:  stripe
Stripe Node
Node.js library for the Stripe API.
Stars: ✭ 2,887 (+318.41%)
Mutual labels:  stripe
Django Ecommerce
Ecommerce website built with Django 2.2.3, Python 3.7.3, Stripe and AWS
Stars: ✭ 173 (-74.93%)
Mutual labels:  stripe
accept-a-card-payment
Learn how to accept a basic card payment on web, iOS, Android
Stars: ✭ 348 (-49.57%)
Mutual labels:  stripe
Commerce billing
A payment processing library for Elixir
Stars: ✭ 170 (-75.36%)
Mutual labels:  stripe
Test Payment Cards
Cheatsheet of test payment cards for various payment gateways
Stars: ✭ 217 (-68.55%)
Mutual labels:  stripe
react-stripe-script-loader
A React Component that loads Stripe script if necessary and shows React Stripe Elements
Stars: ✭ 22 (-96.81%)
Mutual labels:  stripe
auction-website
🔨 A full-stack real-time auction website built using a microservices architecture
Stars: ✭ 71 (-89.71%)
Mutual labels:  stripe
Python For Entrepreneurs Course Demos
Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
Stars: ✭ 247 (-64.2%)
Mutual labels:  stripe

Flutter Stripe

pub package build

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.

stripe-flutter_cover

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.

Apple Pay: We provide a seamless integration with Apple Pay.

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.

SCA-Ready: The SDK automatically performs native 3D Secure authentication if needed to comply with Strong Customer Authentication regulation in Europe.

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. 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:

  1. Use Android 5.0 (API level 21) and above
  2. Use Kotlin version 1.5.0 and above: [example](https://github.com/flutter-stripe/flutter_stripe/blob/79b201a2e9b827196d6a97bb41e1d0e526632a5a/example/android/ .gradle#L2)
  3. Using a descendant of Theme.AppCompat for your activity: example, example night theme
  4. Using an up-to-date Android gradle build tools version: example and an up-to-date gradle version accordingly: example
  5. Using FlutterFragmentActivity instead of FlutterActivity in MainActivity.kt: example
  6. 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'

Web (Experimental)

Now you can use Stripe with Flutter web! Notice right now it is highly experimental and only a subset of features is implemented.

To use Stripe on web, it is required to add flutter_stripe_web in your pubspec file

Usage

Card payments

There are 3 ways of handling card payments

Method Ease of use description Implementation docs
Payment sheet Easy Our recommended way of handling payments. It offers localization, animations and error handling out of the box. docs
Cardfield Medium Single line cardfield. Offers more flexibility but has less built-in functionality. docs
Card form Medium Simular as the cardfield but the entry fields are spread across multi lines docs

Financial connections

We also support Financial connections in our latest sdk. Check out the docs to learn more on how to set it up.

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:

Future<PaymentMethod> createPaymentMethod(...);
Future<PaymentIntent> handleNextAction(...);
Future<PaymentIntent> confirmPayment(...);
Future<void> configure3dSecure(...);
Future<bool> isApplePaySupported();
Future<void> presentApplePay(...);
Future<void> confirmApplePayPayment(...);
Future<SetupIntent> confirmSetupIntent(...);
Future<PaymentIntent> retrievePaymentIntent(...);
Future<String> createTokenForCVCUpdate(...);

Future<void> initPaymentSheet(...);
Future<void> presentPaymentSheet(...);
Future<void> confirmPaymentSheetPayment()

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 = await fetchPaymentIntentClientSecret();
    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 method
    await Stripe.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.
    • Get your test Stripe API keys
    • cp lib/.env.example.dart lib/.env.dart and set your Stripe publishable key.
    • cp server/.env.example server/.env and set the variable values in your newly created .env file.
  • Install the server dependencies: npm install or yarn --cwd "server"
  • Start the example
    • Terminal 1: npm start or yarn --cwd "server" start
    • Terminal 2: flutter run
Additional steps for webhook forwarding

Contributing

You can help us make this project better, feel free to open an new issue or a pull request.

Setup

This project uses melos to manage all the packages inside this repo.

  • Install melos: dart pub global activate melos
  • Setup melos in your local folder: melos bootstrap
Useful commands
  • Format melos run format
  • Analyze melos run analyze
  • Test melos run unittest
  • Pub get melos run get
Publishing
  • Use melos version and melos publish to keep all the repositories in sync
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].