#matthew_pagination-order

1 messages ยท Page 1 of 1 (latest)

acoustic quarryBOT
#

๐Ÿ‘‹ 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/1481771739879837896

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

thorn rover
crimson turret
#

yes

thorn rover
#

As far as I know, our APIs do not expose a simple way to retrieve the customer's balance as of a specific date/time. You would need to examine the current balance and then walk backwards through the list of transactions to determine the changes that were applied.

crimson turret
#

which seems to do what we want but only if the endpoint is sorting transactions

#

by date descending

#

do you know if that endpoint has sorting?

thorn rover
#

All our List APIs sort descending (newest first)

crimson turret
#

is that in the docs anywhere?

#

but I couldn't find it for customer transactions and the ai help was saying the endpoint was unsorted

thorn rover
#

I would never trust an AI for Stripe API advice. It's the thing they seem to get wrong the most

#

They love to invent endpoints and parameters that don't exist

#

The sorting is a core piece of our List API infrastructure

#

All the pagination features depend on it

#

So it would be a big problem if that wasn't true.

But you can also test this for yourself.

crimson turret
#

Thanks, we did test with one customer and the results were as expected but we just couldn't see anywhere that guaranteed order

thorn rover
#

Yeah. I wish we wrote in more generally. We could add a section to the top of the API reference doc to call this out here

#

Basically, this became so "baked in" people writing our docs stopped referencing it to avoid unnecessary clutter

#

But I can see with it mentioned for Balance Transactions, Charges, Customers, etc. it starts to seem fishy when you don't see it

#

I can file that feedback

acoustic quarryBOT
#

matthewwoodruff_customer-balance-transactions

thorn rover
#

Feedback filed

acoustic quarryBOT
young plank
#

matthew_pagination-order