#nicefellow1234

1 messages · Page 1 of 1 (latest)

wheat zealotBOT
vocal gust
#

Hi there. Let's chat in this thread

frail nymph
#

Ok, sure.

#

I am trying to fetch paymentIntent id linked to the subscription through list endpoint. How will I be able to fetch that?

#

I am using the following endpoint code:

#

$subscriptions = \Stripe\Subscription::all([
'status' => 'active',
'expand' => ['data.customer.invoice_settings.default_payment_method']
]);

vocal gust
frail nymph
#

Can you confirm the value that I would need to pass under expand key array?

#

data.latest_invoice

vocal gust
#

I believe data.latest_invoice.payment_intent

frail nymph
#

$subscriptions = \Stripe\Subscription::all([
'status' => 'active',
'expand' => [
'data.customer.invoice_settings.default_payment_method',
'data.latest_invoice'
]
]);

frail nymph
vocal gust
#

No

#

You'd need data.latest_invoice.payment_intent

frail nymph
# vocal gust You'd need data.latest_invoice.payment_intent

Ofcourse I just confirmed when I don't mention the payment_intent in the expand parameter so it doesn't expand the payment_intent object in the invoice but rather the payment_intent stays a string in there but then when I mentioned it so it expanded it as well.

vocal gust