#vrk-cli-eventforward

1 messages · Page 1 of 1 (latest)

low lagoonBOT
#

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.

tiny hatch
nova aurora
#

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

tiny hatch
#

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?

nova aurora
#

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

low lagoonBOT
snow nova
#

@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

nova aurora
#

I am always getting this, and I am not sure how to change the API version

snow nova
#

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