DEV Community

performautodev
performautodev

Posted on

NodeJS - Connected account is required to transfer money from stripe account to another stripe account?

This is my use case:

First, the user pay 100$ with react-stripe-checkout https://www.npmjs.com/package/react-stripe-checkout

I handle the logic on NodeJS server:

So! i want like this:

1- Create a charge (100$) to primary account stripe (A).

await stripe.charges.create({
amount: 100000, currency: 'USD', source: args.token,
});

Then i want to create a transfer of $30 to another stripe account

await stripe.paymentIntents.create({
payment_method_types: ['card'], amount: 3000, currency: 'USD', }, { stripe_account: 'acct_xxx ',
});

or

await stripe.transfers.create({
amount: 3000,
currency: 'USD',
destination: 'acct_XXX',
transfer_group: 'ORDER_95',
});

Like this is correct or is required activate the Connected account and i have to pay for that ?

So i have a *error: No such account: acct_xxx *

What is the best way to achieve it?

Top comments (0)