#Jerry Jose

1 messages ยท Page 1 of 1 (latest)

indigo smeltBOT
plain matrix
sweet grail
#

I am getting error "Received event with API version 2020-08-27, but Stripe.net 40.14.0 expects API version 2022-08-01" in my webhook endpoint

plain matrix
#

That error is received when the events being sent to a strongly typed library are being sent using an API version other than the one that the specific version of the library was built to use. Can you help me understand how the CLI relates to what you're trying to do regarding webhook endpoints/events?

sweet grail
#

getting that error when I parse event EventUtility.ParseEvent(stripeInput)

#

I had check the api version in stripe account the default version is 2020-08-27

#

How we can change the api version to avoid this error on EventUtility.ParseEvent?

plain matrix
#

There are a couple options:

  • You could update the default API version of your account. If you are processing live payments then I don't recommend doing this until you've made sure your integration can handle the new version.
  • You can downgrade the version of our .NET library that you're using to a version that is pinned to the same API version being used.
  • You can create a new webhook endpoint and pin it to the specific API version that your endpoint handler code is expecting.
    https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
sweet grail
#

that's OK, But when I use CLI to run webhook in localhost. How we can achieve it?

alpine valley
#

Hello ๐Ÿ‘‹
Taking over as toby needs to step away

#

Not sure I completely follow

that's OK, But when I use CLI to run webhook in localhost. How we can achieve it?

#

Do you mean setting an API version when you run stripe listen ?