#CalebR-Payouts

1 messages ยท Page 1 of 1 (latest)

high bolt
#

๐Ÿ‘‹ happy to help

prime swift
#

Thanks. Is it possible to expand as far as the original payment intent without separate API calls for each charge?

high bolt
#

I think so, let me try

prime swift
#

Thanks

#

I tried and got Stripe::InvalidRequestError ((Status 400) (Request req_OX9VHWJRMbuFks) You cannot expand more than 4 levels of a property)

high bolt
#

yeah that's the issue with that

#

sorry you got to it before I had the chance

prime swift
#

All good, it looks like the call you linked to will give me the payment intent id, which is the main piece of data that I needed from this call anyway

#

Thanks for your help!

high bolt
#

let me know if you need any more help

prime swift
#

Sorry, another question: I tried this with a recent payout for one of our platform accounts. The payout lists 29 charges in the dashboard, but I only get 10 balance transactions back with that call

high bolt
#

yes because it's a paginated list

prime swift
#

We're using the Ruby SDK, so I'll try that, thanks.

high bolt
whole moon
#

Hi ๐Ÿ‘‹ jumping in so my teammate can take a break. You can also adjust the limit that is used to determine the maximum number of records that should be returned (up to a max of 100) by our list functions. By default that limit is set to 10.
https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-limit

prime swift
#

Thanks for the tip!

#

So using limit: 100 and auto_paging_each together would minimize the number of API calls needed to accomplish the task?

whole moon
#

Exactly!

prime swift
#

Great, thanks. Most of our payouts so far are under 100 items, so that will speed up the processing a lot over 10 per page.

#

Less latency for us, and less hammering endpoints on your side

whole moon
#

Sounds like a win-win to me ๐Ÿ˜„

prime swift
#

Does the auto paging option also have a retry built in if we do hit a rate limit error?

whole moon
#

I believe it continues to use the retry logic from the client library. If I recall correctly, the auto-paging function still makes a request each time you retrieve the next page of results, it just forms the request for you so you don't have to track indexes.