#chetan_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1337376752527216711
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
how are you accepting payments? Checkout Session, Payment Element, something else?
static async createBankAccountTokenforStripe(req, res) {
const { accessToken, accountId, userId } = req.body;
try {
const request = { access_token: accessToken, account_id: accountId };
const response = await client.processorStripeBankAccountTokenCreate(
request
);
const bankAccountToken = response.data.stripe_bank_account_token;
const findCustomer = await Customer.findOne({ userId: userId });
if (!findCustomer) {
return res.status(404).json({ message: "Customer Not Found." })
}
const bankAccount = await stripe.accounts.createExternalAccount(
findCustomer.accountId, // The connected account ID
{
external_account: bankAccountToken, // The bank account token from Plaid
}
);
// console.log('Bank account added to connected account:', bankAccount);
await stripe.accounts.updateExternalAccount(
findCustomer.accountId,
bankAccount.id,
{ default_for_currency: true }
);
if(bankAccount){
await Customer.findByIdAndUpdate(findCustomer._id,{bankAccountId:bankAccount.id},{new:true});
await User.findByIdAndUpdate(findCustomer.userId,{isBankDetailAdd:true})
req.flash('success_msg', "Your bank account is connected.");
}else {
req.flash('error_msg', "Your bank account is not connected. Please try again.");
return res.status(412).json({message:"Your bank account is not connected. Please try again."})
}
req.flash('success_msg', "Your bank account is connected.");
res.json({bankAccount});
} catch (error) {
req.flash('error_msg', error.message);
res.status(500).json({
error: error.message || 'Failed to authenticate with Plaid'
});
}
}
i am create account but stripe is restricted account plaid using why ?
I don't understand your question. what is the issue with the code you shared? do you get an error message? if so, which one?
issue is
The account owner needs to provide more information to Stripe to enable capabilities on this account.
why i am plaid use but stripe is not account complte
I don't understand sorry. can you share a concrete example of the issue?
how to connect plaid + stripe account
which Stripe documentation are you following?
then you need to ask plaid for support.
plaid saying
Contact Stripe Support: If the issue persists, contact Stripe support for assistance. They can provide specific details about why the account is restricted and what steps you need to take to resolve the issue.