#theglobe
1 messages · Page 1 of 1 (latest)
Hello! You'd get the most recently created 100 items that would match the conditions you've set
Also want to ask - how much do you know about pagination?
that's the thing. I've been trying to use pagination, but I don't think it's working properly.
I am using a GET https://api.stripe.com/v1/subscriptions?plan=price_1M2Ka5Da8Si35vWqllMiQg0A, but I also wanted to pass a "end_date" or "cancel_at" so I can limit my list, but I don't think Stripe accepts that, right?
We don't let you pass an "end_date" or "cancel_at" but we do let you filter based on current_period_end or created
yeah, that's not going to work because I want to get the canceled subscriptions of a specific date.
how can i use the pagination?
You want subscriptions that have already been cancelled? Or the ones that are currently active and will cancel in the future?
already canceled
Then you can also filter on status to narrow things down (https://stripe.com/docs/api/subscriptions/list#list_subscriptions-status)
For pagination are you using one of our client libraries? If so, you can just use the auto-pagination feature we offer (https://stripe.com/docs/api/pagination/auto)
i am using super blocks and making a rest api call to the subscriptions
Gotcha - then you'll have to use starting_after/ending_before and doing the pagination yourself (https://stripe.com/docs/api/pagination)
so then I have to check if has_more and use what exactly as a starting_after? an ID?
Yes it'd be the ID of the last object from your previous request - if you read the https://stripe.com/docs/api/pagination link I sent you we talk about all of this and also link to example videos on how this works
ok I will take a look at it thank you