#basil-payouts-list

1 messages · Page 1 of 1 (latest)

granite mesaBOT
soft summit
#

basil-payouts-list

#

@past rampart that is mostly impossible. And you will have to paginate anyways so it won't save you that much calls, so my advice is don't do that and instead list per Payout and move on (that's what every single developer I have talked to would do)

past rampart
#

@soft summit Let's say I have approximately 5 deposit balances per payout, and I can fetch 100 deposit balances in one call. This means that in one call, I can get balance transactions for about 20 payouts. Reducing the number of API calls by 20 times sounds really reasonable.

soft summit
#

Sure but you're thinking of your one small edge-case here which isn't the norm for the majority of Stripe accounts.
What you are asking for is impossible for now, we don't support this and don't plan to in the near future at least

past rampart
#

@soft summit
Could you please help me understand what the rate limitation is for these specific endpoints?

  1. Is it the Search API?
  2. Is the limitation for this operation 20 operations per second?
  3. And how many concurrent requests are allowed?
  4. Is it per integration or per account?
soft summit
#

it's the default rate limits since you aren't using the Search API. So it's 100 requests per second, and it's the same limit for concurrent requests.
But really you are trying to optimize something that doesn't need to. Just make the calls sequentially. Sure it might take an extra 10 seconds to ingest but it wouldn't matter when it's for a data ingestion job that should be done asynchronously already

granite mesaBOT
past rampart
#

@soft summit for my account, I have 250 payouts.
one API call takes ~3 sec
750 sec to get deposit balances for all payouts.
From what I see I can perform 100 parallel requests so it will be processed in ~9 sec.
Sounds correct?

grizzled egret
#

Hello! I'm taking over and catching up...

#

You shouldn't do parallel requests, make the requests sequentially.

#

You can list Payouts and list Balance Transactions and set the limit to up to 100, so you get up to that many in each response. If you have 250 Payouts that would be three API requests, for example.

#

Try starting with a limit of 50 and auto-pagination and see how it goes.

past rampart
#

@grizzled egret Sure, let’s forget about pagination.
Let’s say we have 50 payouts. And I need to fetch their balance transactions. So it will be 50 API calls. I don’t want to wait 50*3sec(api call execution time). So I will perform them in parallel

grizzled egret
#

That's not correct.

#

Again, please do not make these requests sequentally.

#

Ah, wait, I misread.

#

It's going to be a lot of API call for that many Payouts and all their Balance Transactions, yeah, but if you make them sequentally you shouldn't have any issues.

past rampart
#

sequentially will not work for me
it will take 150 sec(to requests 3 sec per each)
Rate limit allows me to have even 100 concurrent requests. So, just double-checking. Any issues to make it in parallel?

grizzled egret
#

You can try it, but I wouldn't recommend it. If you're doing that you're not going to leave much room for actual production requests, like people making payments.

past rampart
#

I see your concern. Thx a lot