#stevec0583
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me the link to the doc that you are following?
Will do. I can go one better and just give you my code:
account = Stripe::Account.retrieve(@studio.stripe_account)
account_links = Stripe::AccountLink.create({
account: account_id,
refresh_url: base_url + '/onboard',
return_url: base_url + '/onboard',
type: 'account_onboarding',
})
@onboard_url = account_links.url
I send the user to the @onboard_url - stripe should take care of things from there.
These are the docs, but they don't say anything about how to test onboarding for connect standard accounts: https://stripe.com/docs/connect/testing
Right now I'm quite confident my code would work in production, ironically, it's harder to run in dev because I don't know what to enter to keep stripe's onboarding process happy and let me progress through it
Did you get the test number from this part https://stripe.com/docs/connect/testing#using-oauth ? the Test OAuth flow?
I tried using that client_id instead of account_id but it complained
Is that what I'm supposed to do? Where do you place client_id in my code above?
I had this:
if !Rails.env.production?
account_id = "ca_xxxxxxxxxxxx"
end
In other words, replace the actual account_id with the one you linked to.
It errors with: "No such account: ca_xxxxxxxxxxxx"
I guess client_id is a different thing to an account_id. But I need an account_id to generate the onboarding url.
Maybe I'll just write production code and test in production with real payments. Would be easier.
I'm probably going to do that unless stripe can give a way to run through things in dev, a way that works.
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
An account ID should starts with acct_, but you pass in a ca_xxx which is not an account ID.
You should pass in the connected account ID when creating an account link
Yeah I'm well aware of that!
I'm passing the client_id stipe docs say to use. How do I get an account_id from the client_id?
I've never used a client_id before
I need an account_id, not a client_id
from docs
You can test your OAuth integration for Express or Standard account creation with the development client_id.
But I need an account_id, you and I both agree on that.
So the gap is how do I get account_id for the given client_id
Can you send me the doc that you are following?
Am I using the wrong docs?
I'd like to know what kind of integrationi you are building. Are you using the Connect OAuth flow, or the new /v1/accounts API ?
I assume you are using the OAuth flow, you should be able to get account ID here https://stripe.com/docs/connect/oauth-standard-accounts#token-request
I honestly don't know, I followed the stripe docs and wrote this code:
account = Stripe::Account.retrieve(@studio.stripe_account)
account_links = Stripe::AccountLink.create({
account: account_id,
refresh_url: base_url + '/onboard',
return_url: base_url + '/onboard',
type: 'account_onboarding',
})
@onboard_url = account_links.url
All it does is gives me an onboarding url to send the user to, from there it should 'just work', but I can't go through the steps (it doesn't like the phone number I give it (+61 0000000000)
So again, which doc you are following?
I don't know about every single thing stripe does, all I know is I created an account then created an onboarding url.
I'll find it
It's the connect 101, in ruby
It takes like 5 minutes to set up in a new rails app.
The problem is it doesn't work.
In dev you click on the link stripe gives, then you get stuck entering data
OK, so you are using the /v1/accounts API flow
(can't go through the flow)
Should I be?
What link?
The onboarding link
This one: @onboard_url = account_links.url
I
I'm following stripe docs, it should work
I still struggle to understand the problem that you are trying to solve.
In the beginning you sent me a request (req_FYJtG4bSJ3Fy5K) and asked why the account link creation was failed, and I explained that you should pass in an account ID.
I also told you how to retrieve an account ID from the OAuth flow
Now it seems like you have no problem creating an account link, but you are now saying something doen't work.
So can you be more specific on the exact problem that you need help with?
Okay, say we never spoke about anything. Suppose someone creates a new rails app and new stripe (platform) account.
Now they've been working on their app for 5 minutes, and they look at how to onboard stripe connect users, by following these instructions: https://stripe.com/docs/connect/collect-then-transfer-guide?platform=web#create-account
They go to their localhost:3000 in incognito, click on the onboarding link, and they should be able to go through the flow to confirm that it works. Instead, they get stuck because it doesn't accept +61 0000000000 phone number
Can you try a different number?
Okay I tried my own number, and it works
Thanks for the help. Please add that detail to docs. It cost me 7h to figure out something that shouldn't have taken any time.
(I asked in here 7 hours ago too, but didn't get to the bottom of it)
Docs currently state:
Auto-fill 000 000 0000 as the test phone number and 000-000 as the SMS code when prompted
Please make sure you update them. Otherwise I have to take all sorts of fiddly notes to do unintuitive things like literally use my personal phone number in my test/dev environments, which is weird and not best practice.
Also, keeping docs accurate would have saved me several hours, but no doubt others read what to do and find what they actually have to do differs, and hence it wastes their time too.
Thanks for your feedback, I'd let the docs team know.
Thank you.
It was frustrating but I'm very glad now it's sorted.
Thanks for your help
Just to clarify, your connected account type is Standard, not Express right?
Yup
I know what you're gonna say
That it says for Express. But then where's the instructions for Standard..
I read the doc again, Auto-fill 000 000 0000 as the test phone number and 000-000 as the SMS code when prompted (Express), so my understanding is that this number is for Express account
They should be there in the same place (under Testing Stripe Connect docs)
Yup I agree, it says that. But, like, that leaves Standard accounts guessing, and the answer is not obvious
I've never worked at a company where I literally had to use my personal mobile number to test lol.
But that's what stripe wants us to do.
People won't guess that.
The obvious thing to do is 123456789 or something like that, or spam something 2938245872, or 0000000000. I tried all those things, and only after 7 hours and you instructing me did I try my own mobile. It's a weird thing that devs wouldn't typically do IMO.
If that's what's expected, the docs should state so. Currently they give instructions for Express, but not for Standard. It's not like Stanard is some uncommon account type.
I apprecaite your feedback, let me let docs team know and see how we can make it better.