Get the account id of the connected stripe account

When I run the test to connect the user to payment of payments through my application, I need an account ID to charge them.

Stripe\Token::create( array("customer" => CUSTOMER_ID, "card" => CARD_ID), array("stripe_account" => CONNECTED_STRIPE_ACCOUNT_ID) // id of the connected account ); 

In this snippet (from Stripe), CONNECTED_STRIPE_ACCOUNT_ID implies a connection with id that starts with acct _

How to get it?

Thanks, Rich.

+6
source share
2 answers

I came here from a Google search with a similar problem. Itโ€™s actually easy to get from the OAUTH stream, the documentation just doesnโ€™t make it clear in which field. In short, the missing link is that CONNECTED_STRIPE_ACCOUNT_ID is the stripe_user_id that you get at the end of the OAUTH stream when you connect your account according to https://stripe.com/docs/connect/standalone-accounts

In response to the example at the end of the stream

 { "token_type": "bearer", "stripe_publishable_key": PUBLISHABLE_KEY, "scope": "read_write", "livemode": false, "stripe_user_id": USER_ID, //this is it "refresh_token": REFRESH_TOKEN, "access_token": ACCESS_TOKEN } 
+1
source

@ Anil..I will describe the steps here:

Step 1. Find the client ID of your platform. This can be obtained from the settings. Step 2. Set the redirect URI. This will happen when your users are redirected after they sign up for Stripe. Step 3: Add a connect button, with which you can connect the authorize_url endpoint

More details here: https://stripe.com/docs/connect/standalone-accounts#oauth-flow

0
source

All Articles