#arvind_singh_21006

1 messages · Page 1 of 1 (latest)

crisp cryptBOT
dim shard
#

Hi! Let me help you with this.

weak summit
#

but is this possbile to direct payout in bank account not using the transfer method

dim shard
#

You mean you want to pay out from your Platform's balance to the Connected account's bank account?

weak summit
#

Yes

#

how can i?

dim shard
#

That's not possible, unfortunately.

weak summit
#

then how can we do this ?

dim shard
#

Why you can't transfer funds to your Connected account first?

weak summit
#

can you given the flow ?

#

?

dim shard
#

What your current setup looks like?

weak summit
#

wait i given the code

#

this connect Api for the connect account
router.get('/connectStripe', auth, (req, res) => {
const queryData = {
response_type: 'code',
// client_id:'ca_OCtAPDoVdQTGpnrsFf1mzpT4HSNHzeEL',
client_id: 'ca_OGDQJ3NpZbanZCtQCpQe8UHk1bBRfuNB',
scope: 'read_write',
redirect_uri: 'http://localhost:8889/cms/booking/redirect/'
}
let authorizationHeaader = req.headers.token;
const connectUri=https://connect.stripe.com/oauth/v2/authorize?response_type=code&client_id=ca_OGDQJ3NpZbanZCtQCpQe8UHk1bBRfuNB&stripe_user[email]=${req.user.email}&scope=read_write&state=${authorizationHeaader}&redirect_uri=http://localhost:8889/cms/booking/redirect/
// const connectUri=https://connect.stripe.com/oauth/v2/authorize?response_type=code&client_id=ca_OGDQJ3NpZbanZCtQCpQe8UHk1bBRfuNB&scope=&tokenId=${req.user._id}&redirect_uri=http://localhost:8889/cms/booking/redirect/
// return connectUri
return res.json({ connect: connectUri })
})

#

and this
exports.fundTransfer = async (req, res) => {
try {

    // const transfer = await stripe.transfers.create({
    //     amount: Math.round(6 * 100),
    //     currency: 'aud',
    //     // customer: 'cus_OCsxl2nNhvTGig',
    //     source_transaction: "ch_3NTdwhI2JnJVTkz00FQjxRE0",
    //     destination: 'acct_1NTTFbDKP93GjLMk', // Replace with the destination account ID or seller's Stripe account ID
    //     // source_transaction: 'ch_3NQO33LvhvigSbBg0zAJ3rNe' // Replace with the charge ID associated with the payment
    //     // transfer_group: 'ORDER_95'
    // })
    // return transfer
    const transfer = await stripe.transfers.create({
        amount: Math.round(1 * 100),
        currency: 'aud',
        source_transaction: 'ch_3NUmeMHnkNc8JPqN1f6mymTD',
        destination: 'acct_1NVTVII93ppumMX9',
    });
    return transfer;
} catch (error) {
    console.log("🚀 ~ file: booking-service.js:3018 ~ exports.fundTransfer= ~ error:", error)
    throw error;
}

}
transfer fund from stripe plateform to connect account balance

#

and this payout method to payout to bank account const payout = await stripe.payouts.create({
amount: Math.round(1 * 100),
currency: 'aud',
});

dim shard
#

After you transfer the funds with stripe.transfers.create() you can pay out to the connected account's bank account.

weak summit
#

okay got it

#

Thanks

dim shard
#

Happy to help!