#r0ninn
1 messages · Page 1 of 1 (latest)
Hi. What's your question?
Hey dude morning
Hi. What's your question?
I'm using NextJs for the integration with Stripe but I'm getting this error which is weird because I'm using NextJs API and my Secret Key to execute the cancel function
Do you know what happen?
Wouldn't consider myself a Node expert but happy to help
Doesn't quite look like you initialized Stripe correctly there. See our example here: https://stripe.com/docs/api/subscriptions/cancel?lang=node
Gotcha. Also what version of our node library are you using?
I'm not using Node for the API exactly
I'm using NextJs
and the version is 12.3.2
No which version of the stripe node library are you using
Our sdk to make api requests in .js
No. You had to have installed the stripe sdk to make calls, right?
ahh yeah
i'm using 13.7.0
Hm that version should support that syntax I think. Where do you call require('stripe')?
Here
Hm ok
Not sure then. Let me ask a colleague
You sure you're on 13.7.0?
delete should work on that version
On earlier versions it was stripe.subscriptions.del
Recommend you try that
You can also run console.log(Stripe.PACKAGE_VERSION) to verify the version
I'm sure
Yeah that's a very old version
If you want the docs to reflect what syntax to use, you should use a later version
Ok i did it
And now it is returning this
let me try again
Is working!!!
omg you are a genius
thanks
Lol np