#GiuseppeB
1 messages · Page 1 of 1 (latest)
hello! what specifically doesn't work? All the parameters are not expanding? or only one specific parameter?
all parameters
can you share the request id? and the exact response that you're receiving?
sure, this is the response that I'm receiving:
I'm not sure about the request id but I believe is this one:
req_jO7L75Lm31W5Dn
alright, gimme a while to look at it
when i look at the request : https://dashboard.stripe.com/test/logs/req_jO7L75Lm31W5Dn, i don't see you passing in any expand parameters
so what it's wrong here:
$ret = Subscription::retrieve('<id-of-subscription>', ['expand' => $expand]);
have you tried logging what's in $expand just before retrieving the subscription?
yes
anyway I even tried to hardcore it:
Subscription::retrieve('id-subscription', ['expand' => ['latest_invoice.payment_intent']]);
and still not expanding the element
$ret = Subscription::retrieve($subscription->id, ['expand' => ['latest_invoice.payment_intent']]);
dd($ret->getLastResponse()->json);
this is the full code
dd is to dump the variable
Your code should probably be something like
Subscription::retrieve(['id' =>'sub_1Mp1Q8JQtHgRImA7uNe4ibLd', 'expand' => ['latest_invoice.payment_intent']]);