#putte
1 messages ยท Page 1 of 1 (latest)
If you list the external accounts for this account, do the IDs that you have been using show up? https://stripe.com/docs/connect/charges-transfers
I'm not following
Nonetheless I am able to make the transfer and all, but there I'm using the account_id of the connect account
"acct_XXXXXXX..."
Whoops sorry wrong link
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If you list the account's connected accounts, that will show you what you can pay out to with that create payout call
Yes it does
So these are test accounts so there are no sensetive information:
So the first image is the error message from stripe
Can you send me the ID of the request when you got this error (req_123)?
the second is when I used the api that you sent, for the same account, you can find the id under "stripe_account_id" on the first image
req_oZdb95BdpWbNXS
Ah gotcha, so that ba_1MTQxWD8UfHZHyfXspX0LL4w account is on the connected account acct_1MTQxOD8UfHZHyfX. You will want to specify that you are making that payout call on that connected account https://stripe.com/docs/api/connected_accounts?lang=curl
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I'm not following
๐ stepping in here as Pompey needs to step away
What parameter should I use in the destination in the payout object
Tha bank account object (ba_xxxx) is the correct parameter
However, this is on your Connected Account as my colleague stated, whereas currently you are trying to pay out your platform which doesn't have that bank account attached, thus the error.
You need to use the Stripe Account header as we show here: https://stripe.com/docs/connect/authentication
In order to pay out on your Connected Account
Well I am not trying to payout to the platform. I am trying to make a payout to the connected account
Or maybe I misunderstood you?
Yeah exactly. So if you pass the Stripe Account header with the Connected Account ID like it shows in that doc you will make a payout on the Connected Account instead of on your platform
So I should use the paymentIntents API instead of the Payout API?
Nope
Can you drop your code here for how you are creating a payout?
I'll show you how to create it on your Connected Account
const data = {
amount: balance_data.available[0].amount / 100,
currency: balance_data.available[0].currency.toLowerCase(),
destination: account.external_accounts.data[0].id,
statement_descriptor: 'Company_Name',
method: 'standard',
metadata: {
user_id: user_id,
stripe_event_id: payload.id,
stripe_account_id: payload.account
},
}
const payout = await stripe.payouts.create(data)
The data is retrieved from the balance.available webhook
Cool so you do: const data = { amount: balance_data.available[0].amount / 100, currency: balance_data.available[0].currency.toLowerCase(), destination: account.external_accounts.data[0].id, statement_descriptor: 'Company_Name', method: 'standard', metadata: { user_id: user_id, stripe_event_id: payload.id, stripe_account_id: payload.account }, {stripeAccount: 'acct_xxxxx'} }
Ok let me try it out
It seems to work
God bless you. But let me make a suggestion that you might pass to someone that manages the documentation
You should add that into the documentation: https://stripe.com/docs/api/payouts/create?lang=node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It does not state that you can add an object after the data parameter where you specify the connect account ID in order to make payouts to connected accounts
Just a suggestion
It is in the API Reference here: https://stripe.com/docs/api/connected_accounts
And it is peppered throughout the Connect documentation
But I will still pass along feedback that this was hard to find!