What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

asmerkin
Shopify Partner
16 2 2

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! 

Replies 7 (7)

kneeki
Shopify Partner
23 2 4

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

---
asmerkin
Shopify Partner
16 2 2
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
kneeki
Shopify Partner
23 2 4

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?

---
asmerkin
Shopify Partner
16 2 2
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.
ameliabennet
Shopify Partner
4 0 0

Did you find a solution for this?  

asmerkin
Shopify Partner
16 2 2

Sadly, no.

 

ameliabennet
Shopify Partner
4 0 0

Ah that's unfortunate! Thanks anyway