title: Shopify - New order using the Shopify API - how to know tax and shipping?
body: <p>We have built an e-commerce web application (<code>Node</code> backend, <code>Vue</code> frontend). We process the payment using Stripe, but many brands have asked us if the order and inventory control can be done in Shopify. We are trying to figure out the best way integrate a payment module into Shopify so that the brand can manage the fulfilment and inventory through Shopify.</p>
  
  <p>It seems we should use the Order API to create an order and mark it as paid. But how do we know that the product is in stock, and what are the cost for shipping and tax from Shopify when creating the order? I think we can use the Product API to get inventory levels, but where is the shipping and tax endpoints?</p>
  
  <p><strong>If I understand the Order API correctly, we need to tell Shopify what are the shipping costs and tax costs, when a new order is created. Is that right? How could we possibly know those figures? Seems like there should be an endpoint to calculate shipping costs and get a product's tax rates so that we can then pass those figures back into the Order API. Am I missing something?</strong></p>
  
  <p>I thought maybe we are supposed to create an order that has <code>financial_status: pending</code> first to get shipping and tax rates back (does it even give you those?), then update the order to either <code>cancel_reason: customer</code> or <code>cancel_reason: inventory</code> if those rates are too expensive and the order is declined? But surely we need to know what shipping methods are available to the customer in order to tell Shopify which one to use, right? Or does it by default choose the cheapest one when creating an order?   </p>
  
  <p><strong>Notes:</strong></p>
  
  <ul>
  <li>We know the customers shipping address </li>
  <li>We don't know where the product is warehoused (Shopify does I think) </li>
  <li>We don't know the weights or dimensions of the product (Shopify does I think)</li>
  </ul>