#gumehara-connect-oauth

1 messages · Page 1 of 1 (latest)

void socketBOT
wet quiver
#

Hello, how can I help?

#

@hybrid pilot can you put the rest of your details in this thread?

#

I am trying to implement connect on our platform
the tutorial says to create a new client
but our clients already have a stripe account

hybrid pilot
#

Sorry

wet quiver
#

No worries, we just try to keep things in threads once we make them

hybrid pilot
#

So

wet quiver
hybrid pilot
#

I know

#

and i've read it

#

Im just wondering

#

on how does it work exactly

#

Isn't the account_id passed in the return url

#

how am i supposed to get the account id for an existing client

#

check this out

#

I generate an id

#

then i login with a different account in the oauth flow

wet quiver
hybrid pilot
#

Ok

#

let me send screnshots

#

what i do step by step

#

First Step

#

a user clicks a button on the frontend

#

Connect Stripe

#

Then i call this method

#

public function connectAccount(int $companyId): string
{
$stripeLink = $this->stripeClient->accountLinks->create(
[
'account' => '{platform_id}',
'refresh_url' => '{refresh_url}',
'return_url' => '{returl_url}',
'type' => 'account_onboarding',
]
);

    return $stripeLink->url;
}
#

Is that the correct way to call it

#

Because when i put platform_id in account

#

it says account does not exist

wet quiver
#

The account ID there is supposed to be the connected account ID, not the platform account ID

hybrid pilot
#

How do i get the account id

wet quiver
#

Though I don't think you can do an account link for an existing account

hybrid pilot
#

of the person i wish to connect

#

Well then how do i connect an existing account to my platform

wet quiver
#

I think the intended flow is to do the OAuth connection and that step that I linked to is where you get the account ID

hybrid pilot
#

I cannot even start the oauth flow

#

without an account id

#

the code returns the url for me to redirect the customer to

wet quiver
#

To be clear, the accountLinks thing is not the OAuth flow. The OAuth flow as far as I can see does not need the existing account ID to get started

hybrid pilot
#

ok let me try

#

i will reply here