--in TEST MODE--
I am retrieving the customer with cus_xxxx
In order to avoid multiple API calls, i expand the customer object by requesting 'subscriptions' related to that customer ID
CURLOPT_POSTFIELDS => http_build_query([
"expand[]" => 'subscriptions'
])
But the subscriptions object does not return the plan name, as it would when retrieving the product itself. https://docs.stripe.com/api/products/retrieve
[id] => prod_Mxxxxxxx
..
[name] => My plan Name
Should it be that way, or am i missing something?
I'd recommend listing Subscriptions with the Customer ID in the customer
argument, which will yield the same list as the Customer's subscriptions
, but this time you can expand[]=>'data.plan.product'
and this way get the Product name
.