Stripe Payment Gateway Integration in Flutter

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024
  • In this short video tutorial, we'll guide you through adding Stripe as the payment gateway for your next Flutter app!
    I will cover everything from setting up a new project to processing donations. You'll learn how to:
    Set up your project (including dependency management)
    Integrate Stripe using the flutter_stripe plugin
    Design a simple payment interface for donations
    Handle payment processing with Stripe's Payment Intents
    Display success and failure messages with Snackbars
    By the end, you'll have a basic Flutter app that allows users to enter donation amounts, pay securely through Stripe, and receive confirmation messages.
    ⏳ Timestamps :
    00:39 Create a new flutter project
    01:03 Add Stripe dependency to your project
    07:45 UI Implementation part
    18:49 Adding Functionality
    25:14 Call the payment intent stripe api
    🌐 Important Links
    dashboard.stri...
    docs.stripe.co...
    docs.stripe.co...
    docs.page/flut...
    👨‍💻 Source Code :
    github.com/Sne...
    🎓Join our discord community:
    / discord
    😍 Thanks for watching , hope you will find this video useful.

ความคิดเห็น • 43

  • @MrAwaisChand
    @MrAwaisChand หลายเดือนก่อน +1

    i am facing that kind of issue when i run my flutter project or hot restart the app: Error loading .env file or initializing Stripe: Instance of 'FileNotFoundError'

    • @Snehasis4321
      @Snehasis4321  หลายเดือนก่อน

      Make sure that you have done this steps -
      1) created the .env file and also added your stripe published and secret key on that
      2) and also you have added .env in assets of pubspec.yaml file.
      Just verify once and tell

  • @minhthuandang369
    @minhthuandang369 6 หลายเดือนก่อน +1

    thank you so much for this video, can you do the tutorial how to save it on firebase with cloud funtion?

  • @increasedw
    @increasedw 5 หลายเดือนก่อน +2

    Thanks. Worked for me. If you're implementing this in an existing project with a lot of dependencies then chances are you are going to do the chicken dance with Gradle till you find something that works.

    • @wardirashid8874
      @wardirashid8874 5 หลายเดือนก่อน

      I am going through this now 😂😂😂

    • @kareem5655
      @kareem5655 4 หลายเดือนก่อน

      What do you mean ?

  • @rahulagarwal968
    @rahulagarwal968 6 หลายเดือนก่อน +1

    Hi. If I have to implement a monthly or yearly subscription model for my mobile application. Then is it mandatory to use In-App-Purchases ? I mean we cannot use an external payment gateway. How Netflix is redirecting users to its website to avoid 30% fees. Please talk about this.

    • @Snehasis4321
      @Snehasis4321  6 หลายเดือนก่อน

      If you accepting payments within your app then you need to pay 30% for each payment this cant be avoided.
      If you ask users to subscribe from your website you don't need to pay 30%.
      Remember you cannot redirect the user from your app to website for payment this will violate policy.
      In case of Netflix they urge users to subscribe through their website.

    • @rahulagarwal968
      @rahulagarwal968 6 หลายเดือนก่อน +1

      @@Snehasis4321 Thank you ! Bdw if possible please make a video on this in future how to implement or ask user to pay from website. I mean a flutter basic app for both mobile and website. Because 30% fee is a concern.

  • @VarunMalik-mo6mr
    @VarunMalik-mo6mr 3 หลายเดือนก่อน

    Bro don’t stop to make such a high quality video ❤️

  • @ConectaIdeas
    @ConectaIdeas 3 หลายเดือนก่อน

    Thank you so much, with your help i can do all the installation of needed changes gradle, etc

  • @vishalgandhi9242
    @vishalgandhi9242 3 หลายเดือนก่อน

    thanks for your video, i tried from lots of video but this works like charmmmm ;)

  • @jordannyambe5563
    @jordannyambe5563 2 หลายเดือนก่อน

    Such a great tutorial! Can we get google and Apple Pay integration in Part 2?

  • @MichelangeloTurillo
    @MichelangeloTurillo 5 หลายเดือนก่อน

    Hi thanks for your precious help! I have just a question, why do you use the enableOnBackInvokedCallback ? What is the needs?

    • @Snehasis4321
      @Snehasis4321  5 หลายเดือนก่อน

      enableOnBackInvokedCallback is used for gesture of the back button that we press on the android app to go back or exit the app.

    • @MichelangeloTurillo
      @MichelangeloTurillo 5 หลายเดือนก่อน

      @@Snehasis4321 Ok but if it is set to true the back to the previous route closes the app and it doesn't redirect the user to the previous page. Try the pushNamed() method to see the effect. Furthermore the parameter customerEphemeralKeySecret is not inside the result of the API of the paymentIntent, where do you get this information?

  • @naveedrajput6991
    @naveedrajput6991 22 วันที่ผ่านมา

    can you tell how can we save card info using stripe?????????????

  • @tallesprog
    @tallesprog 6 หลายเดือนก่อน

    please help me , i've tryed everything , but i keed having the error:
    Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
    i've no idea how to fix, i've already tryed everything

    • @smuhammadtayabain507
      @smuhammadtayabain507 5 หลายเดือนก่อน +1

      update the java version

    • @thodorissamaras2791
      @thodorissamaras2791 4 หลายเดือนก่อน

      i had the same problem and i modified app/build.gradle
      compileOptions {
      sourceCompatibility JavaVersion.VERSION_17
      targetCompatibility JavaVersion.VERSION_17
      }
      kotlinOptions {
      jvmTarget = '17'
      }
      thanks to chat gpt 😅

  • @azeemhussain1109
    @azeemhussain1109 5 หลายเดือนก่อน

    Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
    Your current JDK is located in C:\Program Files\Android\Android Studio\jre
    You can try some of the following options:
    - changing the IDE settings.
    - changing the JAVA_HOME environment variable.
    - changing `org.gradle.java.home` in `gradle.properties`.
    I am getting this error

    • @Snehasis4321
      @Snehasis4321  5 หลายเดือนก่อน

      Make sure that you have Java installed on your system, and the error suggest it searching Java from the android folder not the system, so to fix you need to modify file gradle.properties file
      `org.gradle.java.home=C:\Program Files\{your system Java path}` add this in gradle.properties and try again

  • @SubramanyanS-x3t
    @SubramanyanS-x3t 2 หลายเดือนก่อน

    hey man stripe payment not available inida? i cant signup with india as country dont know why it showing you need invitation

    • @Snehasis4321
      @Snehasis4321  2 หลายเดือนก่อน

      If you have an old verified account then it will work, but for now due to rbi regulations they stopped new account sign up, they will again open after they comply with rbi regulations. You can create test account and key, but cannot deploy it to production. I am also facing the same problem 😔.

    • @SubramanyanS-x3t
      @SubramanyanS-x3t 2 หลายเดือนก่อน

      @@Snehasis4321 iam not looking for production its for learning purpose even for testing they are not allowing i signed with another country and got the test key

  • @bluehydrogen1
    @bluehydrogen1 5 หลายเดือนก่อน

    Thanks for tutorial. lots of knowledge

  • @AbhayKumar-op3pb
    @AbhayKumar-op3pb 6 หลายเดือนก่อน

    When i click on pay button it goes to browser mode and when comes back it says something went wrong
    The error i captured in console is aw_browser_terminator

    • @Snehasis4321
      @Snehasis4321  6 หลายเดือนก่อน

      This should not be happening, it should open and intent within the app, can you tell your Android version so that I can replicate the error?

  • @karmavisualz
    @karmavisualz 4 หลายเดือนก่อน

    anyone receiving a ':flutter_credit_card' namespace error?

  • @Hamza-dw4iw
    @Hamza-dw4iw 2 หลายเดือนก่อน

    great tutorial

  • @sanjaynp2126
    @sanjaynp2126 5 หลายเดือนก่อน

    bro here we dont need to implement firebase cloud functions?

    • @Snehasis4321
      @Snehasis4321  5 หลายเดือนก่อน

      No it is not required here

  • @daniyallodhi7765
    @daniyallodhi7765 4 หลายเดือนก่อน

    what is your jdk version?

    • @Snehasis4321
      @Snehasis4321  4 หลายเดือนก่อน

      Actually you need to edit this gradle.properties otherwise It will not work.
      org.gradle.java.home=C:/Program Files/Java/jdk17 [replace with your path]
      android.useAndroidX=true
      android.enableJetifier=true
      org.gradle.jvmargs=-Xmx4G

    • @daniyallodhi7765
      @daniyallodhi7765 4 หลายเดือนก่อน

      @@Snehasis4321 thanks bro it is running now i was not adding the package on Activity file

  • @ishasingh6726
    @ishasingh6726 6 หลายเดือนก่อน

    what about the production mode like what would be the changes

    • @Snehasis4321
      @Snehasis4321  6 หลายเดือนก่อน +2

      if you change it to production mode only your publisher key and secret key will change, and you need to replace them with the test ones, else everything will be the same.

  • @askwhykartik
    @askwhykartik 5 หลายเดือนก่อน

    thanks brother really helpful

  • @CodingSanjeevani
    @CodingSanjeevani 4 หลายเดือนก่อน

    thank you so much for this video.

  • @pratikpatrimath4887
    @pratikpatrimath4887 3 หลายเดือนก่อน

    Thanks brother.👍

  • @hassanahmadansari8269
    @hassanahmadansari8269 5 หลายเดือนก่อน

    Thank you soo much Sir ❤

  • @msrecords6354
    @msrecords6354 2 หลายเดือนก่อน

    Worked 🎉