John
John

Reputation: 829

Transfer money from stripe account to other account

I'm using this to charge a connected account the send the money to another account but I keep getting this error message.

I keep getting this error message:

You cannot supply a destination when charging a connected account.

   return stripe.charges.create({
      amount: 1000,
      currency: "usd",
      source: customer_id,
        destination: {
      account: "acct_1BxnsfGGXo2wovzm"
     },
 });

How can I do it? Thanks

Upvotes: 2

Views: 802

Answers (1)

Spiff
Spiff

Reputation: 596

Looking at the error message it seems the api believes you're using account debits where the destination parameter does not make sense:

https://stripe.com/docs/connect/account-debits

So it's likely that your customer_id variable contains an account id instead of a customer id here.

Upvotes: 1

Related Questions