#john307-connect
1 messages · Page 1 of 1 (latest)
Hi @jovial brook! Can you share the code you used to generate the URL, or a request ID (req_xxx)?
const account = await stripe.accounts.create({
type: 'custom',
});
const accountLinks = await stripe.accountLinks.create({
account: account.id,
refresh_url: 'https://google.com/',
return_url: 'https://google.com/',
type: 'account_onboarding',
});
Can you console.log the value of the account.id?
Here is the value
acct_1KHp9dQoy3wgnBy6
can you open the browser devtools and see if there's an error in the console?
or, create a new account link and paste the URL here(before you open it yourself here) so I can have a look
Sure here's a new account link
ugh it just redirects, which means it's already consumed
can you either check the console for me, or implement the refresh_url ? you're supposed to set that to a URL that just generates a new AccountLink and then redirects to it
but yeah I'd need to see the exact logs in the browser unfortunately and there's no good way unless you can share a link with me. I also think posting it on Discord results in Discord visiting the link to show a preview, which consumes it, so yeah, I think you need to finish building the refresh_url for now
hmm, thanks, that's helpful
can you click on the red request (the 500) and look in the response headers for a request ID req_xxx ? looks vaguely like this if it helps
yeah, ok, that's bad. Let me check something
Sure
yeah this is really strange and I'm not sure what is causing this. It's not widespread from what I can tell so I think it's something specific to your account or set up.
can I ask you try creating the account like in https://stripe.com/docs/connect/custom-accounts#create and pass more than just the type (specifically pass some capabilities as well) and see if that changes things?
capabilities are required usually but you use an old API version from before that was required(https://stripe.com/docs/upgrades#2019-11-05) and I wonder if that breaks something(testing myself too)
ok cool
I can reproduce the problem by doing that(creating the account without capabilities). But still, that shouldn't happen. Anyway, can you try adding capabilities then? I confirmed it fixes it.
Yes I just did and it went through the form, I will just finish creating new account then will try to update lets see if it allows as we are now using custom account
cool, should work otherwise. But yeah, I think we have a bug on our side so I'll work on reporting that. But basically if you request capabilities then it will be fine. I'd also in general suggest using a newer API version, Connect changed significantly in 2019 so you'll find it very difficult to map what you see in your version to what we currently have in our docs.
I have to step away but hopefully you're unblocked for now, my colleague @bold zinc can help with any followups
Thanks @sharp oracle
Hi @bold zinc got this error
Invalid transit number. The number should be in the format xxxxx-yyy or xxxxxyyy."
accountResult = await stripe.accounts.update(
'acct_1KHqoCQoFud43Mkg',
{
"external_account":
{
object : "bank_account",
country : "CA",
currency : "cad",
account_number : "11000-000",
bank_name : "Test bank name",
routing_number: 110000000
}
}
);
you need to pass the routing_number in the format it mentions(routing == transport) "11000-000". The values to use are at https://stripe.com/docs/connect/testing#account-numbers , if you pick Canada in the dropdown.
It works now, just an observation...
-
So the custom account will not necessary need the user to login in Stripe dashboard right?
-
And all of the data just depends and controlled via api?
Correct, Custom accounts are very much "behind the scenes". They can't be used to log into the dashboard, and yes all of their data is provided via the API.
OK great I think that would be all for me. Appreciate your time you guys are legend. Keep safe!