Ravi
Ravi

Reputation: 1102

Stripe implementation in flutter

I need to implement Stripe payment gateway in one of my application, is there any plugin or something I can use to add card and charge customers for some service. If anyone having any references please suggest. I have gone through some tutorials and plugin but none of them are as per my requirement some plugin allows only to add a card but I am unable to find the plugin that can manage payments with the Stripe.

Upvotes: 2

Views: 2883

Answers (3)

minkey io
minkey io

Reputation: 21

This is best done in Firebase using cloud functions, rather than from the app. Find links below for more info on how to do this:

For these reasons:

  1. There's the security aspect and one of these links explains it's not a great idea to have your stripe secret inside your client.

  2. I want to be able to make this available from flutterweb, as well as other devices. Flutterweb is currently not yet supported by any plugin. The plugin that's best evolved and most used is https://pub.dev/packages/stripe_payment. Flutter-web has not been released yet (more, see https://github.com/jonasbark/flutter_stripe_payment/pull/147)

Upvotes: 0

M4trix Dev
M4trix Dev

Reputation: 2284

You can use stripe_payment plugin

Here is an article showing you how to do implement payment in flutter using firebase and stripe

https://medium.com/@info_4766/build-a-marketplace-in-your-flutter-app-and-accept-payments-using-stripe-and-firebase-59f074201718

Upvotes: 1

Doradus
Doradus

Reputation: 361

After successfully adding card, you will get a response with a token.

Pass that token to your backend server, you could call charge.create(it depends on your backend language, check stripe documentations) function to make the actual charge and other stuff.

Upvotes: 2

Related Questions