#vinkesh
1 messages · Page 1 of 1 (latest)
Hi there!
yes
Pasting your messages here:
I am facing an issue when trying to get subscription list
from stripe
I am able get list of subscription using autopaging method
But not able to find a subscription in that list
not sure why
okay
So you are using https://stripe.com/docs/api/subscriptions/list, but not seeing any results?
No using c#
I am able to get 319 records from that list
But not seeing this subscription sub_1LSLkJHVHEtGIdCyQv43RvTu
in that list
although i am able to get it by sibscription Id
I am getting all the records no limit using autoapging
Interesting. Give me a few minutes to look into this.
ok
And can you share the code you are using to list the subscriptions?
public static async Task<List<Subscription>> GetSubscriptions(string apiKey)
{
SubscriptionService service = new();
List<Subscription> subscriptions = new List<Subscription>();
await foreach (var subsscription in service.ListAutoPagingAsync(null, new RequestOptions { ApiKey = apiKey }))
{
subscriptions.Add(subsscription);
}
return subscriptions.ToList();
}
This subscriptions has status:canceled. and as mentioned in the list endpoint:
In order to list canceled subscriptions, specify status=canceled.
Sure, it's the same link I shared with you earlier: https://stripe.com/docs/api/subscriptions/list
thanks
By default this exclude all cancelled subscriptions, uless you pass status: canceled