Can I delete an Abandoned Checkout through the Shopify API?

Shopify Partner
15 0 1

Hi!

From the docs, it seems it's impossible as there is no DELETE endpoint for Abandoned Checkout. I'm wondering if there is a 'disguised' way of doing it? For example, could there be a hidden `abandoned_checkout_id` parameter that can be sent upon creating an order with the POST on `/admin/orders`?

My usecase is pretty specific: I'm having abandoned checkouts users complete their checkout through an outside payment gateway. So I'm going to create the Orders myself through the Admin API. I am not using the Checkout API because ultimately I cannot have customers go through the native payment gateways, as I want to subscribe them to recurring plans.

Thanks!

Adrien

0 Likes
Shopify Partner
1838 170 525

Hi Adrien,

Nope, no hidden way either. You can't delete them via Admin UI either. In Admin UI you can archive an abandoned checkout, effectively closing it. That endpoint isn't public though.

Best wishes!

I turn coffee in to code - since 1998
0 Likes
Shopify Partner
15 0 1

Thanks for the quick and precise answer Karl! That's too bad, but I'll try and find another way.

All the best

0 Likes
Shopify Partner
15 0 1

Hi Karl, again about this abandoned checkout deletion. You said we cannot delete them via the Admin UI but we should be able to archive them. However I cannot see where this is doable in the Admin UI. Could you point me to the button / page?  I looked on the Abandoned Checkouts pages.

0 Likes
Shopify Staff
Shopify Staff
1359 54 201

Hey @adrien2,

 

You should be able to do that like so:

 

 

24-57-zilel-ejp1x

 

Cheers.

0 Likes
Highlighted
Shopify Partner
15 0 1

great @Alex thank you very much for your quick and detailed answer. I missed that action button in the list.

 

Have a nice day

 

0 Likes
Shopify Partner
1 0 0

Hi @adrien2, did you find out a workaround for this approach? I have the same situation.

 

It's a shame that Shopify API doesn't include this feature.

0 Likes
Shopify Partner
15 0 1

Hi @fedebalderas! I haven't yet tackled that issue but I'm going to have to at some point for my app. It is too bad indeed, I don't really understand if there is a reason not to have this endpoint in the API.

 

I have the feeling that since it's doable from the GUI backoffice with a few clicks, it must be scriptable somehow. I'll try and inspect the outgoing network requests and replicate them, I don't know how hard it'll be yet but I believe it's got to be doable! I'll let you know when I get to it.

1 Like
Tourist
5 0 4

Any luck on trying to replicate the script the GUI is using? I am making an app that is very similar- using DraftOrders for custom-priced items and want to automate deleting abandoned checkouts. Thanks.

0 Likes
Shopify Partner
15 0 1

I haven't gotten down to it yet but should look at it in the coming weeks, I'll let you know!

 

0 Likes