How to convert a regular checkout id to Storefront CheckoutID?

Shopify Partner
24 1 19

So, I was trying to addLineItem to checkout using storefront api on a regular checkout. What I tried is - 

var ck_id = "{{ }}";
ck_id = btoa('gid://shopify/Checkout/'+ck_id);


But in response it says, "Checkout doesn't exist" which means my checkout id conversion isn't really working. Any thoughts?

If you have any requirement, please email me directly to

I'm the GENUINE EXPERT that you might need today!
Replies 0 (0)