#Mikail
1 messages · Page 1 of 1 (latest)
Any particular reason why you're using OAuth to onboard accounts? You could achieve this with Account Links, which is the recommended onboarding flow.
ie. you specify a custom return_url when creating the Account Link where the user is returned to after onboarding: https://stripe.com/docs/connect/standard-accounts#return_url
Reason we are using oauth is that we had issues with onboarding existing standard accounts
This was the response we recieved via email from the email support
After further research,it looks like you are creating an Account link[0] to connect the existing standard account to your platform, and I’m afraid this will not work. It is highly recommended to use a standard OAuth integration in order to connect the standard connect account to your platform[1].
Which issues?
This was done by an Indian user who has an existing Stripe account under the email address admin@mtlegalteam.com.
- User logs into their Stripe account.
- User demonstrates their Stripe account is active & valid.
- User initiates on Stripe Connected Account onboarding on our website (Livelogue).
- User logs into Stripe as part of the onboarding.
- User elects to connect their existing Indian Stripe account.
- Stripe throws the user to a screen that looks like it's for a new UK entity (?). User is unable to connect their existing account (preferred solution) or to change country back to India and create a new entity (second-best solution).
this happened to 3 users from india
when we used account links
Well it would depend how you were creating the Account and Account Link
You can pass a redirect_ui parameter with OAuth: https://stripe.com/docs/connect/oauth-reference#get-authorize-request
would sending an example account link help?
problem here is that we want the redirect uri to be dynamic, as we will have thousands of different urls
It can be, you'd just set the redirect_uri on a per customer/session basis when they click the link (https://connect.stripe.com/oauth/authorize?redirect_uri=livelogue.com/mikail)
Sure, can check
in this case I get the following error:
Ensure this uri exactly matches one of the uris specified in your application settings
we are using stripe.accountLinks.create({})
with options
account: stripe_account_id
refresh_url: livelogue.com/mikail?{{query}}
return_url: livelogue.com/mikail?{{query}}
type: 'account_onboarding'
Can you share an example req_xxx?
sure
{
object: 'account_link',
created: 1678795006,
expires_at: 1678795306,
url: 'https://connect.stripe.com/setup/s/acct_1MlVW5IYg53eDDM0/TpSnma4vvnaf'
}
Checking
this one works, i can also try to send the url of the failed account
acct_1MlVW5IYg53eDDM0 is your platform account, right?
Sorry: acct_1K3zjCETJwELHMW2
not sure, need to check
one sec
by platform account, you mean the account on which we connect users right?
Ok, the issue is that for standard accounts the country defaults to the platform account country unless you pass the parameter (https://stripe.com/docs/api/accounts/create#create_account-country) on account creation. See: https://dashboard.stripe.com/test/logs/req_ap7W3FOHl22Dom
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So if you know the country of your users, you'd pass country: 'in' for example when creating the account
aha i see, is there a way for it to default to their country where they already created their account?
FWIW, I just tried an Account Link with an account I didn't pass country param and I saw a list of countries.
AFAIK, no.
An alternative approach would be to keep the OAuth integration, and use a generic redirect_uri but also pass state that you can use to redirect to their custom page.
ok thank you, that helps a lot
can we leave this thread opened for a few more hours, so we don't loose context?
I have all this info now, need to process 😄
We normally close after ~1 hour, but we can easily re-open it if you need more help!