#Crawl

1 messages ยท Page 1 of 1 (latest)

celest sandalBOT
raven ginkgo
#

In the future feel free to ask follow up questions in the same thread you have already open

#

Even if they are different questions ๐Ÿ™‚

#

But yes subscription is a property of the Invoice object

hearty haven
#

Awesome thanks

raven ginkgo
#

Sure thing

hearty haven
#

Wait

#

so this would be the code snippet

const invoice = await stripe.invoices.retrieve(paymentIntent.invoice, {
      expand: ['lines.data.price.product'],
    });
invoice.subscription.id
raven ginkgo
#

Well what are you trying to do?

#

In the above you would get the Subscription ID from invoice.subscription

hearty haven
#

I want the subcription id

#

From an invoice

raven ginkgo
#

Yep so then the above looks fine