#juiceman-list-payouts
1 messages ยท Page 1 of 1 (latest)
i tried to talk to customer service about this but I had no lucj
the formatting of your question is super confusing, you mixed up words and code all in one
the code is all the payouts. but i just want the customer payouts
juiceman-list-payouts
A Customer in Stripe represent the individual/entity paying for a service. A Customer never has Payouts.
You mean a connected account right?
yes
so i have a website where people buy and sell things from one another.
i want to see the moneys that has gone to the customer.
when the customer logs in, they want to see when they got the moneys for the items they sold
please do not use the word Customer when talking about a connected account to avoid any additional confusion
the connected account acct_1MjlOA4EIoSAbTHz has never had any Payout to their bank account yet. so it's normal that the list is empty
1 sec
has there been any payouts that are not the connected account whose bank account end in 1801
I don't even understand the question I'm sorry.
You are trying to list Payouts made on a connected account. That list is empty, and that connected account never had any Payout. So your code works totally fine and is correct, you just seem to be mixing up concepts or ids maybe
right right.
the platform bank account ends in 1801,
there should be payouts to other accounts that are not TO the platform account.
are there payouts to accounts that are dont end in 1801
That mostly doesn;t make sense at all as a question. And I can't really talk about this on Discord. I help developers with questions about their code.
You are a platform. You have a balance in your Stripe account. That balance gets paid our to your own bank account(s) on file. Separately, you have connected accounts. You can transfer funds into those accounts' balance in Stripe using either the Transfers API, or creating payments on their behalf and such.
Those accounts then have their own balance which can be paid out to their bank account(s) on file after a while
il go back to customer service, thank u though
Customer service won't be able to help you with your question though
im kinda confused,
the payouts I shared with you are all the payouts.
there should be payouts to the connected accounts but there arent, is that correct?
I see you're confused, I'm just not sure what the problem is with what I explained in details. You do seem to be mixing up the vocabulary completely though
like there is the platform account and the connected accounts
a Payout represents money moving from a Stripe account's balance to outside of Stripe, their own bank account on file.
Each Stripe account has its own balance.
You as a platform have your own account and balance. And each connected account is a Stripe account with a balance.
There is no API that lists all Payouts across all your connected accounts
right right.
so based on the payouts, is there payouts to any connected accounts?
the payouts that I provided apperantly all go to the platforms connected account
so based on the payouts, is there payouts to any connected accounts?
I can't tell you that. First it's an account specific question I wouldn't answer here. But second, there's no API that tells me (or you) this. I'd have to look at every single connected account which I wouldn't do. And you're all in Test mode, usually this is something you should know as the developer testing all of this.
Now if you want a definitive answer, it's really easy to write code for it yourself
1/ List all connected accounts via https://stripe.com/docs/api/accounts/list
2/ For each connected account, call https://stripe.com/docs/api/payouts/list + https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header and check if the results find any Payout or not
ok so i think the code works
let me play around here a bit. thank u though!
i really appreaciate it
sure, let me know if you have a question, I'm around for a bit and will keep this open. Feel free to share your exact code too
do you guys have like a video or a course to learn it all? i find it dificult to read the docs
We have lots of videos but hard to say which one(s) would be a good fit for you https://www.youtube.com/@StripeDev/playlists
everything is working now, than you!
Amazing! did you end up finding a connected account id with a Payout?
yea i can see the payouts to the other accounts from the same user.
now I need to figure out how to get all the connected accounts per user lol. im looking into the docs
yeah that doesn't make sense either. There's no "user" concept in our API so I don't really grasp what you could even mean ๐
hahaha dang it. i think i meant a customer lol
a Customer is still the person who pays for a service/product and has nothing to do with connected accounts ๐
dont hate me lol.
this is how i create a connect account:
const account = await stripe.accounts.create({
type: 'express',
email: req.userData.email,
settings: {
payouts: {
schedule: {
"delay_days": 10,
"interval": "daily",
}
}
}
});
// this allows me to save some information on my db,
createStripeBankAccount({ userId: req.userData.userId, stripeBankId: account.id })
const accountLink = await stripe.accountLinks.create({
account: account.id,
refresh_url: FRONTEND_URL+'settings',
return_url: FRONTEND_URL+'settings',
type: 'account_onboarding',
});
res.status(201).json({
url: accountLink.url
})
is there a way to get all the connected accounts for an email or per customer
please try to stop saying "customer" when you mean connected account
like you can't really get good help from us if you keep doing that mistake each time. You're just going to get wrong answers half the time because we misunderstand what you are even asking
To me it makes no sense that you'd have multiple connected accounts representing the same person. So really you need to make sure this never happens. You should know who the person/entity is and whether they already have a Stripe account or not