#Asif

1 messages · Page 1 of 1 (latest)

willow yokeBOT
broken plinth
#

The only possible way is to list all customers with expanding subscription and check whether the customer has subscriptions

spare stratus
#

i did not understand last comment

#

@broken plinth

broken plinth
#

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

spare stratus
#

Ok thanks