Ad
Stripe Connect Firebase Functions
Looked all over, tried capturing the code via swift but still need a function to fire off the code to get an Express account to connect.
Won't waste your time with the code attempts, so looking for Firebase Functions that will setup a Stripe Connect endpoint for redirection and send back the code to finalise the process.
Anyone care to help?
Thanks for reading.
Ad
Answer
You'll want to do something like this:
- Open a browser or web view from your App. Let the user work through the form to sign up for a Stripe account.
- Use Firebase's ability to call functions via HTTP requests, to define an endpoint that you can set as your Connect redirect_uri. Let's say
https://us-central1-example.cloudfunctions.net/connect_redirect
- In your Firebase function, you will grab the
code
parameter that's included in the query string (request.query.code
), then to complete the connection process, use a HTTP client to POST the appropriate data tohttps://connect.stripe.com/oauth/token
- In the
return
of your Firebase function, either supply a message encouraging the user to close their browser, OR create a redirect, directing the user back to your app (using something like a custom url scheme as the redirect destination)
Ad
source: stackoverflow.com
Related Questions
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?
Ad