#Bando-subscription
1 messages ยท Page 1 of 1 (latest)
hi
I forgot to log 26 customers sub ids so i need to obtain them
I only have their customer id
You can use Customer retrieval API and expand subscriptions field: https://stripe.com/docs/api/customers/retrieve
https://stripe.com/docs/api/expanding_objects
And look for subscriptions field: https://stripe.com/docs/api/customers/object#customer_object-subscriptions
so would this work
$customer = $stripe->customers->retrieve(
'test');
$subscriptionid = $customer->subscriptions[0]->id;
No, expansion on subscriptions field is required. It'll look like:
$customer = $stripe->customers->retrieve(
'cus_xxx',
['expand' => ['subscriptions']]);
The subscriptions information should be in the response
god i love u people
i hope u find amazing partners and have very good lives
Happy to help ๐