#abinashvision135

1 messages · Page 1 of 1 (latest)

sacred ferryBOT
languid flicker
#

hello! I don't quite understand the question, can you perhaps try elaborating what you're trying to do with more details?

severe swan
#

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

languid flicker
#

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

Learn how to route payments between multiple parties.

severe swan
#

i try to implement code and check console showing account is created, but i haven't see any account created on stripe connect

languid flicker
#

can you share the code snippet and what's the account id for the created account?

severe swan
#

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});
}
}

languid flicker
#

i suggest you go through the Connect guide that i previously provided for an overview first

sacred ferryBOT
severe swan
#

what will code of connected account like example any

urban raft
#

I don't understand that question

severe swan
#

i am asking, what will be code of connected account in stripe connect

urban raft
#

I still don't understand what you're asking

#

"what will be code" unfortunately does not mean anything to me.

severe swan
#

how to implement stripe connected account in next.js

#

this is my question

urban raft
#

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.

severe swan
#

stripe account connected