#icra - Customer Subscriptions
1 messages · Page 1 of 1 (latest)
As i see Customer.retrieve has no 'subscription' object.
Hello! To clarify, are you trying to make a single API call to fetch both a Customer and a Subscription?
Kind of. Listing customer subscription ids would be enough
This way i can avoid storing subscription ids on my database, and i'll need to keep track only of customer ids
The subscriptions property on a Customer is expandable, so you can fetch the Customer and all of their Subscriptions at once: https://stripe.com/docs/api/customers/object#customer_object-subscriptions
I see. Do i have to manually expand it then?
Because when i'm calling Customer.retrieve ENDPOINT i am getting no subscription field in the result JSON
You have to specify what you want expanded, yes.
There are more details here: https://stripe.com/docs/api/expanding_objects