Stripe Payment Gateway Integration in Flutter

Поделиться
HTML-код
  • Опубликовано: 25 ноя 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

  • @increasedw
    @increasedw 6 месяцев назад +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 6 месяцев назад

      I am going through this now 😂😂😂

    • @kareem5655
      @kareem5655 5 месяцев назад

      What do you mean ?

  • @minhthuandang369
    @minhthuandang369 8 месяцев назад +1

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

  • @VarunMalik-mo6mr
    @VarunMalik-mo6mr 4 месяца назад

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

  • @ConectaIdeas
    @ConectaIdeas 5 месяцев назад

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

  • @vishalgandhi9242
    @vishalgandhi9242 5 месяцев назад

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

  • @jordannyambe5563
    @jordannyambe5563 4 месяца назад

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

  • @bluehydrogen1
    @bluehydrogen1 6 месяцев назад

    Thanks for tutorial. lots of knowledge

  • @Hamza-dw4iw
    @Hamza-dw4iw 4 месяца назад

    great tutorial

  • @askwhykartik
    @askwhykartik 6 месяцев назад

    thanks brother really helpful

  • @MrAwaisChand
    @MrAwaisChand 3 месяца назад +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  3 месяца назад

      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

  • @rahulagarwal968
    @rahulagarwal968 8 месяцев назад +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  8 месяцев назад

      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 8 месяцев назад +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.

  • @CodingSanjeevani
    @CodingSanjeevani 5 месяцев назад

    thank you so much for this video.

  • @pratikpatrimath4887
    @pratikpatrimath4887 4 месяца назад

    Thanks brother.👍

  • @naveedrajput6991
    @naveedrajput6991 2 месяца назад

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

  • @hassanahmadansari8269
    @hassanahmadansari8269 6 месяцев назад

    Thank you soo much Sir ❤

  • @MichelangeloTurillo
    @MichelangeloTurillo 6 месяцев назад

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

    • @Snehasis4321
      @Snehasis4321  6 месяцев назад

      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 6 месяцев назад

      @@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?

  • @azeemhussain1109
    @azeemhussain1109 7 месяцев назад

    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  7 месяцев назад

      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

  • @msrecords6354
    @msrecords6354 4 месяца назад

    Worked 🎉

  • @tallesprog
    @tallesprog 7 месяцев назад

    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 6 месяцев назад +1

      update the java version

    • @thodorissamaras2791
      @thodorissamaras2791 5 месяцев назад

      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 😅

  • @ishasingh6726
    @ishasingh6726 7 месяцев назад

    what about the production mode like what would be the changes

    • @Snehasis4321
      @Snehasis4321  7 месяцев назад +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.

  • @karmavisualz
    @karmavisualz 5 месяцев назад

    anyone receiving a ':flutter_credit_card' namespace error?

  • @AbhayKumar-op3pb
    @AbhayKumar-op3pb 7 месяцев назад

    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  7 месяцев назад

      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?

  • @SubramanyanS-x3t
    @SubramanyanS-x3t 4 месяца назад

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

    • @Snehasis4321
      @Snehasis4321  4 месяца назад

      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 4 месяца назад

      @@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

  • @sanjaynp2126
    @sanjaynp2126 7 месяцев назад

    bro here we dont need to implement firebase cloud functions?

    • @Snehasis4321
      @Snehasis4321  7 месяцев назад

      No it is not required here

  • @daniyallodhi7765
    @daniyallodhi7765 5 месяцев назад

    what is your jdk version?

    • @Snehasis4321
      @Snehasis4321  5 месяцев назад

      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 5 месяцев назад

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