How to create stripe standard account with flutter and firebase

648

Here is what I did

  1. in firebase: I created an http function, ie exports.createStripeAccount = functions.https.onRequest((req, res)
  2. in stripe: set that function as redirect uri
  3. in flutter: launch(url_to_connect_the_account)
  4. in firebase inside the httpfunction:
    return stripe.oauth.token({
    grant_type: 'authorization_code',
    code: req.query.code,
    }) 

and that's all folks!

Share:
648
M4trix Dev
Author by

M4trix Dev

Updated on December 14, 2022

Comments

  • M4trix Dev
    M4trix Dev over 1 year

    I have this amazing flutter app and I managed to set up a payment system with Stripe. My app is a marketplace so I have many vendors and I am able to collect money from the users and transfer the money to vendors. I have create a test vendor and it all works fine in testing mode. Now I would like to let prospective vendors to create a Stripe standard account and connect with my platform. Here are the instruction I would need to follow: link to stripe

    I read the instructions but I am not able to understand or implement it. I would like to know if I can implement the steps within my Flutter app or not. I am not familiar with servers but I have managed to use firebase to create charges. My first problem is the redirect URI (what is this?). The second problem is how to handle the response from stripe (step 3) and lastly get the vendor data with a POST request... Is there anything simple to use in flutter? I have seen this and this but I am not sure they can be used...

    Can you please clarify what should I do here. Many many thanks in advance

  • Yann Massard
    Yann Massard about 3 years
    LaunchUrl opens a browser, using a webview and Deeplinks would be preferable-