I have integrated stripe with aws amplify and in that create method is working for all modules of the stripe but retrieve is not working. I had cross-verify API using simple node js project in that it's working fine but in amplify it's not.I am passing below code to get price data from stripe
const price = await stripe.prices.retrieve(
'price_1JSbHASEW22fEuuAVYhwnzaW'
)
Even though product with this price id did exist in my stripe account still not able to get this using amplify But its throwing error "Cannot read property 'retrieve' of undefined" So anyone have idea how to resolve this ?
"Cannot read property 'retrieve' of undefined"
That means that stripe.prices
is undefined.
It might be that your local Node code, versus what is running on AWS Amplify is different.
Can you check what version of stripe-node library is running on your AWS Amplify?
It has to be minimum 8.48.0 per https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#8480---2020-04-29