#abinashvision135
1 messages · Page 1 of 1 (latest)
hello! I don't quite understand the question, can you perhaps try elaborating what you're trying to do with more details?
i want to use stripe connet, i don't know how to implement in nextjs.with firebase
Update Stripe API key (obsolete) as well as implement Stripe Connect, will
involve integration as well as adding an option in reviewer profile to
subscribe/connect/manage Stripe Connect Account. this is question. how can i implement this.
i need your help
we don't have an end to end guide on how to implement Connect using nextjs with firebase - we do provide generic guides here : https://stripe.com/docs/connect which you can take a look at and modify for your own use. If you have a specific problem or error, let us know and we'll try our best to help
i try to implement code and check console showing account is created, but i haven't see any account created on stripe connect
can you share the code snippet and what's the account id for the created account?
const handleBankDetails = async (e, bankDetails) => {
e.preventDefault();
try {
const stripe = await stripe_url;
const account = await stripe?.accounts?.create({
type: 'custom',
country: 'US',
email: bankDetails.account_holder_email,
requested_capabilities: ['transfers'],
business_type: 'individual',
individual: {
email: bankDetails.account_holder_email,
first_name: bankDetails.account_holder_name,
last_name: '',
address: {
line1: '123 Main Street',
city: 'Anytown',
state: 'CA',
postal_code: bankDetails.account_holder_pin,
},
dob: {
day: '01',
month: '01',
year: '1970',
},
verification: {
document: {
front: 'file_123',
},
},
},
business_profile: {
url: 'https://example.com',
},
tos_acceptance: {
date: Math.floor(Date.now() / 1000),
ip: '127.0.0.1',
},
});
await stripe?.accounts?.createExternalAccount(account.id, {
external_account: {
object: 'custome',
country: 'Belgium',
currency: 'AUD',
account_holder_name: bankform.holderName,
account_holder_type: 'custome',
routing_number: bankform.routing,
account_number: bankform.account_no,
},
});
await stripe?.accounts?.update(account.id, {
external_account: {
default_for_currency: true,
},
});
const bankAccount = {
country: 'US',
currency: 'USD',
account_holder_name: bankform.fname,
account_holder_type: 'individual',
account_number: bankform.account_no,
account_holder_email: bankform.email,
routing_number: bankform.routing,
account_holder_pin: bankform.pincode,
};
const result = await stripe?.token?.create('bank_account', bankAccount);
if (!result) {
console.log('Error creating bank account token.');
} else if (result.error) {
console.log(result.error.message);
} else {
token: result?.token?.id
console.log(result.token.id);
updateBankDetails(user?.uid, { ...bankAccount, token: result.id });
console.log(Bank details for user ${user?.uid} added successfully.);
}
console.log('Stripe Account Created:', account.id);
console.log('Bank Account Added:', bankAccount.id);
} catch (error) {
console.error(Error adding bank details for user : ${error.message});
}
}
Can you share the connected account id for me to take a look? In general, if you want to create a connected account, you would create an Account using : https://stripe.com/docs/api/accounts/create, and create an onboarding link using : https://stripe.com/docs/api/account_links/create
i suggest you go through the Connect guide that i previously provided for an overview first
what will code of connected account like example any
I don't understand that question
i am asking, what will be code of connected account in stripe connect
I still don't understand what you're asking
"what will be code" unfortunately does not mean anything to me.
which specific part are you having trouble with? We have shared multiple guides, and you already posted some code above that looks like it's pretty reasonable.
stripe account connected