Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe Connect Android

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?

like image 253
windchime Avatar asked Apr 27 '15 19:04

windchime


People also ask

Can you use Stripe on Android?

Stripe offers free mobile applications for both iPhone, iPad and Android devices to allow you to access your Dashboard.

Is Stripe connect the same as Stripe?

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.

What is Stripe Connect?

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.


1 Answers

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:

  1. Create a button that will open a new intent with a web view.

  2. 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.

  3. 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.

  4. Have your service make a post to stripe oauth/token with providing grant_type, client_id, code, and client_secret.

  5. Stripe will then respond back with the token (auth credentials) that you needed. Store that for later use & you're pretty much done.

like image 159
HungryMonkey Avatar answered Oct 27 '22 20:10

HungryMonkey