Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is CONNECTED_STRIPE_ACCOUNT_ID? How to get it from android platform?

I am working on Ride Sharing app and i choose Stripe as payment procedure. What happens in app that rider can tip to driver. For this i used this approach that, Rider will pay to the App's stripe account and then app will keep its percentage and then it will transfer remaining amount to driver's stripe account.

So far everything is going good.App has successfully charged the rider but bit confused about transfering amount to driver's stripe account. I have looked into stripe documentation which says i need driver's stripe account CONNECTED_STRIPE_ACCOUNT_ID, which i am unable to find and unable to figure out what is it. What is stripe connect account is? how can i add user to stripe connect from android to my platform?

This is the code snippet provided by stripe

Stripe.apiKey = PLATFORM_SECRET_KEY;

Map<String, Object> transferParams = new HashMap<String, Object>();
transferParams.put("amount", 1000);
transferParams.put("currency", "gbp");
transferParams.put("destination", {CONNECTED_STRIPE_ACCOUNT_ID});

Transfer.create(transferParams);

It would be nice if someone explain this to me. Thanks P.s i don't want to use webview in my app in any case. I am not allowed to use it.

like image 451
Zeeshan Shabbir Avatar asked Aug 09 '16 12:08

Zeeshan Shabbir


People also ask

What is a Stripe Connect platform?

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.

Where do I find my Stripe ID?

Finding your account ID An account ID is generated for you when you create your Stripe account. This is different from your account's name and uniquely identifies your account. You can find your account ID in your Account and Profile settings.

Is Stripe a platform?

A fully integrated suite of payments products Stripe's products power payments for online and in-person retailers, subscriptions businesses, software platforms and marketplaces, and everything in between.


1 Answers

There are three different ways to create charges with Connect :

  • direct charges (i.e. with the Stripe-Account header)

  • destination charges (i.e. with the destination parameter)

  • separate charges and transfers (in which you first create a "normal" charge on your platform's account, then create transfers to send funds to the destination accounts)

Which way you should use depends on your exact use case, as it also determines who pays Stripe's fees and who's responsible for refunds and chargebacks. Check out this paragraph to help you decide which way is best suited for your business.

In the first two cases, you'd specify your platform's cut with the application_fee parameter, and the destination account's ID ("acct_...") in either the Stripe-Account header or the destination parameter.

The account ID should be in your database. If you use standard accounts or Express accounts, then you get it at the end of the OAuth flow, in the stripe_user_id field. If you use custom accounts, then you get it in the id field in the response to the account creation request. In all cases, you need to save this ID in your database so you can retrieve it to issue API requests and accept payments on behalf of this account.

like image 153
Ywain Avatar answered Nov 05 '22 21:11

Ywain