#yingwg
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- yingwg, 19 hours ago, 10 messages
- ying-webhook-grpc, 22 hours ago, 18 messages
- yingwang-invoice-questions, 2 days ago, 34 messages
- yingwg, 3 days ago, 12 messages
- yingwg, 3 days ago, 10 messages
Hello! I'm not sure what would be causing that error, but that's the correct way to set the API version: https://stripe.com/docs/api/versioning?lang=node
Type
is not assignable to type
(property) Stripe.StripeConfig.apiVersion: "2022-11-15"
This library's types only reflect the latest API version.
We recommend upgrading your account's API Version to the latest version if you wish to use TypeScript with this library.
If you wish to remain on your account's default API version, you may pass null or another version instead of the latest version, and add a @ts-ignore comment here and anywhere the types differ between API versions.
Backing up a bit, why are you trying to change the API version?
Just want to upgrade api version to latest version
Why?
this is the alert I got,
we are write some of stripe code to go, and the go library is newer which requires api version to be 2023-10-16
so I need to upgrade our node.js client as well
to match that
I think this is not about a "why" question though... I guess the question is "how" to upgrade..
Why do you need them to match?
I don't think that is matter to our discussion, I just want to know how to upgrade...
The Node library is pinned to a specific API version by default. It's not recommended that you specify a different version. You can, by following the instructions you pasted above, but I don't recommend it.
does that mean we should upgrade our node library instead?
I mean the stripe node library?
Possibly. What's your end goal? Getting the API versions to match is not an end goal, it's a means to some other end. What's your ultimate goal?
okay so there is our sillution
we have stripe webhook written in node.js, which is expecting 2022-11-15
now we want to rewrite the webhook in go, and the go library is expecting api version
2023-10-16
Ah, okay. The solution for that is to create a Webhook Endpoint with the API version your code is expecting: https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
That will ensure the Events delivered to your code are in the correct API version regardless of what API version was used in the requests that created those Events.