#harisabbasil-Connect

1 messages · Page 1 of 1 (latest)

steady anvil
broken loom
#

const token = await stripe.tokens.create({
card: {
number: '4000056655665556',
exp_month: 6,
exp_year: 2023,
cvc: '314',
currency:"USD"
},
});
console.log("token ",token)
//Creating connected account against user email
const account = await stripe.accounts.create({
type: 'custom',
country: 'US',
email: req.body.providerEmail,
capabilities: {
card_payments: {requested: true},
transfers: {requested: true},
},
business_type:'individual',
default_currency:"USD"
});
console.log("account ",account)
//create external bank account
console.log("Creating bank account")
const bankAccount = await stripe.accounts.createExternalAccount(
account.id,
{
external_account: token.id,
}
);
console.log("bankAccount ",bankAccount)

//Making connected account agree to terms and conditions
const account2 = await stripe.accounts.update(
  account.id,
  {tos_acceptance: {date: 1609798905, ip: '8.8.8.8'},business_type:'individual'},
  
);
console.log("account2 ",account2)
//initiating transfer
const transfer = await stripe.transfers.create({
  amount: 10,
  currency: 'USD',
  destination: account.id,
  transfer_group: 'ORDER_95',
});
console.log("transfer: ",transfer)
steady anvil
broken loom
#

I've already added this prop while creating account: capabilities: {
card_payments: {requested: true},
transfers: {requested: true},
},

steady anvil
#

This is just to request the capabilities, but it doesn't guarantee that theses capabilities will be enabled. You need to check the requirements hash and make sure the necessary info are collected

broken loom
#

Is there any way to payout any person without creating connected account?

steady anvil
#

No i'm afraid, you can only payout to an account.

broken loom
#

Okay because there are so many requirements needs to be associated with account thats why was thinking of just send money directly to external bank account

steady anvil
#

Yes, these requirements are needed as per local regulations.