#stan-trees_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- stan_connect-flow, 2 hours ago, 38 messages
- stan-trees_code, 22 hours ago, 45 messages
- stan-trees_code, 1 day ago, 4 messages
- stan-trees_code, 1 day ago, 21 messages
- stan-trees_api, 1 day ago, 62 messages
đ 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/1240486353095888916
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
specifically onboarding for connect accounts
would i use external account? or .updated
i tried doing this ```js
(async () => {
const accountLink = await stripe.accountLinks.create({
account: accId,
refresh_url: 'https://example.com/reauth',
return_url: 'https://example.com/return',
type: 'account_update',
});
console.log(accountLink.url)
})()``` but it says i cant use `acount_update`
You should listen to account.updated
this is not related to the webhok btw
but i couldnt make an update link
that way i can trigger the account update event
how do i get the connected account id from the event?
https://docs.stripe.com/connect/webhooks use connect webhook, and you'll get the connected account ID in the event's account property
i get this error when i try to do it
error: You cannot create `account_update` type Account Links for this account. Valid types for this account are ["account_onboarding"].
ah i see
is there any other way i can test my webhook?
https://docs.stripe.com/webhooks/quickstart you can use stripe listen to set up a local webhook listener
right but how do i trigger the account_update event
this isnt working
What's not working? did you use stripe trigger account.updated
oh i can do that?
is there something i can do similar to metadata in creating a session? that way i can pass some data that i need
like metadata but for creating account link and then receiving it on webhook
no, account link dosn't provide metadata.
how can i correlate a user to their connected account id?
user on my platform
right now i have it set up as they go through the create account link like this
(async () => {
const accountLink = await stripe.accountLinks.create({
account: accId,
refresh_url: 'https://example.com/reauth',
return_url: 'https://example.com/return',
type: 'account_update',
});
console.log(accountLink.url)
})()``` but i need it so i can pass a string in through the account link too
that way i know who created the account
You can pass it as a query param to your own URL, i.e., https://example.com/reauth?account=acct_xxx
is the only way to have a domain?
You don't have one?
my platform isnt like a website, im trying to correlate a discord id to the account created
is the email necessary for creating a connected account?
or can i pass any string
like this
const account = await stripe.accounts.create({
type: 'express',
country: 'US',
email: 'test'
})```
No, email is not mandatory
but its not required for the email to be an email format right?
like i can just put an id in there and it'd be fine
just easier for me to identify
I don't think it'd work but you can test it out
does it check for email?