#kasturi-more_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1365089569384693831
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kasturi-more_api, 1 day ago, 40 messages
- kasturi-more_api, 1 day ago, 11 messages
- kasturi-more_api, 2 days ago, 35 messages
Hi! Can you please share the Request ID associated with this issue? You can find it in your Dashboard: https://support.stripe.com/questions/finding-the-id-for-an-api-request
I am not seeing request in a dashboard
here - req_DarRK7NjIDRNsE
Got it from response header
What exactly are you trying to retrieve?
connected account related to payout
Those payouts will only be for your platform; I don't think you can retrieve all your Connected Accounts' payouts, but let me keep looking.
(Or at least not in a single API call, I don't think...)
Or I'm wrong.
I would appreciate any input
what I am trying to get - All the payouts initiated in last 7 days for weave's connected offices along with their account ID in the response
I can't see the results of GET requests, so I don't know what you're getting back when you make that request. Can you share one of the Payout IDs?
that was for test mode. Let me fetch it for live mode
here - po_1RHJn9HFzwE4pTgexoXcIVyT
req_MosovT2lnHy9ki
That po_ was from a payout to your Platform, not to a Connected Account.
how can I get the later?
You should see it at result.data.destination.account in your current request; what do you find there?
the weave account id which is same for all the test/live payouts - acct_1EaPCrHFzwE4pTge
And the payouts were paid out to the Weave bank account, ya?
yes - "account_holder_name": "Weave",
Right, so those are correct, ya?
yes. but I am looking for payouts going out for connected accounts
Ok, so there is no way to list Payouts for all Connected Accounts with a single API call.
Can you tell me more about what exactly you're trying to build here?
we want to store all the payouts in a db from stripe to our customers
Why?
every time we want to show all the payouts to a customer, we have to fetch all the payouts for related account from stripe which is not efficient
also, if it going out to weave , how we get corect customer data when we fetch payout using account_id?
If it's going to Weave, it's going to Weave - so I'm not sure what you mean by that?
If you want to store them all on your end you'll have to retrieve them all, for each Connected Account, up to 100 at a time (which is the largest limit you can set).
but we'll have to send account id in the request?
for each ConnectedAccount:
until done:
payouts = requestPayouts(connectedAccountId, afterPayout)
addToBigList(payouts)
if payouts.hasMore? then
afterPayout = payouts.last.id
else
done = true
That's ~pseudocode for the nested loops you'll have to do here to retrieve them all.
but cant do without looping through connected accounts?
Correct.
why - because it is possible that we won't be having payouts for each connected accounts everyday. We wanted it to behave similar like webhook
Like whenever a payout is created, we will have that event and store that info. but trying to achieve it with polling
Why not use webhooks then?
I'm assuming you're showing like ~25 payouts per page, ya? Why not just list Payouts with limit: 25 and paginate from there?
because we are implementing multi-processor behaviour. and it becomes inefficient to fetch data from all the processors for each customer
That's fair. I'd suggest listening to the payout.* set of events and use those to add/update payouts to your datastore. You can either use API calls in a loop, or Sigma, to backfill your datastore too.
Does that make sense?
okay. Thank you so much for all the help ๐