#jahanzaib

1 messages · Page 1 of 1 (latest)

gilded belfryBOT
dreamy copper
lusty nimbus
#

req_EANtDTPXNpHL08

#

its under Easefix Project

#

acct_1Lu9lQDI33TeiIno (this is the connected account id)

dreamy copper
#

OK, so you are making a API call on behalf of a connected account, but the request is missing the Stripe-Account header

lusty nimbus
#

how to set header in api call ? do i have to pass another param ?

#

const payout = await stripe.payouts.create({
amount: parseInt(data.amount * 100),
currency: data.currency,
destination: data.destination
});

#

this is my object

#

do i have to add another key in this object

#

?

dreamy copper
#

So your code should be something like

const payout = await stripe.payouts.create({
            amount: parseInt(data.amount * 100),
            currency: data.currency,
            destination: data.destination
        },{
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'
});```
lusty nimbus
#

just gimme a minute let me try that

#

can i also pass sourceTransaction in that ?? because its giving me insufficient balance error in test mode

dreamy copper
#

sure, you can do that, make the to pass a resource ID that was created in the connected account.

lusty nimbus
#

const payout = await stripe.payouts.create({
amount: parseInt(data.amount * 100),
currency: data.currency,
destination: data.destination,
source_transaction : data.sourceTransaction
}, {
stripeAccount: data.connectedAccountId
});

#

is this fine ?? beacause in documention there was no source transaction param was defined

dreamy copper
#

Ah, sorry there's no source_transaction for payout, source_transaction is a param for transfer

#

You can transfer some funds from platform to the connected account, and call the payout API again

lusty nimbus
#

ok, my case is when a user completes a certain job i want to transfer money to merchant's external bank account at that instance....before i was creating a transfer when job ends and stripe took 7 days to create a payout

#

so thats why i am creating a payout manually when the job ends...do i have to make transfer also ?

dreamy copper
#

You described your problem clearly.

The first few payout usually take a longer time, and the payout speed also varies depending on the connected account's country. In addition, manual payout won't speed up the payout.

lusty nimbus
#

its based in UK

dreamy copper
lusty nimbus
#

i just have to pass method in the object? that will do it ?

#

const payout = await stripe.payouts.create({
amount: parseInt(data.amount * 100),
currency: data.currency,
destination: data.destination,
method: 'instant'
}, {
stripeAccount: data.connectedAccountId
});

#

like this ?

dreamy copper
#

Yes. Just note that instant payout is not available to new accounts.

lusty nimbus
#

if my bank account supports instant payout....so when i create a transfer to my connected account stripe will automaticaly create a instant payout for me or do i have to create a transfer and payout both manually ??

dreamy copper
#

No, transfers and payouts are two different APIs, calling transfers API won't trigger payouts

lusty nimbus
#

yes they are two different apis....but before when i was just creating a transfer to connected account...and stripe used to automatically created a payout for that transfer in my bank account

dreamy copper
#

That means you were on auto payout previously, in which Stripe would automatically creates payouts and send funds to external accounts

lusty nimbus
#

do i have to contact stripe to enable an instant payout for my account ?

#

can stripe support auto instant payout ?

dreamy copper
#

What do you mean by auto instant payout?

lusty nimbus
#

that when i create a transfer stripe automatically create a instant payout for that transfer (not 7 days)

#

and i dont have to create a payout manually

autumn remnant
lusty nimbus
#

from where i can change the payout schedule ?

#

in stripe dashboard

autumn remnant
#

Is this for your account, or a connected account?

autumn remnant
lusty nimbus
#

yes

autumn remnant
lusty nimbus
#

let userData = {
country: 'GB',
type: 'custom',
requested_capabilities: ['card_payments', 'transfers'],
business_type: 'individual',
email: req.spData.email,
individual: {
first_name: req.spData.firstName,
last_name: req.spData.lastName,
email: req.spData.email,
phone: req.spData.phonePreFix + req.spData.phoneNumber,
dob: {
day: dob.format('D'),
month: dob.format('M'),
year: dob.format('YYYY'),
},
address: {

            line1: req.body.primaryAddress,
            line2: req.body.primaryAddress,
            city: req.body.city || '',
            postal_code: req.body.postalCode || '',
            state: req.body.state || '',
            country: 'GB',
        },

    },
    tos_acceptance: {
        date: dateTime,
        ip: clientIp
    },
    business_profile: {
        mcc: '7392',
        name: req.spData.firstName + ' ' + req.spData.lastName,
        product_description: 'home services',
        support_phone: '+18444463889',
        url: 'easefix.com',
    }
};

let newConnectedAccount = await createConnectedAccountOnStripe(userData, 3);
#

thats how i am creating a connected account

autumn remnant
#

Not sure if its possible via the Dashboard, you'd need to check the via the steps at the URL I shared earlier

lusty nimbus
#

payout_schedule: {
interval: ‘daily,
},

#

if i add this in the above object

#

my payout will be paid off in a day (not 7 days)

#

?

autumn remnant
#

There'd be daily payouts generated yes

lusty nimbus
#

and will transfer money in my bank account in a day also ?

autumn remnant
lusty nimbus
#

my account is based in UK, so it means i can receive funds in max 3 days ?

autumn remnant
#

Yes

#

If you're using a UK bank account, then you likely qualify for instant payouts if you need them faster

lusty nimbus
#

ok thanks for your help...Appreciate it!!