#HK6
1 messages · Page 1 of 1 (latest)
Hi there!
No there's no way to filter charges by creation time.
So I think the only option here would be to list all charges, and then paginate until you find the oldest charge.
arf, might be very slow
ok, I'll do that and store as connecta ccount meta
so I do it once for good
Yes it's not ideal, but you can only do it once and store the result somewhere.
thanks a lot
Happy to help 🙂
last one
they are guaranteed to be returned in descending order right?
no need to store them, and take the min
I can just reach the last and store?
they are guaranteed to be returned in descending order right?
Yes
I can just reach the last and store?
Yes it should work
and,
charges = stripe.Charge.list( on_behalf_of=account_id, limit=100, expand=["data"], status="succeeded" )
Seems the on_behalf is ignored
is that supposed to work?
no it's not
if you want to get the Charge objects that exist on a connected account, you'd use the Stripe-Account header
if you want to get Charges on your platform that used the on_behalf_of param set to a certain account, there's no list API filter for that and you have to filter the results in your code