#michael-1219_webhooks

1 messages ยท Page 1 of 1 (latest)

white tundraBOT
#

๐Ÿ‘‹ 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/1302995116767707136

๐Ÿ“ 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.

noble light
#

hi there

misty cargo
#

Can you help me understand what is unexpected here?

#

It's a .expired event so status: 'expired' is guaranteed

noble light
#

the call-back is what like this. The payment successed, and in back-end the service also provied

#

but a expired is just before the session of sucessed

#

I dont know if this is normal?

#

this is an end-point created just before the test, so I dont think the expire session is come from past event

misty cargo
#

That screenshot must be from a different Checkout Session/event

#

A session cannot be both complete and expired. The're mutually exclusive

noble light
#

I hope so, but the expired or something else, lol, just after the sucess session

#

I totaly agree about that

#

I think this is abnormal

misty cargo
#

Sorry I don't understand what you're saying. The screenshot is just a list of webhook events that have been generated/sent on your account โ€“ they don't all belong to the same Checkout Session. Look at the id field on the payload โ€“ it'll be unique

noble light
#

Ok I will try to test this, creating a new end-point

#

and an additional problem is that, I am using a method called deserializeUnsafe();

misty cargo
#

Why do you need a new endpoint?

noble light
#

cause, i am not sure where the event from from, the expire one

#

I thought it may come from some session created in the past

#

so I think create a new end-point might be a way to check this

misty cargo
#

Well Checkout Sessions expire automatically after 24 hours. So any session you create on your account, that isn't paid/complete, will expire automatically. When that happens the .expire event is sent

#

This is perfectly normal

noble light
#

can i set the time of expire?

#

like adding a parameter when create a payment?

misty cargo
noble light
#

thats awesome

#

and one addtional quesion

misty cargo
#

Sure!

noble light
#

like what i show in the screenshot, the deserializeUnsafe(), had been implemented

#

I dont know why the deserialize didnt work as intented

#

But the unsafe just work as what i wish

#

SO do the unsafe one really unsafe?

misty cargo
#

I think you've spoken to my colleagues about this in the past, and the likelihood is that there's an API mismatch between the SDK version you're using and the version the event is generated in. Those need to match otherwise it cannot deserialize safely

noble light
#

so where the mismatch happened? I am being trouble with this problem for week, lol. The webhook version is 2023.8.16, java-stripe version is 24, (api version 2024,6,20 maybe)

misty cargo
#

There you go then โ€“ you either need to recreate the webhook with the 2024-06-20 version or downgrade your SDK version

noble light
#

ok, i will try. But i remember your colleagues has told me to pined webhook version to 2023.8.16

#

I am really confuse in which version should i used.

misty cargo
#

Ultimately which version you use will depend on your integration and which version you build it against. There are breaking changes between (most) API versions so blindly changing can break some things

But the version of the webhook and the version used in your SDK need to match

noble light
#

i totally understand it, and my sole goal is to make the call-back work as intented

#

if the api version is the obstable in it, I hope if there is any document about what version should i implemented

misty cargo
#

The easier path for you is to leave your SDK/code as it is and create a new webhook version using the 2024-06-20 version

noble light
#

got it, i will going to try this, and hope this support is the last one. lol

#

and thanks for your help today

misty cargo
#

No problem, glad I could help!