#Enema-connect-payouts

1 messages ยท Page 1 of 1 (latest)

opaque bobcat
#

Hi there! You attach an external account to the Connected Account and then issue the payout.

#

What type of Connected Accounts are you using?

frail patrol
#

Probably more a terminology issue: a Platform "transfers" money to a connected account; that money is then "paid out" from the Connected Account to the Connected Account's external bank account.

lilac nebula
#

Oh okay.

opaque bobcat
#

Ah yes, good call @frail patrol.

lilac nebula
#

So if I initiate a transfer to a connected account,

#

stripe will then handle the payout automatically?

#

These connected accounts.

#

btw thank you so much in advance

opaque bobcat
#

Yes if the Connected Account is on automatic payouts then yes the payout is created automatically

#

Have you decided on which charge flow you are going to use?

lilac nebula
#

Thank you guys.

opaque bobcat
#

Sure! Let me know if you have further questions

lilac nebula
#

How do I find if the connected accounts are on automatic payouts?

#

Sorry! I am new. A little background: The Stripe stuff has already been setup by my employer. I am just a dev who is automating stuff via the api.

#

Okay, I figured out that they are set to manual.

#

If they are set to manual, is there still a way to pay them via the api?

opaque bobcat
#

Yeah it will show in the Dashboard or you can retrieve the Account via the API to see

#

Yes you can payout by creating a payout (https://stripe.com/docs/api/payouts/create) and passing the Stripe Account header of the Connected Account (https://stripe.com/docs/connect/authentication)

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

lilac nebula
#

So when I try that, create a new payout and pass the account_id as the destination, I get this error:

opaque bobcat
#

Can you provide that account ID in text here?

#

So I can look at it

lilac nebula
#

acct_1IVfjz2f8uzkGI8u

opaque bobcat
#

thx

#

Okay so this is an Express account

#

With Express, the Express user handles adding their external account during onboarding.

#

That talks about top ups which you can ignore

lilac nebula
#

So I cannot pay the account without going through this process?

opaque bobcat
#

Correct. They must have an external account (a bank account or debit card) attached in order to payout

#

Else it doesn't really make sense. You can't payout funds to nowhere ๐Ÿ™‚

lilac nebula
#

Okay.

#

But she has an external account connected:

#

They all do. So I believe they have already gone through this process?

#

Should I issue the payment to this ID instead?

opaque bobcat
#

One sec

lilac nebula
#

Okay! Thank you! ๐Ÿ™‚

opaque bobcat
#

Okay so yeah that account looks fine. So, it is likely something with your request then. Can you provide the request ID where you are seeing that error? It should look like req_xxxxx

#

Ah I see

#

Can you share your code for creating the payout?

#

So you are passing the account ID into the destination param

#

You want to pass the bank account ID there (ba_xxxx above)

#

I'd really recommend doing some of this stuff in testmode before you make a live payout here

#

So that you understand how it works

lilac nebula
#

Okay awesome it looks like everything is working.

#

But

#

I am getting this error code:

#

Even though I am sure the account balance is sufficient.

opaque bobcat
lilac nebula
#

I have tried setting source_type to bank_account and card and both times I recieve this error.

frail patrol
#

Sorta-obvious question: does the Platform account have ANY balance?

zinc folio
#

Hello, I am stepping in for bismark who had to step out. Can you send me the latest request ID (req_123) from when you got that error?

lilac nebula
#

Yes! and I can read the balance successfully with:
const response = await fetch('https://api.stripe.com/v1/balance', {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + STRIPE_KEY
}
});

zinc folio
#

Is this available balance or pending balance? I am looking in to this but available balance should be the amount that you can't exceed here

lilac nebula
#

It is available balance.

#

I am trying to find the response ID right now

#

I am unable to find the id and these requests seem to be missing from the logs:

#

But yes, it is the available balance.

zinc folio
#

And so those 400s there are for other failed payout calls?

lilac nebula
#

Yes those 400s are other problems.

#

The response does not seem to have anything in the headers

zinc folio
#

Is that a developer console that these errors are in?

#

Can you send me your account ID? I can try to look up the request with that

lilac nebula
#

That error was sent back from stripe

#

Sure one second

#

acct_1Gj2u5GWRerWlKW5

zinc folio
#

Thank you. Checking in to that account ID

#

And I was more asking about that screenshot. Is that the developer console of a browser? I am mostly wondering if you have a client webpage that is making this /v1/payouts calls

lilac nebula
#

Yes it is the dev console for a browser. I am making these calls from js in the browser (it is just an inhouse app)

zinc folio
#

Sorry, I am still just having trouble finding an example of this error. Still looking and will likely reach out to my colleagues in a moment for assistance

#

Ah, it actually looks like that test account does not have enough balance in test mode. It has an available amount of $0

#

So you need to charge payments to that connected account or create a transfer from your platform account to your connected account and try the payout call again

lilac nebula
#

Thank you for help!

#

However, I am not using a testing key,

#

I am using the live key.

#

I am trying to pay using this balance:

zinc folio
#

Ah I see the live failures now. I am unsure what balance it is saying is too low. I will reach out to my colleagues and get back with what we find

lilac nebula
#

Thank you so much.

zinc folio
#

Would you mind sending me the body of what you get back from the balances request when you make it for this account?

lilac nebula
#

Sure.

zinc folio
#

That actually looks like the platform account's balance. Are you using the Stripe-Account header when making the list balances call as well?

#

From what I can see, it looks like the connected account actually does not have balance here. I accidentally got redirected to the platform account when checking the connected account's balance before but it looks like that connected account actually does not have money as its balance was paid out yesterday https://dashboard.stripe.com/connect/accounts/acct_1JS2qI2eIhDCrV1C/activity
https://dashboard.stripe.com/logs/req_M3bEkRfKfTQ0o3

frail patrol
#

Possibly the confusion is that "transfer" has to happen to the Connected Account first, then a payout from the Connected Account to the Connected Account's external bank account - it can't happen directly from the Platform balance.

zinc folio
#

It looks like proper transfers happened before other payouts from what I can see.

lilac nebula
#

So I cannot pay a connect account from the Platform account's balance?

#

Okay so I have to call a transfer to the connected account id, then I call a payout to the connect account's bank id after?

#

payout from the connected account

frail patrol
#

Exactly!

lilac nebula
#

Okay thank you.

#

๐Ÿ™‚

sweet ermine
#

@lilac nebula I reopened the thread

#

What's up?

lilac nebula
#

Hey thanks for the response. I actually just figured it out. Thank you guys so much ๐Ÿ™‚