When creating an order, inside line_items the field price is required. What are these prices used for? Are they really required, or could we just send 0? If you need the actual prices, should they be for the entire quantity (so different depending if quantity is 1 or 3) or the price for one item? Should the prices include tax or not?
I’ve seen examples where people just posted 0 as a value.
Would be glad to know if and how to use that field.
Thanks for reaching out and Welcome to our Developer Community!
It’s not necessarily required for the price field within line_items to have the corresponding value, although I do recommend it. The price here should represent only that line item and exclude tax. It’s possible to set this value to 0 and have the order price calculate using the other 4 price related fields.
Outside of the line_items field there are the fields: subtotal, total_tax, price under the shipping_lines field, and total_price. These fields will handle the tax and shipping fee, as well as set the subtotal before fees and ultimately the total price of the order.
Please let me know if you have any questions or concerns!