#Jelle-express-onboarding

1 messages ยท Page 1 of 1 (latest)

bronze cloak
#

Hello ๐Ÿ‘‹
Give me a moment to catch up here, thanks ๐Ÿ™‚

granite latch
#

Sure ๐Ÿ™‚

bronze cloak
#

can you share the example request IDs for creating an account and an account link?

granite latch
#

Yep one moment

#

Account create:

curl https://api.stripe.com/v1/accounts \
  -u sk_test_[blank]: \
  -d type=express

Account link create:

curl https://api.stripe.com/v1/account_links \
  -u sk_test_[blank]: \
  -d account=acct_[blank] \
  -d refresh_url="https://example.com/stripe/reauth" \
  -d return_url="https://example.com/stripe/return" \
  -d type=account_onboarding
bronze cloak
#

There are various reasons why it'd directly take you to the refresh_url
https://stripe.com/docs/connect/express-accounts#refresh_url

  • The link is expired (a few minutes went by since the link was created).
  • The user already visited the URL (the user refreshed the page or clicked back or forward in the browser).
  • Your platform can no longer access the account.
  • The account has been rejected.
granite latch
#

It has been rejected

#

Because it lacks data

#

The TOS date and acceptance and external account, but this is exactly why I should redirect them to the stripe onboarding url, for them to enter the bank account etc?

#

Sorry it actually says rejected in the dashboard and disabled in the response from account/create

bronze cloak
#

Have you tried creating a new account link for re-onboarding?

granite latch
#

I haven't

#

One sec ๐Ÿ˜„

#

When redirecting to stripe onboarding I don't need to pass any query params, do I?

bronze cloak
#

Nope. account links are unique and should have all the info needed

granite latch
#

Sorry what do you mean by re-onboarding? Should I set type: re-onboarding?

#

I thought I should call it again with the same params to do that

bronze cloak
#

that's not a type sorry
you'd basically use the same params

granite latch
#

Okay thanks ๐Ÿ™‚

#

I had a demo 3 hours ago for this lmao

#

The re-onboarding does the same thing, straight to the refresh url

#

Did you want like actual request Ids?

#

This is a re-onboarding response

<Stripe.StripeResponse status=200 Request-Id=req_n80AgEy09Dckoh Date=2022-05-24T14:19:48>
winged crest
#

Thanks for the request ID, checking in to it...

granite latch
#

Thanks, let me know if you need anything from me ๐Ÿ™‚

winged crest
#

Will do, thanks for your patience so far. I am still not finding much on this and have reached out to my colleagues for help looking in to this.

#

Are you sending the link anywhere via slack or Discord or anywhere that will auto-expand the link? Even accessing the link like that can expire it

granite latch
#

Nope I get this fresh from the api call and immediately go to it myself

#

I talked to stripe support about it and they say it's unexepected behavior and they will get back to me

#

But my explanation here is a lot more technical

#

I wanted to see here if maybe if I explain more in detail and more clearly you might be able to see that I'm doing something wrong

winged crest
#

Definitely. I am checking now to see what our logs say about how/when this link is accessed. From what I can tell the account and connection to the platform are fine

granite latch
#

And the requests I'm sending? They should work, no?

#

Curl works ........

#

zzzzzzzz

winged crest
#

Wait, as in when you make the call with curl the link works?

granite latch
#

yea

#

my code's wrong then

winged crest
#

But not when you make it with .NET?

granite latch
#

yep

winged crest
granite latch
#

req_EZdZXOUwEgPQew

#

The requests and responses look the same to me.. haha

#

Just made another one from .NET: req_d5BkTQozDzGICE that didn't work

winged crest
#

Interesting. I am not seeing a difference in what our backend receives. This is really stumping me at the moment on what the difference might be.

#

And you said that your .NET code just basically passes you the URL and you navigate right to it?

#

I am actually seeing a facebook bot trying to access the URL from your .NET library. Are you sending these links to yourself on Facebook?

#

Anything that tries to preview the link like this can invalidate it

granite latch
#

Facebook?

#

I dont send them anywhere

#

I see them in my IDE and then paste them in the browser?

indigo pasture
#

Hi ๐Ÿ‘‹ I'm stepping in for @winged crest I'm just catching up gimme a sec

granite latch
#

Im getting the entire stripe staff on board here :D

#

A Facebook bot accessing my url that i get directly from my IDE after making a call... ๐Ÿค”

indigo pasture
#

So you are creating onboarding links directly in your IDE, copying the URL into a browser, and still getting a redirect?

granite latch
#

Yes

#

Straight to the refresh url

#

But in curl it works and I copy the url from the terminal in the same IDE

#

How do you know it's a facebook bot? Is the link being shared on facebook and clicked on from there?

winged crest
#

I am unclear on why a facebook bot navigated there but I see something with a user-agent of facebookexternalhit/1.1 Facebot Twitterbot/1.0 trying to access the URL that you created

#

And I don't see that for the one you created via curl

granite latch
#

What the .....

#

Omg

#

No way

#

I think i know

#

I have an app on my mac that keeps track of my clipboard history

#

And it resolves the link to get a preview

flat finch
#

oh wow

granite latch
#

I think that might be it

flat finch
#

I have never seen that edge-case but I'll add this to my list of "what can expire my account link" now ๐Ÿ˜…

granite latch
#

But then why doesnt it happen from curl

flat finch
granite latch
#

Well yeah anyway it's something like that I think

flat finch
#

yeah it's quite common that weird behaviour. In a way it's good because it forces everyone to implement the refresh_url flow :p

granite latch
#

Holy moly.. ๐Ÿ˜…

#

What a journey

flat finch
#

I know!!!

granite latch
#

Thanks so much you guys ๐Ÿฅฐ

flat finch
#

Happy to help, glad you figured it out1