#Asif
1 messages · Page 1 of 1 (latest)
I'm afraid we don't have such API for listing customer with subscriptions only. Searching customers API only supports following fields: https://stripe.com/docs/search#query-fields-for-customers
Search customers API: https://stripe.com/docs/api/customers/search
The only possible way is to list all customers with expanding subscription and check whether the customer has subscriptions
This simply means that you will list all customers information with List Customers API: https://stripe.com/docs/api/customers/list
Since subscriptions parameter is not included by default when listing customers, you'd need to expand subscriptions field, so that subscriptions of the customers can be returned: https://stripe.com/docs/api/expanding_objects
With the customers' information, you could then check whether there's any subscriptions present on the customer
However, I'd recommend keep tracking whether customer has a subscription in your own database instead of using Stripe API. This means that every time when the customer subscribes, you also save the information to your database
Ok thanks