#kur1nkato

1 messages · Page 1 of 1 (latest)

stoic scrollBOT
old smelt
#

Hi there!

#

Where do you see that error exactly?

sacred wigeon
#

Adding @steady lynx for visibility, he is my colleague

steady lynx
#

Hi!

#

We are seeing this error, when after this api call when we get the the account id:

const response = await stripe.oauth.token({ grant_type: 'authorization_code', code: code })

#

After this call we try to update the account settings, with this call as well:

await stripe.accounts.update(response.stripe_user_id, { company: { name: orgDetails.name }, email: email, metadata: { orgID: orgDetails.id }, })

old smelt
sacred wigeon
#

req_uDjwLnQkCh6yTt

#

this is what we have in our logs

steady lynx
#

Also, that account is not showing on our connected accounts list.

old smelt
#

The parameters you are trying to update can only be updated for custom accounts, as mentioned here https://stripe.com/docs/api/accounts/update
But the account is actually a Standard account. So it's expected to not work.

steady lynx
#

And why is the account not showing on our connected accounts list?

#

If the connection was successfuly done, except the part where we try to update the account details.

old smelt
#

Having a look

#

Looks like the connected account was disconnected from your platform

sacred wigeon
#

Did the customer disconnect it?

old smelt
#

It was disocnnected on 2023-11-16 at 09:36:53 UTC. Not sure why for now.

#

Foudn the issue!

#

The OAuth Token was consumed twice, which disconnected this account from the platform

#

So there's an issue in your code. When you consume the Oauth token twice, then Stripe automatically disconnect the account

sacred wigeon
#

Oh ok, we think we may have figured out what happened then.

#

Another question, is there a way to distinguish between a custom and a standard account when connecting? Do we recieve something different?

#

The reason is so we do not execute code which only works for custom accounts on it.

old smelt
#

Looks like you are using OAuth to connect to an existing account? In this case this just doesn't work with custom accounts. It's only for Standard and Express accounts.

sacred wigeon
#

and can express and standard accounts be distinguished when we recieve the callback?

old smelt
sacred wigeon
#

ok, so we are using the standard one, so back to our original error. What can we do about the platform controls?

#

we have a connect account at the moment, which we do not have platform controls for

old smelt
stoic scrollBOT