#bilal-connect-reconciliation
1 messages · Page 1 of 1 (latest)
Hey @pine flint I don't see how that code could work. The payout parameter is supposed to be a string like po_123 and be made on the connected account with the stripeAccount option https://stripe.com/docs/connect/authentication#stripe-account-header
@tired mesa I get the code from GPT, But the logic will remain the same.
gotcha then that code is mostly nonsense lol
So taking a step back: what are you trying to do What does "total amount withdrawn" mean in the first place?
It means the total amout withdrawn to bank account from this stripe connect account till now.
Okay so you want to use the List Payouts API https://stripe.com/docs/api/payouts/list and you're making the call on the connected account so you use https://stripe.com/docs/connect/authentication#stripe-account-header
Yeah, but there is no difference between both approaches. In one(suggested by gpt), we are getting payouts using balance transactions.
In the one, you suggested, we are getting them directly.
But after fetching payouts in both cases,we have to loop through payouts to get sum.
Is there any better approach?
No, It doesn't have It provides list of payouts.
I want the total payout amounts (total amount withdrawn)
I'm sorry, I just don't understand the vocabulary you're using/ I don't know what "withdrawn" means to you.
I am talking in terms of connect account held by user of our web app.
Withdraw means payout
I want to show users the total amount thry have withdrawn till now.
I'm really sorry the vocabulary you use is different from Stripe and I'm really not following you. Can you try and write detailed sentences all in one message that clearly explains the situation?
Because everything you say, to me, points to a list Payouts.
I think the code is explaining the whole story of what I want. But anyway.
I am building a platform where furniture movers help people and people send them payment/money.
We are using a custom stripe connect account for movers.
I want to show users how much total money they have moved from the platform to their bank account till now i.e.; how much they have withdrawn.
I understand what solution you are proposing. But I want to ask does stripe provide this total without needing me to loop through payouts and figure out this sum?
Stripe does not provide a total no. You, as the platform, can cache this information to not have to loop through.
And based on what you described, my recommendation is the only correct one to know the total sum "withdrawn" which is the sum of all Payouts
Ok Great. Thank you for your help.