#michael-1219_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- michael-1219_webhooks, 3 days ago, 46 messages
- michael-1219_webhooks, 4 days ago, 54 messages
hi there
Can you help me understand what is unexpected here?
It's a .expired event so status: 'expired' is guaranteed
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
That screenshot must be from a different Checkout Session/event
A session cannot be both complete and expired. The're mutually exclusive
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
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
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();
Why do you need a new endpoint?
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
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
Yes, between 30 mins-24 hours: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-expires_at
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Sure!
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?
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
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)
There you go then โ you either need to recreate the webhook with the 2024-06-20 version or downgrade your SDK version
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.
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
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
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
got it, i will going to try this, and hope this support is the last one. lol
and thanks for your help today
No problem, glad I could help!