When trying to retrieve a Stripe subscription I get
Logged Error: Cannot read properties of undefined (reading 'retrieve')
Here's how I'm trying to retrieve a subscription:
const stripeSubscription = await stripe.subscriptions.retrieve(
subId
);
console.log(stripeSubscription);
Reference: Retrieve subscription Stripe docs
I was using version: "stripe": "^8.222.0"
Then upgraded to version "stripe": "^10.10.0"
Still not working. What am I missing or doing anything wrong?
Any help or guide is appreciated. Thanks.