#fonseca_connect-payout2
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.
- fonseca_connect-payout, 4 minutes ago, 19 messages
- fonseca_error, 1 day ago, 56 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/1238186923214766121
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello again haha
@pine lake I assume that you're mixing up your own bank account id as a platform and the id of a bank account of a connected account
fonseca_connect-payout2
async setupBankAccount(
connectedAccountId: string,
data: NewBankMessage,
name: string,
) {
const account = await this.stripe.accounts.retrieve(connectedAccountId);
const routing_number = `${data.bank}-${data.agencyNumber}`;
try {
const token = await this.stripe.tokens.create(
{
bank_account: {
country: 'BR',
currency: 'brl',
account_number: data.accountNumber,
routing_number,
account_holder_name: name,
account_holder_type:
account.business_type === 'company' ? 'company' : 'individual',
},
},
{
stripeAccount: connectedAccountId,
},
);
if (token.id) {
const bank = await this.stripe.accounts.createExternalAccount(
connectedAccountId,
{
external_account: token.id,
},
{
stripeAccount: connectedAccountId,
},
);
await this.stripe.accounts.update(connectedAccountId, {
external_account: bank.id,
});
return bank;
}
} catch (error) {
console.log(error);
}
}
This my code
that's unlikely to be the code that cases the error though
Sorry can you try and explain the exact issue? Which exact line of code is throwing that specific error
I'm sorry you're being really vague right now because you're deep in this already.
Take a couple steps back, look at the exact code and let me know the exact API request that causes that error and what parameters you send to that API
but the bank is created in stripe
is the unique function what I execute
when will create a external Account
hello?
sorry looking
Right now you seem to mix up a lot of words/concepts like external account, account, transfer, payout. I'm not really understanding what the problem is and you haven't really said whiche exact line of code is failing. You have to debug this first
Did you figure it out?