Hi, my shopify stock is handle for a 3rd party, so before checkout I must be sure that products are available on the 3rd party stock. I've created a few webhook for cart and checkout to check stock but I don't know how remove from cart just in case stock will be 0 in my 3rd party supplier.
I thought about hide the product but cart is not refreshed automactically and still show the product, even if I navigate on my website.
This sounds like a good use-case for using our Ajax API - that can add/remove items from a shopping cart.
It may be a simpler solution however to build a direct integration with your third-party provider via an app. Then you could have them automatically update inventory quantities of your products with the Product API and stay synchonized with them, instead of having to make calls to both us and them on the fly every time someone creates a cart.