Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi All,
I'm making private app to apply auto discount code into checkout. But i was got issue and stuck on it.
First,i created webhook listener checkout update to receive checkout info.
After that i get id from checkout info and then use graphQL to call checkoutDiscountCodeApplyV2 but alway got error "Checkout does not exist"
Can Anyone help me resolve this issue. Thanks a lot!
Hey @truongnd, from my understanding you can only use a mutation like this on checkouts created by your private app, with the Storefront API - more info here.
awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@awwdam Do you know what the message "Checkout does not exist" or code "INVALID" means? I am getting the same error when using the JS Buy SDK and I can't figure out what is causing the issue.
Hi!
The checkoutID above seems to be base64 encoded. For the request you may try to decode it first and add it to your query then.
Best regards!