#john307-connect

1 messages · Page 1 of 1 (latest)

still pawn
#

Hi @jovial brook! Can you share the code you used to generate the URL, or a request ID (req_xxx)?

jovial brook
#

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',
});

still pawn
jovial brook
#

Here is the value

acct_1KHp9dQoy3wgnBy6

sharp oracle
#

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

jovial brook
sharp oracle
#

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

jovial brook
#

Here's what I can see in my console

sharp oracle
#

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

jovial brook
#

I dont see req_id hmm

sharp oracle
#

yeah, ok, that's bad. Let me check something

jovial brook
#

Sure

sharp oracle
#

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.

jovial brook
#

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

sharp oracle
#

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

jovial brook
#

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
      }
  }
);
sharp oracle
jovial brook
#

It works now, just an observation...

  1. So the custom account will not necessary need the user to login in Stripe dashboard right?

  2. And all of the data just depends and controlled via api?

bold zinc
#

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.

jovial brook
#

OK great I think that would be all for me. Appreciate your time you guys are legend. Keep safe!

bold zinc
#

Thank you! I'm glad we could help!

#

Hope you have a great weekend 😄