Development discussions around Shopify APIs
I am using the JS SDK to build shopify presence on my website.
I figured how to build my own cart and open a checkout, submit line items and launch the checkout in a new web-browser.
My question is - how do i detect that an order was completed?
I see that there's an 'order' field in checkout - but do I have to keep polling this variable to figure out when/if a checkout completed or is there some sort of event that i can trap?
I did notice that the checkout session pointed to by "webUrl" seems to send messages back to the window that called it which i can trap via window.onmessage() but i haven't figured out what these messages mean and if any of them flag that an order was complete.
Any help gratefully accepted 🙂
thanks!
Quickest thing to do would be to setup a webhook that would trigger upon order completion. Details here --> https://help.shopify.com/en/manual/orders/notifications/webhooks.
ok - i guess it's ok to answer your own question:
Looks like this might be the answer: https://shopify.dev/docs/admin-api/rest/reference/events/event
User | RANK |
---|---|
55 | |
11 | |
7 | |
6 | |
5 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023