#Mr Stinky Pants
1 messages · Page 1 of 1 (latest)
Can you share the evt_xxx ID
evt_1M6WDBJKY8YXH2zhN9YF95Q7
if you look at the response i have sent the header and body to check
it is sending an event saying the intent requires me to take action, would that affect it?
Hmm, you returned a 2xx response to us so we deemed it successful
Are you using stripe-dotnet?
yes you can ignore that as its being sent from webservice
yes
i mean its weird i have a setup intent created here that i just sent which is ok evt_1M6X0HJKY8YXH2zhi8q9DfKH
Got it. I'd recommend doing some further logging: https://stackoverflow.com/questions/46451508/stripe-net-the-signature-for-the-webhook-is-not-present-in-the-stripe-signatur/73560926#73560926
I am using Stripe.net SDK from NuGet. I always get the
The signature for the webhook is not present in the Stripe-Signature header.
exception from the StripeEventUtility.ConstructEvent method.
[
ill try this , throwOnApiVersionMismatch: false
Yeah the The signature for the webhook is not present in the Stripe-Signature header error isn't the actual error, you'd get the actual issue from err.Message
What version of stripe-dotnet are you using?
that is the error it gives in ex.Message
catch (StripeException ex)
{
responseJson.Add(new JProperty("status", "Stripe error"));
responseJson.Add(new JProperty("error", ex.Message));
}
this is what is posts back to stripe
40.14.0.0
Hmm, that version should be compatibler with the API version on that event (2022-08-01)
Is there an evt_xxx example that 'works'?
evt_1M6X0HJKY8YXH2zhi8q9DfKH is ok - this one not evt_1M6WAZJKY8YXH2zhEWVYhiG8 - same type of event
although just looking at that body has a lot of \\\
evt_1M6X0HJKY8YXH2zhi8q9DfKH is the most recent one, ~1 hour after evt_1M6WAZJKY8YXH2zhEWVYhiG8
Has something changed in your code? Can you try and trigger another event?
no changed, its send ok for me
i just sent this one evt_1M6XZjJKY8YXH2zhdgf3wrfr . ok
maybe something to do with the clients device?
Not sure what you mean?
does it generate something in the stripe.js that affects the body being sent?
Nope, nothing will impact the signature other than the endpoint the event was sent to (e.g. its signed with the unique secret of that endpoint)
If there's a mismatch in your code between what event was signed with and your secret, then it'll error
yes but have you seen the \\ in the failing event? evt_1M6WAZJKY8YXH2zhEWVYhiG8
That's the response you've returned to us, I guess you're parsing it somehow
thats the body its using in EventUtility.ConstructEvent(
Then something in your webhook code is malforming the payload before you pass it to the method
That method expects the raw event payload from us
yes but the code is the same for all events and it is ok for some
ill try find another way to get the body
Can you share your code?
var requestMessage = OperationContext.Current.RequestContext.RequestMessage;
var messageDataProperty = requestMessage.GetType().GetProperty("MessageData", (BindingFlags)0x1FFFFFF);
var messageData = messageDataProperty.GetValue(requestMessage);
var bufferProperty = messageData.GetType().GetProperty("Buffer");
var buffer = bufferProperty.GetValue(messageData) as ArraySegment<byte>?;
body = Encoding.UTF8.GetString(buffer.Value.Array);
the problem is im using web service becasue thats where my app code is
its in wcf .svc file
Yeah I'm not overly familiar with .NET and that ecosystem but I suspect either your code or the host/service is malforming the payload somehow
That's how we recommend you handle signature verification with stripe-dotnet
yes i did try but i have never used .net core
i think it needs a bit more info on this page for someone who hasnt use core before
What .NET flavour are you using?
sorry it seems to have this problem here Received event with API version 2022-08-01, but Stripe.net 41.1.0 expects API version 2022-11-15.
did you say you need to delete the webhook in dashboard
this is on test mode
Oh, I thought you were using version 40.14.0
sorry i just got that .core app and did an update on the stripe etc
as that was using a very old version
Then yep, that will be an issue. Versions of the .NET library are fixed to a specific API version, which needs to match the version of the API event(s)
Well your account default API version is 2022-08-01
So you're going to encounter more issues using 41.x (which is fixed to 2022-11-15)
so you just do upgrade api in dashboard to fix it?
I wouldn't just blindly upgrade your API version without first understanding the (breaking) changes and how they may impact your integration: https://stripe.com/docs/upgrades
well i dont have a working api yet anyway