#pyotr-vasiliev_api

1 messages ยท Page 1 of 1 (latest)

sullen chasmBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1289231196332626003

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

amber oakBOT
pastel storm
#

Hi there ๐Ÿ‘‹ you would track this on your end. Once you create the Account object for your user, you would log what the ID of that Account is and continue to use it when your user returns to your flows.

lethal marten
#

you mean the stripeID?

pastel storm
#

I don't know what you're referring to by "stripeID", that's not a term in our ecosystem.

#

Do you have an example of one of those IDs that you can share?

lethal marten
#

in the url

#

that is auto generated and saved in the database linked to your (domits) userID

pastel storm
#

What do you mean by auto generated? Are you using OAuth for your Connect onboarding, or are you making requests to create Account objects and then creating Account Links for them?

lethal marten
#

are you famillair with aws lambda? because i want to send a screen of it and maybe that become more clear

pastel storm
#

I have a rough understanding of what they are, but it's not what we specialize in working with so I don't know how much insight I'll be able to get from it.

lethal marten
#

its an api call with nodeJS

#

this is what we use as our backend and activate the api through front end (React)

pastel storm
#

const account = await stripe.accounts.create()
You're creating the Account objects

#

Then creating Account Links for them.

#

So you'd track that you already created a Stripe Account for your user. Then if they return to your flow you just create a new Account Link for them using the previously created Account's ID, rather than creating a new Account and Account Link.

lethal marten
#

wait i dont quite understand what you mean. I have made an issue overview of the problem which i couldnt share in the question form before entering this chat. And maybe this will make the situation more clear:

pastel storm
#

What is the "Set up zPayment" button? Is that a button that you built and put on your page? Is that the one that creates the Account object from the code that you shared earlier?

lethal marten
#

that is the button which triggers this api call

pastel storm
#

Do you have logic on that button to check your database for whether your user already had a Stripe account created?

lethal marten
#

yeah we do

pastel storm
#

I'd suggest double checking that then. It sounds to me like your code isn't detecting that your user already has a record in your database, then makes a request to us to create a new Account.

lethal marten
#

i made a sort of function for that but instead of letting me redirect to the same page it blocks it unless it makes a new accID

#

so lets say the user is in the middle of the stripe connect proces through Domits and it accidentally clsoes the page , then its accID is saved in the database and then again is able to go to the connect page with a new accID because for some reason it blocks the user to enter the connect page if you paste the same url again.

pastel storm
#

(Not a new Account, just a new Account Link that is created by providing the ID of the existing Account object you created for the user previously)

lethal marten
#

aaaaahhhh

#

oke haha

pastel storm
#

Account Link URLs are single-use, you have to generate a new one if the previous one was accessed.

lethal marten
#

now i get it

#

and one more question we have now multiple profiles in express but how do we delete them?

pastel storm
#

Something to be mindful of, is that your user will be directed to the refresh_url you provide when creating the Account Link if the link is expired. So you'll want to make sure the logic on that URL isn't also creating new Account objects.
https://docs.stripe.com/api/account_links/create#create_account_link-refresh_url

lethal marten
#

Okay thanks alot Toby this session helped us alot!

pastel storm
#

Any time!

#

Happy to help