#mymodian_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1262731126200471585
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mymodian_best-practices, 6 days ago, 14 messages
Probably because that endpoint doesn't return canceled subscriptions by default and all 11 of the subscriptions associated with that cus_xxx are canceled: https://dashboard.stripe.com/test/subscriptions?customer=cus_QN1Yqaa8sgeU1n&status=all
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Oh, you're passing status: 'all'. Can you share the req_xxx?
the first query is success, but the second query with StartingAfter returns empty.
is the StartingAfter field wrong?
If you can share the req_xxx IDs of the GET /v1/subscription requests I can check
how can i get the request id without login to the dashboard?
"req_DF1koEmSv5oKU4" you can help check this request
Do you have the ID for the first request?
That's a request with the same parameters as the other. I need to see the initial request in your pagination (without starting_after) and the JSON that is returned
"req_SB4eKnfsG4zaQJ" here's the 1st request
OK
the last subscription returned by this request (req_SB4eKnfsG4zaQJ) is sub_1PXROZ06MwLWnujJZRan62kK. so could you try making a new request with starting_after: sub_1PXROZ06MwLWnujJZRan62kK and see if it works?
ok
sub_1PXROZ06MwLWnujJZRan62kK
why i didn't find this subscription id in the 1st page?
can you share the JSON response of the original request req_SB4eKnfsG4zaQJ? because it should be in there.
which field will contain this?
when you list subscriptions, you get back an array with multiple subscriptions. you would take the ID of the last subscription of the array, and use that for the starting_after parameter.
or a simpler option, if you use our SDKs, is to use the auto pagination feature: https://docs.stripe.com/api/pagination/auto
yes, i use the last id of the array, but it just return empty
have you tried my suggestion above? did it work?
#1262731126200471585 message
i didn't see the subscription id in the 1st page, even it work, it still can't tell me why
do you have a sample code?
let's move step by step please. okay, so my suggestions worked, that's good! now can you answer my other question? #1262731126200471585 message
Stripe doesn't store the API response for get requests. so you'll need to make a new request, and copy/past the JSON returned here.
i think it's because the Auto-pagination is default enable, but i give a limit.
when i set single to true, it worked.
if single is false, can't set limit?
what do you mean by "if single is false"?
the ListParams field "single"
I'm sorry I don't understand. you can see here all available parameters for the list endpoint: https://docs.stripe.com/api/subscriptions/list
in go, here's a common parameters: ListParams
because Auto-pagination is default enable, so after the 1st list, there's no data more.
That param sounds like it is meant to prevent auto pagination and just request a single page, but i'm not deeply familiar with it
Can we take a step back and understand where you're seeing unexpected behaviour?
My colleagues have shared that you need to provide the last subscription ID of the first List results with starting_after to manually page. When you do that, does it return the second page like you expect?