#Bit
1 messages ยท Page 1 of 1 (latest)
Let's talk here
helloooo
What can we help with?
Stripe exception: Received event with API version 2022-08-01, but Stripe.net 39.48.0 expects API version 2020-08-27. We recommend that you create a WebhookEndpoint with this API version. Otherwise, you can disable this exception by passing throwOnApiVersionMismatch: false to Stripe.EventUtility.ParseEvent or Stripe.EventUtility.ConstructEvent, but be wary that objects may be incorrectly deserialized. stack: at
I have moved pages to a new company
and receiving this
but I can't select a different API version on my consolle
Ahhh, yup. I've seen this before. Right now, the workarounds mentioned in the error code are the only options and (unfortunately) you have to use the API to create a new Webhook Endpoint with the right version: https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
on the link you provided there's only calls to create a webhook, but not with a specific api version
aah ok ok found
so I can't do it from the web dashboard
right ?
Correct
damn
and I can't update the current one
so I need to delete the current first
and then create a new one by curl and specifying every single event manually
together with the api_version
I can't simply update the current one
You can specify the Events in the Dashboard once it's created via the API
But no, you won't be able to update the current one
Please make sure you do not post your API key here. Even if it's just the test API key, remember this is a public server where anyone can see it
When you run the cURL command, does it work?
I obvioulsy used the test api I found on that page
it was not my API ๐ I'm not that much in panic
curl https://api.stripe.com/v1/webhook_endpoints
-u (myKEY)
-d url="(myURL)"
-d api_version="2020-08-27"
is it right ?
I'm going to try right now
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: enabled_events.",
"param": "enabled_events",
"request_log_url": "https://dashboard.stripe.com/logs/req_86PPzb04Cmx8Nh?t=1674150276",
"type": "invalid_request_error"
}
}
it looks like I can't create it without enabled_events ?
You should be able to add just 1 enabled event, then go into the dashboard and add the rest later, as far as I know
yes, done... but now I can't add them by selecting "all" ๐ hahahahah
I need to select them one by one
that's cruel
I'm adding them one by one now
I wish to thank you very much
you saved me lots of stress and hours of searching
this channel is really amazing
thanks for your time!!!
oh another bad news... since I deleted the old webhook, now all the events which failed
are not resendable
that's a total panic
You're totally right. That is an awful experience. I'm going to file a feature request for updating the webhook API version to mitigate this type of thing in the future.
Taking a look into the failed events now
failed events are still there
if I click on Resend it says "This event no longer existss"
How old is the event?
I think it's because the Dashboard doesn't let you resend events to new webhook endpoints.
I believe you can resend events to a new webhook endpoint via Stripe CLI - Use the command stripe events resend <event_id> --webhook_endpoint=<endpoint_id> for events up to 30 days old. This will work even for events that have never been sent to that endpoint before.