#RJC24
1 messages ยท Page 1 of 1 (latest)
Hello, apologies for the delay in getting to this question. Can you tell me more about what you would like to happen when you get that event?
So I essentially just want to handle the event so it doesn't result in an error. In the Dashboard, I'm getting a 308 error. I'm guessing I'm just not handling that event properly.
I've read that you can send emails to customer who abandon a cart and so on, but my clients are selling so little merchandise that it's really not necessary to follow up if they do abandon their cart.
I guess I don't even know what to do to return a 2** status code if they do abandon the session, and that's what I'd like to figure out. Recently my webhook was disabled due to it always failing. I re-enabled it, tried the solution I posted above, and I got a slightly different looking failure, still returning a 308 error code, but this time with a red clock icon as opposed to the red circle with a line through it.
Interesting, you should be able to return a 200 the way that you return one for your other events. Are you only getting this error for this event type?
HTTP 308 is a permanent redirect by the way, so it sounds like your server may be trying to redirect our webhook request before sending the event to your endpoint
Also if you don't need to process these events at all, you can turn them off in your endpoints settings so that we do not send them to you. You would be able to turn them on in future if you find a reason to process them
Actually that sounds great!
How would I turn that off specifically? The checkout.sessions.expired?
If you go to the endpoints page in the dashboard, you can click on ...->"Update Details..."
And that will pop up a dialogue with an "Events to send" section that you can delete that event type from
Ok, let me try that out...
Wow, thank you so much! Those emails were driving me crazy. In the future, let's say I would want to send an email in the case of an abandoned cart. I could re-enable that endpoint and get information on whether or not the endpoint was hit?
Also, are there any resources or articles you could provide me as to some use cases for the checkout.sessions.expired endpoint? I feel a little cheap for disabling the endpoint as opposed to fully understanding what's going on with it.
And I guess the other thing would be, by disabling that endpoint, I won't know how many people are abandoning their cart, correct?
๐ hopping in here since pompey has to head out soon
Hello!
Yeah if you want to re-enable those emails you'd need to re-enabled the checkout.sessions.expired event on your endpoint
and https://stripe.com/docs/payments/checkout/abandoned-carts#adjust-session-expiration is the main doc you'll want to read
But is there a way to just receive a checkout object saying that they rejected the checkout session? I feel as if I was getting that info before, but the error was a 308 redirect.
oops - this is a better link to the section you want (https://stripe.com/docs/payments/checkout/abandoned-carts#webhook)
I guess it wouldn't hurt to know how many people are abandoning the session. Perhaps if my client re-ups on merchandise I could create the logic that would send an email for an abandoned cart, but for now they have very low merchandise available and is not really necessary. The internal purposes could be useful though...
But is there a way to just receive a checkout object saying that they rejected the checkout session? I feel as if I was getting that info before, but the error was a 308 redirect.
Can you clarify what you mean by this?
Hey two-shoes, I must not have an interesting topic because devs keep leaving, lol.
Let me send a screen shot of the errors I've been receiving.
Yeah I'd expect it's your server that's responding with the 308 error, not Stripe - seeing the screenshot would definitely help
and feel free to share the event ID as well
do you have an event ID as well (should look something like evt_123)
Yeah the issue here is that your server is responding to the event we're sending w/ the 308
Does that mean my endpoint is not set up correctly?
Yeah, it looks like you created a webhook endpoint for the URL https://orionofmaine.com/api/webhooks but your server is redirecting to https://www.orionofmaine.com/api/webhooks
lol I was literally just about to say that
but yeah, it'll depend on your own setup
Well I guess I can try it and see if it returns a 200 status.
Apologies for the rookie question, but why does the www need to be there?
They're different domains - it's really up to you whether you do or do not have it (I don't think there's any major advantage of including or not including it), but here it's important because the way you've set up your server has your non-www domain redirecting to your WWW domain
and stripe webhook events don't follow redirects for delivery
Ah ok, that is super helpful to know!
Well I've changed it now and reactivated the checkout.sessions.expired endpoint. We'll see if that does the trick! Thanks for sticking it out for such an easy issue. I'm thankful for you and your team of devs, very patient and helpful!
๐ happy to help! (and don't be alarmed next time you see people joining/leaving the thread - we work on a shift system so that we can take breaks)
Lol ok, thanks for letting me know! Have a great rest of your day/evening.