I am building an android app which pays someone. I explored Stripe Connect and it has an API and flow for website which requires displaying a stripe connect button and also needs a re-direct uri.
However, I can not find anything on for Android which allows to show a connect button and prompt user to create or connect a stripe account natively on Android device. Should I use a webview to do this or is there some more elegant way to do this?
Stripe offers free mobile applications for both iPhone, iPad and Android devices to allow you to access your Dashboard.
Startup Stripe has released Stripe Connect, a new version of its payments service that enables users of any website to accept credit card payments. This means that anyone who sells on an online marketplace, or uses an online store service, a website creator, or invoicing system can get paid via Stripe.
Stripe Connect is the fastest and easiest way to integrate payments into your software platform or marketplace. Our set of programmable APIs and tools allows you to build and scale end-to-end payment experiences from instant onboarding to global payouts—all while having Stripe handle payments KYC.
As far as I know, there're no native SDK for mobile stripe connect. I did the webview route for android. Was trivial, but I agree that I wished there're a more elegant solution to this.
For those who are wondering on how to do this (since I can't find any doc out there), here you go:
Create a button that will open a new intent with a web view.
The webview should load the oauth/authorize endpoint ("https://connect.stripe.com/oauth/authorize?response_type=code&client_id=[YOUR_API_KEY]&scope=read_write"). Do not forget to enable javascript on your webview.
Once the form in webview is filled, Stripe will redirect to the redirect_url you provided with the authorization code if the authorization is successful. Have your web service parse that authorization code.
Have your service make a post to stripe oauth/token with providing grant_type, client_id, code, and client_secret.
Stripe will then respond back with the token (auth credentials) that you needed. Store that for later use & you're pretty much done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With