Stripe Checkout in Flutter

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

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

  • @fidev-makebeautifulapps1498
    @fidev-makebeautifulapps1498  4 ปีที่แล้ว +9

    Hey folks! Some of you mentioned that what I showed you in the video doesn't work for Stripe live, and I am sorry to say that it is true.
    HOWEVER! There is an easy solution to that, basically, we need to have our simple HTML deployed on the Https website and it will still work!
    I've put the same HTML in a repository (github.com/MarcinusX/test1/blob/main/index.html) and deployed it on GitHub pages (marcinusx.github.io/test1/index.html) and it worked on live! I've just paid myself 2 PLN :D I'm sorry for not checking it on live before publishing. Let me know if it works for you.

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว

      Thank you for mentioning and its working now 🙂

    • @averysalvador3379
      @averysalvador3379 3 ปีที่แล้ว

      You prolly dont care but if you guys are stoned like me during the covid times you can watch pretty much all the latest series on InstaFlixxer. Have been watching with my gf for the last couple of months xD

    • @karsonconor904
      @karsonconor904 3 ปีที่แล้ว

      @Avery Salvador definitely, I have been using instaflixxer for since november myself :)

    • @vanceelliott2704
      @vanceelliott2704 3 ปีที่แล้ว

      @Avery Salvador yup, I have been watching on InstaFlixxer for since november myself :D

    • @leehamza2943
      @leehamza2943 3 ปีที่แล้ว

      @Avery Salvador Definitely, I've been watching on InstaFlixxer for since december myself :)

  • @CodeWithAndrea
    @CodeWithAndrea 4 ปีที่แล้ว +4

    Awesome to see you making video content. You have so much valuable knowledge to share!

  • @johnpaulcarter7
    @johnpaulcarter7 3 ปีที่แล้ว

    Big thanks so far (from this beginner). Stripe have done an excellent job of improving the introductory documentation, but then the reader seems to be cast straight into API details. An explanatory step was missing and you seem to have provided it. I think it was a good idea to include the sort of thing one will be doing server-side with a simple local class, which gives one confidence to go ahead and complete the actual server code. Great stuff.

  • @aman7066
    @aman7066 3 ปีที่แล้ว

    We don't need to pass session id, we can directly pass the checkout url, that we get from the response from the server. BTW a great tutorial was looking for this for a long time, as the new flutter stripe package is in beta, and has a lot of bugs. I am happy I have found this video

  • @nleo1241
    @nleo1241 3 ปีที่แล้ว +5

    Hi there! Thanks for the tutorial. Is there any way to show the Google Pay/Apple Pay button that comes out of the box of Stripe Checkout?

  • @alexi.zemcov
    @alexi.zemcov 3 ปีที่แล้ว

    Thank you! i tried to do this for 2 days and found the solution in this video! I'm happy now!)

  • @azackmatoff2570
    @azackmatoff2570 3 ปีที่แล้ว

    Thanks for the video man, today there are flutter packages available and you can use them. But this video is helpful if you wanna use any payment gateway with webview. Thanks again

  • @craigholbrook3238
    @craigholbrook3238 2 ปีที่แล้ว

    Theres no need to return sessionId and inject JS into the flutter app. You also have access to the session URL and you can just open that in a webview

  • @jamesr2408
    @jamesr2408 ปีที่แล้ว

    How did the $priceId get translated into $49.99 value? Normally the backend should retrieve it from the DB, but I don't see it in the code.

  • @okeyshourovroy2769
    @okeyshourovroy2769 ปีที่แล้ว

    Can you please also do a video on 2checkout with flutter?

  • @harikrishan2641
    @harikrishan2641 3 ปีที่แล้ว

    Can you start a flutter tutorial series for absolute beginners in the field
    starting from Basic to intermediate to advance to production level ?

  • @abin6909
    @abin6909 ปีที่แล้ว

    This doesn't work since webview uses s and stripe checkout is not supported in s. Are there any alternatives?

  • @mamounbashier7417
    @mamounbashier7417 3 ปีที่แล้ว +1

    Kindly, Is this Stripe , Free to use . ? and how to link to bank account for ex.

  • @user-us3pn5rt2g
    @user-us3pn5rt2g 3 ปีที่แล้ว

    Amazing tutorial. But I am wondered is there way to save input about card somehow and do not input every time.

  • @jodeveloper08
    @jodeveloper08 4 ปีที่แล้ว +1

    Thanks a lot 😍♥️...
    Can you make a video for push notification without Firebase 😅

  • @zephlaow
    @zephlaow 4 ปีที่แล้ว

    Can't wait. 😃

  • @teh_raab
    @teh_raab 3 ปีที่แล้ว

    Is there a way to get the transaction id with the success callback?

  • @pulscare6272
    @pulscare6272 3 ปีที่แล้ว

    hi.
    will you please tell me about e-wallet and stripe topup? i want to add E-wallet feature in my flutter app.

  • @s-sugoi835
    @s-sugoi835 3 ปีที่แล้ว

    Thank you!

  • @aimanadzhar5275
    @aimanadzhar5275 4 ปีที่แล้ว +1

    Hey bro can you do full scratch e-commerce app with php/mysql api as backend?

    • @marcinszaek7564
      @marcinszaek7564 3 ปีที่แล้ว

      I don't know php so that for sure no. But maybe at some point I could do an e-commerce app :)

    • @aimanadzhar5275
      @aimanadzhar5275 3 ปีที่แล้ว

      @@marcinszaek7564 cools

  • @rockeypandit2500
    @rockeypandit2500 3 ปีที่แล้ว +1

    Error when using live keys
    Uncaught IntegrationError: Live Stripe.js integrations must use HTTPS.

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว +1

      same error with live mode

    • @rockeypandit2500
      @rockeypandit2500 3 ปีที่แล้ว

      @@rawquesh I searched but didn't got any solution , so made seperate html page and hosted in firebase , got the https URL then replaced the URL in code

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว

      @@rockeypandit2500 is that working now?

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว

      @@rockeypandit2500 if yes then could you please give me a demo code of HTML and function both, thank you

    • @rockeypandit2500
      @rockeypandit2500 3 ปีที่แล้ว

      @@rawquesh sure share me ur email

  • @qamarabbasi4695
    @qamarabbasi4695 2 ปีที่แล้ว

    how to customize stripe UI?

  • @vikramc.n.1121
    @vikramc.n.1121 4 ปีที่แล้ว

    Hi sir, good to see you again,
    how are you?

    • @marcinszaek7564
      @marcinszaek7564 4 ปีที่แล้ว +1

      Hi, thanks! I'm good :)

    • @vikramc.n.1121
      @vikramc.n.1121 4 ปีที่แล้ว

      @@marcinszaek7564 thanks for the video sir ❤️

  • @smamahsn2275
    @smamahsn2275 3 ปีที่แล้ว

    how to add monthly subscription Function with stripe method in flutter ?
    kindly help me i am stuck at this function
    i will be thankful to you !

  • @ganguly_ari
    @ganguly_ari 4 ปีที่แล้ว

    What is const nikesPriceId = 'price_XXX'; and where should I find it in stripe?

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว

      Nikes are the example product I created in Stripe dashboard. You can create any product you want to sell and then just use the id of it :)

  • @aupas1373
    @aupas1373 3 ปีที่แล้ว

    Sir how to have transaction id of payment ?

  • @academic3044
    @academic3044 4 ปีที่แล้ว

    How to get the id of the variable "nikesPriceIden"? my "stripe" panel I only have the public and private key, but I don't have the "nikesPriceId" help

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว +1

      Nikes are the example product I created in Stripe dashboard. You can create any product you want to sell and then just use the id of it :)

    • @academic3044
      @academic3044 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 THANK YOU!

  • @rawquesh
    @rawquesh 4 ปีที่แล้ว

    hello sir can you please say that what's the best way to hide API keys in the app

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว

      Hide from who? :)

    • @deepaksinghbaise9968
      @deepaksinghbaise9968 3 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 Someone who can decompile the app which may expose the code up-to an extent.(But reverse engineering is kind-off tough to do with flutter app so it's not a problem)

  • @fernandosanchez6054
    @fernandosanchez6054 3 ปีที่แล้ว

    Thanks

  • @rawquesh
    @rawquesh 3 ปีที่แล้ว +1

    error when using live mode
    "Uncaught IntegrationError: Live Stripe.js integrations must use HTTPS. For more information: stripe.com/docs/security/guide#tls", source: js.stripe.com/v3/ (1)

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  3 ปีที่แล้ว

      When do you get this error?

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 after getting session-id and loading the local html

    • @rawquesh
      @rawquesh 3 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 you just use live keys with that code and you will know it

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  3 ปีที่แล้ว

      @@rawquesh Correct! See the pinned comment for the solution :)

  • @bishnoi0072
    @bishnoi0072 4 ปีที่แล้ว +1

    how to get back transaction-id after payment successful

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว +1

      You can have checkout session id in the success URL. From that you'd have to ask backend for the product details based on that id. See stripe.com/docs/payments/checkout/custom-success-page#modify-success-url for example

    • @bishnoi0072
      @bishnoi0072 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 I got it but I can't see any endpoint for getting transaction id by session-id, can you please help me out 😟

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว

      @@bishnoi0072 What info do you need exactly that is not in the session object?

    • @bishnoi0072
      @bishnoi0072 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 i'm actually using woocommerce rest api so i have to put the transaction id in the payment receipt so i need to have transaction id

    • @bishnoi0072
      @bishnoi0072 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 thank you btw i got it, the transaction id we can have from that same session request. 🙂

  • @aupas1373
    @aupas1373 3 ปีที่แล้ว

    Hello sir. how to get "nikesPriceId" into my own backend and just pay with stripe

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  3 ปีที่แล้ว +1

      It's a product id created in Stripe dashboard. Once you create the product, you can save the id in the backend :)

    • @aupas1373
      @aupas1373 3 ปีที่แล้ว

      ​@@fidev-makebeautifulapps1498 . sorry but i don't understand well. imagine that i'm in my ecommerce website and want to save the price of any article. what can i do ? according to your method, it will be always the same price ?
      my question is how can i do to set "nikesPriceId" for any product in my backend. please more explication sir.🙏

  • @lassediercks4766
    @lassediercks4766 4 ปีที่แล้ว

    Does this implementation allow for autofill and the other Stripe checkout benefits?

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว +1

      Yes, and Google Pay and Apple Pay as well :)

    • @lassediercks4766
      @lassediercks4766 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 cool
      Just to check again (since I am seemingly dumb). On mobile via webview this supports
      Address auto-complete
      Real-time card validation
      Descriptive error messages
      Third-party autofill
      Card brand identification
      Right? :D

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว +1

      @@lassediercks4766 As far as I know, mostly yes. It doesn't collect address though and I don't know what you mean by third-party autofill. The whole idea of Stripe Checkout is that Stripe handles all of those things. The best bet is to go to stripe.com/en-gb/payments/checkout and see if it fits your needs. :)
      EDIT: Oh, you got it from their website! So yeah, I don't see why it should not work in the webview :)

    • @lassediercks4766
      @lassediercks4766 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 thank you - we'll test it out! Great work on the videos and blog posts.

    • @LasseDiercks
      @LasseDiercks 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 hi we tried doing this on mobile but it seems that webview on mobile cannot access device autofill information. Does it rly work for you it might be we made a mistake? Br Lasse

  • @sebboseb_
    @sebboseb_ 3 ปีที่แล้ว

    Do you have a solution to those errors in the end?

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  3 ปีที่แล้ว +1

      From what I understood, this error is happening because evaluateJavascript method doesn't return anything. So I don't think it actually is an error worth handling. Of course I may be wrong but here's my latest approach: github.com/MarcinusX/flutter_stripe_demo/blob/master/lib/checkout/stripe_checkout_mobile.dart#L70

    • @sebboseb_
      @sebboseb_ 3 ปีที่แล้ว

      ​@@fidev-makebeautifulapps1498 Awesome, that worked, my editor kept pausing the sim when the error appeared so it's nice to have it fixed, thank you.

  • @xdvaqer6173
    @xdvaqer6173 4 ปีที่แล้ว

    Umm I didn't get the "don't add this to your real app this is just for demo purposes" part.

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว

      The "Server" is something that should be done in the real server (backend), not in the mobile app. Your secret key should never be close in your mobile app.

    • @ernestdesbordes
      @ernestdesbordes 4 ปีที่แล้ว

      @@fidev-makebeautifulapps1498 Yeah so why don't you show how to do this in a real live situation cos people don't understand when you say "must be done in the backend".

    • @marcinszaek7564
      @marcinszaek7564 4 ปีที่แล้ว

      ​@@ernestdesbordes Because then I would also introduce the basics of backend development in this video which is something I didn't intend to do. If you want, you can check my Stripe on Web video where I use client-only integration which doesn't have a "Server workaround". th-cam.com/video/yYxIWEQgOe4/w-d-xo.html

    • @ernestdesbordes
      @ernestdesbordes 4 ปีที่แล้ว

      @@marcinszaek7564 Alright great...sure...it was next on my list...I really appreciate your tutorials...nice one. Have you tried Brain Tree yet? Not sure if it will be same as Stripe API

    • @fidev-makebeautifulapps1498
      @fidev-makebeautifulapps1498  4 ปีที่แล้ว

      @@ernestdesbordes Not yet :)

  • @gaged96
    @gaged96 3 ปีที่แล้ว

    Hi there!
    I have trouble following you. When I use WebView() i get following error:
    Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/webview.
    Even if I use just something like this: WebView(initialUrl: 'flutter.dev') I get error.
    I'm using 1.22.6 version of Flutter and 1.0.7 version of webview_flutter.
    I can not use the newest version because I get way too many errors to fix.
    I saw this question stackoverflow.com/questions/55794348/webview-in-flutter-not-working-getting-a-platform-error but nothing has worked for me.
    Do you maybe have an idea why I get this error ?
    Keep up with great work !