How can I delete or invalidate a checkout URL using the storefront API?

Highlighted
New Member
6 0 0

I'm creating some checkout using the Storefront API. Everything seems to work well, and I get the webUrl along with the ID. 

Now, I need some checkouts to expire after 5 minutes (as an example), or sometimes I need to invalidate some checkout URLs, but I don't see a clear way to do this in the Storefront API docs. 

Is there a way to invalidate a checkout? 

 

Thank you so much! 

0 Likes
Highlighted
Excursionist
22 2 1

Have you looked into closing an order? This can't be done using the Storefront API and requires a Server accessing the Admin API.

0 Likes
Highlighted
New Member
6 0 0
As far as I know, creating a checkout via Storefront does not create an
order in the admin. It does not create a draft order.

Is there any other solution?
--
--
============== Andrés Smerkin Lead Developer Riess Group
support@riessgroup.com
https://riessgroup.com
866-209-8484 Toll Free
0 Likes
Highlighted
Excursionist
22 2 1

Well, is it an app that you're building that keeps track of the checkout id? If so, couldn't you just forget the Id and request new?

0 Likes
New Member
6 0 0
The problem is that the checkout url is given to the customer in an email.
So I want it to expire after a few minutes. I need to invalidate a checkout
after few minutes. Maybe I could remove all line items after X minutes, but
I don't think that is allowed.
0 Likes