#morteza_webhooks

1 messages ¡ Page 1 of 1 (latest)

merry saffronBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1382381332285493389

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

keen oar
#

evt_3RYqClLmjdnG8GX01SWRp17f

#

this one is from web that gets api version 2019

#

evt_3RYkrxLmjdnG8GX00FOwPHg9
but this one's api version is 2020

#

both web and app call the same api on the backend to create pi

teal linden
#

Hi, we document this here: https://docs.stripe.com/webhooks/versioning

Webhook endpoints either have a specific API version set or use the default API version of the Stripe account. So you'd need to ensure that you match the webhook endpoint you're listenting the events to match the version correctly. The above guide goes over how you can achieve this.

keen oar
#

can you make sure if both these events have been sent to the same webhook

#

they are both crated on the same account, so if we haven't specified web hook version again they should have the smae version

#

and since they are on the same account again if we specify a version for webhook again they both shuould have the same version

teal linden
#

You're not listenting to payment_intent.succeeded event on your webhook endpoint.

keen oar
#

yes we listeb to charge.succeeded

#

both web and app call the same api to create payment intent, this is the issue

#

i wanna know why event object are created with different api versions!!

teal linden
#

This webhook endpoint, we_1GTojKLmjdnG8GX0vYYJxZWU is using 2020-03-02 version. You shared evt_3RYqClLmjdnG8GX01SWRp17f event with a 2019 date but you're not listening to that event

keen oar
#

but

#

our webhook is called with 400 error

#

because of wrong api version

merry saffronBOT
teal linden
#

Can you review the above document I provided?

keen oar
#

I know this rule but my question is why events on the same stripe acount, the same web hook endpoints should have differnet versions

#

they both call the same api, so .Net sdk version is even the same

rose pendant
#

Hi there! I'll be taking over for pgskc, who needed to step away

keen oar
#

ok

#

thanks

rose pendant
#

Are you asking why events sent to the webhook endpoint we_1GTojKLmjdnG8GX0vYYJxZWU, which has a url of https://weehook.co.uk/Customer/UpdatePaymentStatus, are delivered in the API version 2020-03-02, while your other webhook endpoints get events in 2022-11-15?

keen oar
#

"2019-12-03",

#

and

#

2020-03-02

#

yes, apis are the same, the same stripe account, the same webhook endpoint

#

the same .Net sdk

#

but are sent with diffferent versions to the same webhook

#

the only difference is that our clients are web and react native apps

#

the orders made on web have version 2019 but the ones made with app are 2020 and correct

#

our stripe account version is 2020-03-02

rose pendant
#

I'm sorry, I know you've already tried to explain this, but where are you seeing an event that is delivered in API version 2019-12-03? You previously provided evt_3RYqClLmjdnG8GX01SWRp17f, but that event was not delivered to an endpoint because you aren't listening for that event type.

keen oar
#

it wasn't delivered because of it's version

#

oh

rose pendant
#

That event is a payment_intent.succeeded event. None of the webhook endpoints on your account listen for that event type. When an account's webhook endpoints don't listen for a given event type, there is no delivery.

keen oar
#

I checked the other one

#

its type is

#

charge.succeeded

#

but why

rose pendant
#

"why"? Why what?

keen oar
#

why for one of them type is payment_intent.succeded

#

for the other one its charge.succeeded

#

what could be the problem

#

can client sdk and react cause it

rose pendant
#

PaymentIntents and Charges are different objects and there are webhook events for both

#

Every successful PaymentIntent has a Charge

keen oar
#

so it wasn't successfule then

#

??

rose pendant
#

What is "it"?

keen oar
#

the one that only have payment intent.success event

rose pendant
keen oar
#

ch_3RYqClLmjdnG8GX01CXGKhIB

#

can u check this charge

rose pendant
#

That's the Charge for the event I just sent you

keen oar
#

how can i find if charge.succeeded sent to this charge

rose pendant
#

I just gave you a link to look at the charge.succeeded event for that Charge in your dashboard. That's the link a couple messages up

keen oar
#

great

#

but this one even have version 2019

#

it has been sent to our endpoint and has got 400 erro right ?

rose pendant
#

where do you see the string 2019?

keen oar
#

i get event using api

#

api-version is "api_version": "2019-12-03",

rose pendant
#

Yeah but that's for your GET request. The event gets delivered to webhook endpoints in the api version of that particular webhook endpoint, as outlined in the documentation that my colleague provided you

#

The api version of the webhook endpoint that is failing delivery (we_1GTojKLmjdnG8GX0vYYJxZWU) is 2020-03-02

keen oar
#

I have a question then , why get request for other ones return api-version: 2020-03-02

#

can you see in the logs that waht is the problem then ?

rose pendant
#

Unfortunately not - your server responded with a 400 to our request

#

It looks like there's about a 20% error rate currently

keen oar
#

oh

rose pendant
#

And many event deliveries are succeeding on this endpoint today - the question is why is it sometimes responding with a 400 to Stripe's request/

keen oar
#

yeah, that's our question

rose pendant
#

Your code responds to the webhook event - we can tell you what response you sent us for a given event, but we can't really say why you sent that response

keen oar
#

we should check logs

rose pendant
#

here are the response headers we received from your endpoint for that event:

Content-Type: text/html
Server: Microsoft-IIS/10.0
X-Aspnetmvc-Version: 5.2
X-Aspnet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 11 Jun 2025 15:06:43 GMT
Connection: close
Content-Length: 11```
#

and the response body is Bad Request

keen oar
#

ok

#

thank you

#

sorry for asking too many questions