#vrk-cli-eventforward
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.
- vrk18, 4 days ago, 14 messages
- vrk-webhook-apiversion, 4 days ago, 6 messages
- vrk-twostep-payments, 5 days ago, 12 messages
- vrk18, 6 days ago, 22 messages
- vrk18-account-support, 6 days ago, 2 messages
Hi, what have you tried so far? I also recommend going through this Githib page, https://github.com/stripe/stripe-dotnet/blob/master/src/Stripe.net/Services/Events/EventUtility.cs as a next step.
I am trying to by pass the API version mismatch error while using the Webhooks, Webhooks not POSTing any events, giving the error code 500
Can you share what you're tried so far? What does your code look like? Where are you exactly seeing this 500 error? Can you add a bit more context here?
string json = await new StreamReader( HttpContext.Request.Body ).ReadToEndAsync();
Event? stripeEvent = EventUtility.ConstructEvent( json,
//Request.Headers["Stripe-Signature"], mWebhookSecret );
//to check webhooks locally using stripe cli
Request.Headers["Stripe-Signature"], "WEBHOOK_SECRET",
throwOnApiVersionMismatch: false);
I am constructing the event like this.
2023-11-08 09:51:26 --> payment_intent.created [evt_3O9y7IHvbngkCFkt0KuThcDD]
2023-11-08 09:51:26 <-- [400] POST https://localhost:7064/Payment/WebhookAction [evt_3O9y7IHvbngkCFkt0KuThcDD]
2023-11-08 09:54:08 --> payment_intent.created [evt_3O9y9uHvbngkCFkt1emH0JGs]
2023-11-08 09:54:08 <-- [500] POST https://localhost:7064/Payment/WebhookAction [evt_3O9y9uHvbngkCFkt1emH0JGs]
2023-11-08 09:57:32 --> payment_intent.created [evt_3O9yDCHvbngkCFkt0OrF7UyP]
2023-11-08 09:57:32 <-- [500] POST https://localhost:7064/Payment/WebhookAction [evt_3O9yDCHvbngkCFkt0OrF7UyP]
I am getting this on my CLI
@nova aurora it's a really bad idea to do this since the deserialization can still fail. Why aren't you receiving Events in the right API version?
vrk-cli-eventforward
I am always getting this, and I am not sure how to change the API version
I explained it last week did you miss that in https://discord.com/channels/841573134531821608/1169787380425830520 ?
stripe-dotnet expects a specific API version and the Events are generated with a different API version likely because you use the CLI.
What you should do is use the latest stripe-dotnet version and then use the --latest flag on the CLI